Skip to main content
December 26, 2022
Question

Preventing pickerFieldUsers from allowing you to select the same user twise

  • December 26, 2022
  • 1 reply
  • 0 views

Hi All,

I am able to see the user which is already selected previously in the pickerFieldUsers, how to hide/prevent the users' which already selected from pickerFieldUsers ?

Thank You

1 reply

susmethaasirir1117
December 26, 2022

Have a duplicate check in the saveInto

a!pickerFieldUsers(
      label: "Users",
      maxSelections: 3,
     groupFilter:cons!AA_STATES,
      value: local!pickedStates,
      /* The union() function allows duplicate Users to be ignored, returning only unique elements.*/
      saveInto: a!save(local!pickedStates, union(save!value, save!value))
    )