In this article you will learn...

  • How to conditionally change the content of a dropdown widget

To best understand this article, make sure you have understood the basics of Single or Multiselect widgets: Article.

Using the dropdown widgets can be very powerful, especially when leveraging arrays to populate them. But sometimes it is relevant to show different content to pick from, based on a condition. This can be achieved with a configuration table that contains the condition in the ID field as well as the different options comma-separated in the second field.

In a first selection widget, the downtime reason can be selected and with the click of a button, the respective dropdown options can be loaded from the table. A trigger to do this would look like this:

The comma-separated text corresponding to the selected downtime reason is loaded into the record placeholder. The 'Split String'-function saves them to the array 'Dropdown options'. This array is then populating the second single select widget.

When running the app, the second single select won't show any options as long as no downtime reason has been selected:

When a selection is picked in the first dropdown, and the trigger on the button is applied, the second dropdown is populated accordingly:

Did you find what you were looking for?

You can also head to to post your question or see if others have faced a similar question!

Did this answer your question?