Template
Distinct value dropdown
Only allow values that haven't been chosen in dropdown
Industry:
n/a
This app shows how to make a dropdown that only has values that haven't been selected yet. In this example, we've got a table of equipment and a table of requests. We only allow requests to be made for equipment that has not yet been requested. Take a look at the sheet and try filling out the form to see the behavior.
Loading...
Also see:
tablet mode & fullscreen mode
How we built this app
To do this, we use a valid_if constraint on the Equipment column in the Request table. The formula we use is:
Equipment[Name] - SELECT(Request[Equipment], [Timestamp] <> [_THISROW].[Timestamp])
This formula returns a list of values. It includes all values in the Name column of the Equipment table that aren't the equipment for some other row in the Request table. Putting this formula in the valid_if constraint limits the user's choice to be in that list of values.
This is a preview of the data sets used in the app.
Data
This is a high-level model of both the data entities and the UI elements in the app.
Loading...