Editable grid using a!multipleDropdownField(), when user selects the two values in multiple dropdown field then it is storing in CDT ri!rules[fv!index].clientID like (clientID 1234; 7890)
Hi All,
In Editable grid using a!multipleDropdownField(), when user selects the two values in multiple dropdown field then it is storing in CDT ri!rules[fv!index].clientID like (clientID 1234; 7890)
a!save(
ri!rules[fv!index].clientID,
fv!item.clientID
)
Here, for each selected clientID, how to build same CDT with second selected clientID.
Sample code is pasted for a!multipleDropdownField() which is used in Editable grid
Requirement is for each selected clientID in multiple dropdown, on click on button need to display in another editable grid for two selected clientID in separate two rows.
a!multipleDropdownField(
label: "clientID",
placeholder: "Type in Client Name/clientID",
choiceLabels: if(
rule!APN_isEmpty(ri!clientDetails),
{},
append(a!forEach(
items: ri!clientDetails,
expression: index(fv!item, "custname", {}) & " - " & index(fv!item, "clientID", {})
),"NONE")
),
choiceValues: append(if(
rule!APN_isEmpty(ri!clientDetails),
{},
index(ri!clientDetails, "clientID", {})
),"NONE"),
value: if(length(trim(split(fv!item.clientID,";")))>1,trim(split(fv!item.clientID,";")),fv!item.clientID),
saveInto: {
fv!item.clientID,
/*a!save(fv!item.clientID,split(fv!item.clientID,";"))*/
/*,*/
a!save(
ri!rules,
if(
rule!APN_isEmpty(ri!rules),
local!rulesGrid,
ri!rules
)
),
a!save(
ri!rules[fv!index].clientID,
fv!item.clientID
),
a!save(
ri!selectedObligorsId,
ri!rules[fv!index].clientID
)
},
searchDisplay: "ON",
required: true,
requiredMessage: "Value is required",
validations: {},
)
Regards,
Sandeep
