Create dynamic dropdowns with values that change based on conditions
Dynamic Lookup Widgets are a powerful tool for allowing users to select values from a predefined set of options that can change based on conditions or other inputs. This guide walks through setting up and using dynamic lookup widgets.
In the data source field, input the ID of the equation widget you created in step 1. This ensures the dynamic widget pulls its options from the correct source
Decide on a default value that should be presented to the user initially
2
Use matrixSubset
Use matrixSubset to select the first value from the matrix created in the equation widgetExample: matrixSubset(t_avail, 0, 0) selects the first element
This formula selects the first element from the t_avail matrix to be the default value.
Always provide a sensible default value using matrixSubset
Hide the data source equation widget to keep the interface clean
Test all possible conditions that affect the dropdown options
Use descriptive labels for both display text and underlying values
Consider performance impact with very large option sets
Document the data structure in authorNotes for future developers
Ensure your data matrix structure is consistent across all conditions. Inconsistent matrix shapes can cause errors when the dynamic lookup widget tries to process the data.