Store the values of a multipledropdownfield

Help please 

I want to store a multipledropdownfield into my cloud database 

I add the multipledropdownfield, if i pick only value, it works great (see the image bellow)

If i pick or select TWO or more values, an ERROR appears (see the image bellow)

This is the expression of the multipleDropdownField

{
a!multipleDropdownField(
label: "Acceso a servicios basicos?",
labelPosition: "ABOVE",
placeholder: "--- Seleccione ---",
choiceLabels: {
"Agua",
"Luz",
"Teléfono",
"Internet"
},
choiceValues: {
"Agua",
"Luz",
"Teléfono",
"Internet"
},
value: ri!CWA_OECClient.coecaccesoservicionbasicos,
saveInto: ri!CWA_OECClient.coecaccesoservicionbasicos,
required: true,
validations: {}
)}

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Hi @danna3499,

    It looks like the field ri!CWA_OECClient.coecaccesoservicionbasicos is of type text, hence it is storing multiple values into one text string like"Agua; Luz" and the drop-down expects a string array {"Agua", "Luz"}

    Try using split function in the value of the drop-down.and split on "; "

    I hope it resolves your issue 

    Like

    value: split(ri!CWA_OECClient.coecaccesoservicionbasicos, "; ")

Reply
  • 0
    Certified Lead Developer

    Hi @danna3499,

    It looks like the field ri!CWA_OECClient.coecaccesoservicionbasicos is of type text, hence it is storing multiple values into one text string like"Agua; Luz" and the drop-down expects a string array {"Agua", "Luz"}

    Try using split function in the value of the drop-down.and split on "; "

    I hope it resolves your issue 

    Like

    value: split(ri!CWA_OECClient.coecaccesoservicionbasicos, "; ")

Children