The section describes how to include syntax in your multicontrol table to control the conditions under which the table rows are shown. It is NOT possible to insert show-if logic on question table columns. Show-if is only supported on rows of a question table.
The syntax below can be entered while on the Rows tab of the multicontrol editor, in the show-if field. Example: GENDER _eq_ 1. This syntax would cause the row to show if Gender equals 1.
Row Elements
Attribute Name | Required | Values |
showIf | No | This is a simple ShowIf expression of the form:”variable” “op” “value”, where “variable” is the name of a survey variable, “op” is an operator as listed below, and “value” is the value of the variable”op” is any of the following operators:‘_eq_’ is equals‘_ne_’ is not equals
‘_lt_’ is less than ‘_gt_’ is greater than ‘_lteq_’ is less than or equals ‘_gteq_’ is greater than or equals ‘_ans_’ is answered ‘_nans_’ is not answered “value” is a required value except if the _ans_ or _nans_ operators are used. |
NOTE: For show-if logic based on check box items, the appropriate format is GENDER_eq_True rather than GENDER_eq_1
If the show-if conditions for a row are based on more than one variable, it is not possible to concatenate this syntax for two variables. Rather, you must create a calculation that outputs to true under your conditions, and then use that calculation in your show-if logic.
For example, let’s say a row is to show if Gender = 1 and if Age=18. You need to create a calculation (we’ll name that calculation “GENAGE_CALC”) such as
(({Value:GENDER}=1)&&({Value:AGE}==18))?1:0
This calculation will output a “1” if the two conditions are met. Next, in the show-if field of the multicontrol table editor, you would insert:
GENAGE_CALC_eq_1