Skip to main content
preeti0001
November 2, 2022
Question

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

  • November 2, 2022
  • 3 replies
  • 0 views

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

3 replies

csteward
November 2, 2022

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.

November 3, 2022
[deleted]
Participating Frequently
November 3, 2022