Dropdown from Valid_If

AppSheet displays a dropdown for fields having a Valid_If constraint that yields a list of values.

 

The Valid_If expression can be:

1. A List of Constant Values

For example: {100, 200, 300} 

Whenever a list of allowed values is provided, it is actually a syntactic shorthand for an expression that uses the IN function. For example, {100, 200, 300} is the same as IN([_THIS], {100, 200, 300}).


2. A List of Values from a Column in Another Table

For example: LookupTable[ColumnC]

Where "LookupTable" is the name of the table containing the dropdown values, and "ColumnC" is the name of the column containing the dropdown values.

This is particularly useful if the list of allowed values can change while the app is being used.

3. A List of Values from a Column in Another Table Where the Rows in that Table are Filtered

For example: SELECT(LookupTable[ColumnC], [ReportDate] > Today() - 7) 

Where "LookupTable" is the name of the table containing the dropdown values, and "ColumnC" is the name of the column containing the dropdown values. "[ReportDate] > Today() - 7" is an expression which filters the rows in the table to those where ReportDate is within the last week. The resulting values in ColumnC of LookupTable become the allowed list of valid values.

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.