cancel
Showing results for 
Search instead for 
Did you mean: 

fiori elements: dependent filter revearse

former_member729305
Participant
352

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

View Entire Topic
PavelHarelyshau
Newcomer
0 Kudos

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