Hi All,
I have a requirement where i need to select multiple value from drop-down field.
I have to store the value in cdt in such a way that for every selected row that many rows should get inserted in db while writing.
Suppose cdt have 4fields
Id
PieceId
Name
RM
And i have selected 2 values from the drop-down, the structure of cdt that i want is
[1]
Id:1
PieceId:1
Name: 1st drop-down value
Rm: XYZ
[2]
Id:2
Name:2nd drop-down value
Thanks,
Gaurav Singh
Discussion posts and replies are publicly visible
Hi gauravs0002
You need loop through the selected values and generate the cdt. Have a look at this sample code
load( local!dropdownValues:{"abc","pqr","lsd"}, local!selectedValues, { a!multipleDropdownField( label:"Select Values", choiceLabels: local!dropdownValues, choiceValues: local!dropdownValues, placeholder: "Select", value:local!selectedValues, saveInto:local!selectedValues ), a!textField( label: a!forEach(local!selectedValues, 'type!cdtDatatype'( PieceId:"2", Name:fv!item, Rm:"XYZ" ) ) ) } )