Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Garbage Value in Custom Picker

Certified Senior Developer
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?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    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.

Reply
  • 0
    Certified Lead Developer

    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.

Children
No Data