Skip to main content
August 1, 2024
Question

Help Needed: Multi-Select Dropdown with Pre-Selected Options and Dynamic Update

  • August 1, 2024
  • 7 replies
  • 0 views

Hi Community,

I have a requirement involving a multi-select dropdown in an Appian interface. Here's the scenario:

  1. First Screen:

    • I have a multi-select dropdown that is a mandatory field.
    • Users must select at least one option.
    • The selected options are saved in the database table, with each option stored in a separate row.
  2. Next Screen:

    • The same multi-select dropdown is presented, but it is not a mandatory field.
    • When the page loads, it should pre-select the options that the user selected in the previous screen (fetched from the database).
    • The current user should be able to select more options or deselect previously selected options.
    • Upon submission, the form should save the updated selections.

I am looking for guidance on how to:

  • Pre-select the options in the multi-select dropdown based on the user's previous selections.
  • Allow users to dynamically update their selections (add or remove options) and save these changes.

Any help or examples on how to implement this would be greatly appreciated.

Thank you!

7 replies

stefanhelzle0001
August 1, 2024

The selected items in any dropdown are defined by the "values" parameter.

Do you already have any code to share?

August 2, 2024

Apologies for the late reply, Stefan, and thank you for responding. I have opted for an editable grid instead of multiple dropdown fields, as the latter makes it very complicated.

August 6, 2024

you mentioned it was a mandatory field , how did you replaced a multiple dropdown component with an editable grid?

November 28, 2024

Sorry for the very late reply. I swapped the multiple dropdown component for an editable grid by adding a dropdown field to the grid. I made the dropdown field mandatory, so users must select a value before moving on. Let me know if you need more details!

prasantap0900
August 5, 2024

You can query the previous data you have, and set the data with the help of a!defaultValue function. 

rajnis1428
October 30, 2024

Hi [mention:50e3255798df4b9dab66e972c17a0eb4:e9ed411860ed4f2ba0265705b8793d05] 

Did you solve the your 2nd problem? How is it?

Please reply...

Thank you

November 28, 2024

Sorry for the very late reply. I replaced the multiple dropdown component with an editable grid that includes a dropdown field. The dropdown shows pre-selected values from the previous screen (fetched from the database), and the user can add more options or remove previously selected ones. Let me know if you need more details!