Make a Question Conditionally Optional Or Conditionally Mandatory
Sometimes, it may be unnecessary or undesirable to force people to provide answers to certain questions, so you can choose to make answering certain questions optional. You can make a question conditionally optional or conditionally mandatory, depending on the value of another attribute (true, false, certain, uncertain, unknown, or a particular value in a value list). This attribute may be an existing attribute, or, if there is more complexity in the logic, you may need to create a rule proving a new attribute that controls the logic of when the input should be optional or mandatory. The attribute that you use to control the state of the input can even be collected on the same interview screen. This enables you to design dynamic interview screens which instantly respond to the interview user's answers. Note that this feature requires JavaScript to be enabled in the interview user's web browser.
To make a question conditionally optional or conditionally mandatory:
- On the Interview tab, select the input in the screen list or screen layout view.
- Click the control state button (the button has an icon with three horizontal blue rectangles
). - In the drop-down window, in the drop-down list next to the Optional if link, select the attribute that you want to use to control whether the input is optional or mandatory.
- Specify if the input is to be optional or mandatory based on the value of the attribute by clicking the Mandatory if or Optional if link.
- Specify the value that is to determine if the input is optional or mandatory. To do this:
- For Boolean attributes, click the is <value> link after the attribute drop-down and select from is true, is false, is certain, is unknown or is uncertain.

- For non-Boolean attributes (populated by a value list), click the is <value> link after the attribute drop-down and select from is, is not, is one of or is not any of. Then in the drop-down after the is <value> link, select the value or values in the value list.
- For Boolean attributes, click the is <value> link after the attribute drop-down and select from is true, is false, is certain, is unknown or is uncertain.
The input in the screen layout view is updated to indicate when it will be optional or mandatory.
Note that:
- Hide If, Read-only If and Optional If are applied in this order in an interview. That is, the only way an input would be Optional If is if the Hide If and Read-only If attributes evaluate to something other than true.
- The control attribute can belong to the same entity as the control or to any of its ancestors.
- The value of the control attribute can not be temporal.
- In August 2016 version interviews, only Boolean and value list answers can be used to drive dynamic state. In Latest Version interviews, rules that need data on the same screen can be used to set the control state attribute.