Skip to main content
mayankv557314
August 21, 2025
Question

Garbage Value in Custom Picker

  • August 21, 2025
  • 2 replies
  • 0 views
Hi Everyone

I’m using a custom picker as a user picker to select users based on custom properties. However, I’ve run into an issue:
      •     If I type something in the picker but then erase it without selecting a suggestion, the field ends up holding a garbage or null value.
      •     This behavior causes unexpected results in my form/data submission.
Has anyone faced a similar issue? If so, what’s the best way to handle it — for example, ensuring the field resets properly or validating before submission?

2 replies

stefanhelzle0001
August 21, 2025

You will have to check your code for the "selectedLabels" attribute. Make sure it does not create a list with null values.

shubhama926776
August 21, 2025

In selectedLabels,use
if(isnull(local!selectedUser), {}, {local!selectedUser.name})
to return empty list instead of {null}, and in saveInto add
if(or(isnull(save!value), length(save!value)=0), a!save(local!selectedUser, null), ...)
to clear when text is erased.

Add validations to check if typed text matches valid selection, and disable submit button with disabled: isnull(local!selectedUser) to prevent submission.