cancel
Showing results for 
Search instead for 
Did you mean: 

fiori elements: dependent filter revearse

04-19-2022 4:09 PM
1150 views 1 comments
SAP Managed Tags
Subscribe

Dear Experts,

with the following code you make value list entries dependent on each other:

In this example you can only select a region to a belonging country which as been selected before:

annotate schema.RootEntities with{
    ...
    region @(Common : {
        Text            : region.name,
        TextArrangement : #TextFirst,
        ValueListWithFixedValues: true,
        ValueList       : {
            Label          : '{i18n>Region}',
            CollectionPath : 'Regions',
            Parameters     : [
                {
                    $Type             : 'Common.ValueListParameterInOut',
                    ValueListProperty : 'code',
                    LocalDataProperty : region_code
                },
                {
                    $Type: 'Common.ValueListParameterOut',
                    ValueListProperty: 'name',
                    LocalDataProperty : region.name,
                },
                //To only show the connected values
                {
                    $Type : 'Common.ValueListParameterFilterOnly',
                    ValueListProperty : 'country_code',
                },
                {
                    $Type : 'Common.ValueListParameterIn', //Input parameter used for filtering
                    LocalDataProperty : country_code,
                    ValueListProperty : 'country_code',
                },
                
            ]
        }
    });
};

We are wondering how this would work backwards?

If the end user chooses a region for Newzealand (Queensland for instance) and afterwards changes the Country to Germany the region stays as selected before. The entity can also be saved like this. Is there any way of implementing a control for this that this is not possible?

Best Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

PavelHarelyshau
Newcomer
0 Likes

Hello. I faced with the same issue. Have you found any solution for that?