Cannot update value of length 8 by assigning value of length 6

Certified Associate Developer

a!dropdownField(
label: "POL",
labelPosition: "ABOVE",
placeholder: "--- Select a Value ---",
choiceLabels: local!polDetails.pol,
choiceValues: local!polDetails.id,
value: local!pol,
saveInto: {
local!psl,
a!save(local!selectedSubPol, null)
},
searchDisplay: "AUTO",
                         
                          validations: {}
                        ),
a!multipleDropdownField(
  label: "Sub - POL",
  labelPosition: "ABOVE",
  placeholder: "--- Select Values ---",
  choiceLabels: local!subPol.subPol,
  choiceValues: local!subPol.id,
  value: if(a!isNotNullOrEmpty(local!pol),local!subPol.id,local!selectedsubPol),
  saveInto: {
    local!selectedsubPol,
    a!save(local!selectedsubPol, null)
  })

error is coming when i am un-selecting the default selected values . can somebody help me on this

  Discussion posts and replies are publicly visible

Parents
  • I'm not sure what you are doing here exactly, but the saveInto on the second dropdown is immediately clearing the value that is being selected.  The first line updates local!selectedsubPol with the selection, then the a!save() below assigns it back to null immediately:

      saveInto: {
        local!selectedsubPol,
        a!save(local!selectedsubPol, null)
      })

    As the error message doesn't appear related based on what you've shared, is your issue with the first dropdown, or the second?

    Are you able to replicate this in a stand-alone interface?  As we do not see the rest of the code or variable values for troubleshooting.

Reply
  • I'm not sure what you are doing here exactly, but the saveInto on the second dropdown is immediately clearing the value that is being selected.  The first line updates local!selectedsubPol with the selection, then the a!save() below assigns it back to null immediately:

      saveInto: {
        local!selectedsubPol,
        a!save(local!selectedsubPol, null)
      })

    As the error message doesn't appear related based on what you've shared, is your issue with the first dropdown, or the second?

    Are you able to replicate this in a stand-alone interface?  As we do not see the rest of the code or variable values for troubleshooting.

Children
No Data