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
  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    each value selected in multiple dropdown can link to another value, when you select that option respective linked value will be added to the parent and becomes another component which is working fine with single selection but when i multi select same time eventhough we select multiple it process one at a time instead of all together. 

    Here in the example for each items in the map i want multipledropdown, when i select value in multi select dropdown, i'm updating the parent adding one item to parent which will work fine but i do multi select at same time it save one at a time

Children