a!localVariables( local!items: { a!map(id: 1, value: "a|b"), a!map(id: 6, value: "a|b"), a!map(id: 8, value: "a|b") }, local!sortedData: { a!map(id: 8, value: { "a", "b" }), a!map(id: 2, value: { "a", "b" }), a!map(id: 8, value: { "a", "b" }) }, a!columnsLayout( columns: { a!columnLayout( contents: { a!forEach( local!sortedData, if( mod(fv!index, 2) <> 0, a!multipleDropdownField( label: "Item" & fv!index, choiceValues: { "a", "b", "c", "d" }, choiceLabels: { "a", "b", "c", "d" }, value: touniformstring(fv!item.value), saveInto: { fv!item.value, a!save( local!sortedData, append( local!sortedData, a!map( id: count(local!sortedData) - 2, value: null ) ) ), a!save( local!sortedData, todatasubset( local!sortedData, a!pagingInfo( 1, - 1, a!sortInfo(field: "id", ascending: true()) ) ).data, ) } ), {} ) ) } ), a!columnLayout( contents: { a!forEach( local!sortedData, if( mod(fv!index, 2) = 0, a!multipleDropdownField( label: "Item" & fv!index, choiceValues: { "a", "b", "c", "d" }, choiceLabels: { "a", "b", "c", "d" }, value: touniformstring(fv!item.value), saveInto: { fv!item.value, a!save( local!sortedData, append( local!sortedData, a!map( id: count(local!sortedData) + 1, value: null ) ) ), a!save( local!sortedData, todatasubset( local!sortedData, a!pagingInfo( 1, - 1, a!sortInfo(field: "id", ascending: true()) ) ).data, ) } ), {} ) ) } ) } ) )
When i select multiple values at same time in multipledropdown, as its updating the local!sorteddata ,its takes only one value to process. Can we keep any hold to process all selected values at same time? or any workarounds
Discussion posts and replies are publicly visible
I'm a little confused - what exaclty are you trying to accomplish?
each value selected in multiple dropdown can link to another value, when you select that option respective linked value will be added to the parent and becomes another component which is working fine with single selection but when i multi select same time eventhough we select multiple it process one at a time instead of all together.
Here in the example for each items in the map i want multipledropdown, when i select value in multi select dropdown, i'm updating the parent adding one item to parent which will work fine but i do multi select at same time it save one at a time
Same here, I do not understand what you want to achieve.
You write "one at a time". Sure, each selection is an individual interaction with the component and results in an evaluation of your saveInto configuration.
Thats right, on each selection of dropdown values it evaluate saveinto. So what i'm trying in multidropdown when i select multiple values as an array it should evaluate all selected values together because i'm selecting all at same time, but whats happening it save only one value after the evaluation even i select multiple values at same time.