cancel
Showing results for 
Search instead for 
Did you mean: 

Need to display unique values in dropdown for context based help

souvikroy
Participant
0 Kudos

I am working on an application where I have material number and plant as input. The dropdown needs to be dynamic i.e when I entered a plant value then for the material dropdown, I need to show only materials which belong to that plant entered.

Let me explain it by an example from the above the value table/collection path. If I click on the dropdown for plant, it should show, US01 , US02,US03. Now, let's say, if I select US01 as plant, then material dropdown should show only materials based on the plant US01 which is 1001,1002 and 1003.

I am able to achieve this by the following code.

ValueList : {

CollectionPath : ‘I_Plant_Mat’,

Parameters : [

{

$Type : 'Common.ValueListParameterInOut',

LocalDataProperty : Material,

ValueListProperty : 'CountryCode'

},

{

$Type : 'Common.ValueListParameterInOut',

LocalDataProperty : Plant,

ValueListProperty : ‘Plant’

}

]

}

Now, I have another scenario that, user may directly click on Materials dropdown without selecting any plant value. In that case, the expectation is , the material dropdown should show all unique materials i.e. 1001,1002,1003,1004 and 1005.

But with the above code, it is showing me all the rows i.e. 1001,1001,1001,1002,1002,1002,1003,1004,1005 . You can see here, duplicate values also show up.

So, I need help to make both scenarios work. How can I adjust my current code so that it does show only unique material values as well as if Plant is selected first, material dropdown should show only the materials belonging to that plant.

Accepted Solutions (0)

Answers (0)