Previous Next

Fields and groups in your survey can be shown – or not – depending on the conditions you set for their relevance. (In other settings, "skip patterns," "branching," or "filtering" terminology is used for this kind of logic.)

In the form designer, you can control the relevance settings whenever you add or edit a field or group. There is a built-in wizard that will help you to add one or more common conditions (for example, "the gender field is equal to the text value 'F'").

In the spreadsheet form definition, you can enter an expression into the relevance column to control when the field or group should display. It will then show up to users only when that expression evaluates to true; otherwise, it will remain hidden (and its response will be empty).

Typically, whether a question displays will depend on the responses to prior questions. For example, you might ask for informed consent at the beginning of your survey. Then, for all remaining questions, you might want to include "${consent} = 1" in the relevance column. That way, all remaining questions are automatically skipped when consent is not given. Another approach is to enclose all consent-requiring questions within "begin group" and "end group" rows, then specify the relevance expression on the "begin group" row – so you only have to enter the expression once (see Grouping and repeating questions).

Of course, there may be multiple criteria for displaying a certain question. For example, the relevance expression for a question about the fourth household member might look like "${consent} = 1 and ${nhhmembers} > 3".

The easiest way to build a relevance expression is to use the wizard built into the form designer, or to use the relevance-builder on the server's Design tab: select Tools, then Build relevance in the Your forms and datasets section.

For details on hand-creating or hand-editing relevance expressions, see the Using expressions in your forms help topic.

Please note that all relevance expressions are only evaluated once, when a screen is first displayed. Thus, if you use a "field-list group" to display multiple questions on one screen, one question cannot appear or disappear based on the answer to another question that appears above it on the same screen. To implement skip patterns, questions must appear on separate screens.

Previous Next