multiple drop down same time multi select updating one at a time

Certified Lead Developer

a!localVariables(
  local!items: {
    a!map(id: 1, value: "a|b"),
    a!map(id: 6, value: "a|b"),
    a!map(id: 8, value: "a|b")
  },
  local!sortedData: {
    a!map(id: 8, value: { "a", "b" }),
    a!map(id: 2, value: { "a", "b" }),
    a!map(id: 8, value: { "a", "b" })
  },
  a!columnsLayout(
    columns: {
      a!columnLayout(
        contents: {
          a!forEach(
            local!sortedData,
            if(
              mod(fv!index, 2) <> 0,
              a!multipleDropdownField(
                label: "Item" & fv!index,
                choiceValues: { "a", "b", "c", "d" },
                choiceLabels: { "a", "b", "c", "d" },
                value: touniformstring(fv!item.value),
                saveInto: {
                  fv!item.value,
                  a!save(
                    local!sortedData,
                    append(
                      local!sortedData,
                      a!map(
                        id: count(local!sortedData) - 2,
                        value: null
                      )
                    )
                  ),
                  a!save(
                    local!sortedData,
                    todatasubset(
                      local!sortedData,
                      a!pagingInfo(
                        1,
                        - 1,
                        a!sortInfo(field: "id", ascending: true())
                      )
                    ).data,
                    
                  )
                }
              ),
              {}
            )
          )
        }
      ),
      a!columnLayout(
        contents: {
          a!forEach(
            local!sortedData,
            if(
              mod(fv!index, 2) = 0,
              a!multipleDropdownField(
                label: "Item" & fv!index,
                choiceValues: { "a", "b", "c", "d" },
                choiceLabels: { "a", "b", "c", "d" },
                value: touniformstring(fv!item.value),
                saveInto: {
                  fv!item.value,
                  a!save(
                    local!sortedData,
                    append(
                      local!sortedData,
                      a!map(
                        id: count(local!sortedData) + 1,
                        value: null
                      )
                    )
                  ),
                  a!save(
                    local!sortedData,
                    todatasubset(
                      local!sortedData,
                      a!pagingInfo(
                        1,
                        - 1,
                        a!sortInfo(field: "id", ascending: true())
                      )
                    ).data,
                    
                  )
                }
              ),
              {}
            )
          )
        }
      )
    }
  )
)

When i select multiple values at same time in multipledropdown, as its updating the local!sorteddata ,its takes only one value to process. Can we keep any hold to process all selected values at same time? or any workarounds

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to Stefan Helzle

    Thats right, on each selection of dropdown values it evaluate saveinto. So what i'm trying in multidropdown  when i select multiple values as an array it should evaluate all selected values together because i'm selecting all at same time, but whats happening  it save only one value after the evaluation even i select multiple values at same time.