Multiple Dropdown Duplicate Values

a!sideBySideItem(
item: a!multipleDropdownField(
label: "Status",
labelPosition: "ABOVE",
choiceLabels: {
"Active",
"Approved",
"Cancelled"
},
choiceValues: {
true,
true,
true
},
saveInto: {local!activeSOWs, local!approvedSOWs, local!cancelledSOWs},
validations: {}
)
)

All three of the variables I would like to saveInto are booleans but I am getting an error:

Interface Definition: Expression evaluation error at function a!multipleDropdownField [line 700]: A multiple dropdown component [label="Status"] has an invalid value for "choiceValues". Duplicate items are not allowed in the choiceValues array, but choiceValues was true; true; true.

How can I set the three variables to true when the labels are selected? Thanks!

  Discussion posts and replies are publicly visible

Parents
  • Hi Morgane,

    Can you please try this code.

    a!sideBySideItem(
    item: a!multipleDropdownField(
    label: "Status",
    labelPosition: "ABOVE",
    choiceLabels: {
    "Active",
    "Approved",
    "Cancelled"
    },
    choiceValues: {
    "Active",
    "Approved",
    "Cancelled"
    },
    value:local!locval,
    saveInto: {
    local!locval,
    if(contains(local!locval, "Active"),a!save(local!activeSOWs,true),{}),
    if(contains(local!locval, "Approved"),a!save(local!approvedSOWs,true),{}),
    if(contains(local!locval, "Cancelled"),a!save(local!cancelledSOWs,true),{}),

    },
    validations: {}
    )
    )

    Hope it is help to u.
    Regards,
    Bhanu
Reply
  • Hi Morgane,

    Can you please try this code.

    a!sideBySideItem(
    item: a!multipleDropdownField(
    label: "Status",
    labelPosition: "ABOVE",
    choiceLabels: {
    "Active",
    "Approved",
    "Cancelled"
    },
    choiceValues: {
    "Active",
    "Approved",
    "Cancelled"
    },
    value:local!locval,
    saveInto: {
    local!locval,
    if(contains(local!locval, "Active"),a!save(local!activeSOWs,true),{}),
    if(contains(local!locval, "Approved"),a!save(local!approvedSOWs,true),{}),
    if(contains(local!locval, "Cancelled"),a!save(local!cancelledSOWs,true),{}),

    },
    validations: {}
    )
    )

    Hope it is help to u.
    Regards,
    Bhanu
Children
No Data