Skip to main content
June 11, 2024
Question

How to have a dropdown/picker that allows user to input a value when it doesn't exist

  • June 11, 2024
  • 5 replies
  • 0 views

I want to have a dropdown/picker field that allows use either select from options or input a value when it is not in options

    5 replies

    davidj137213
    Brainy
    June 11, 2024

    Maybe using a text field when the values doesn't exist, and making it visible (hiding the drowopdown) when needed?

    stefanhelzle0001
    Brainy
    June 11, 2024

    For picker fields, I discuss this in a blog post: https://appian.rocks/2022/12/22/create-new-items-using-a-custom-picker/

    For drop downs, I typically add a "+" button that allows the user to enter a new value in a text field that replaces the drop down.

    June 11, 2024

    Awesome, thank you!

    konduruc733182
    June 11, 2024

    Have a options as other in the dropdown, which when selected enables a text field and collects the required value. or use a + icon next to the dropdown/picker which changes the field to textfield when clicked.

    stewart.burchell
    June 11, 2024

    You can do this with a custom picker: https://docs.appian.com/suite/help/24.2/Custom_Picker_Component.html

    In the suggest function when a match isn't found for the value being passed as the filter you'll need to append that as a new value to the array of items used to search and return that array back to the calling interface. You'll need to do something similar with the identifiers. And then last of all, to ensure that the updated list is persisted you'll need to ensure the new values are written to wherever they are sourced from so that they're available for the next time you visit this interface,