Hide If Expressions


"Hide If" expressions can be used to conditionally hide Headers during data collection.

Hide If expressions need to be written as Boolean (True/False) conditions. If the condition returns True, the Header will be hidden on the data collection Form.

Character Limits

"Hide If" expressions can contain a maximum of 3900 characters.

Examples

The following examples show expressions that can be used to hide the specified Headers under the given condition:

This expression will only show the Sample Diameter field if the Type is 'U':

Header: Sample Diameter

[Type] <>'U'

This expression will hide the Sample Depth Base field if the Type is 'U' or 'P':

Header: Sample Depth Base

in ([Type] ,'U', 'P')

This expression will hide the Sample Diameter until the Type has been entered:

Header: Sample Diameter

isnull([Type])

This expression will show the Sample Diameter if the Type is U, UF, TW, TWF, P PF or U/38.  Note the use of NOT turns the expression from a “hide if” into a “show if”:

Header: Sample Diameter

not in([Type], 'U', 'UF', 'TW','TWF','P','PF','U/38')

This expression combines the last two examples. It shows the Sample Diameter if the Type is U, UF, TW, TWF, P PF or U/38 and doesn’t show the field if a Type has not been entered. Note: Make sure the isnull() condition is the first condition (known issue).

Header: Sample Diameter

isnull([Type]) or not in([Type], 'U', 'UF', 'TW','TWF','P','PF','U/38')
Please also see the Data Collector Profiles within our standard Configuration Packs for additional examples.
 
And please see this article for more information on other Data Collector Expressions.