Help Center / Variable / Using Variables

Using Variables

Using Variables

  • Rich Text Box: The rich text box is the input box in the questionnaire editor whose border turns purple when it gains focus. Variables can be inserted into it. If the border of an input box turns blue when it gains focus, it is a regular input box and variables cannot be inserted into it.
  • Carry Forward: Select variables from the variable panel that pops up during option reference.

Variable Selector

  • System Variable Group: Contains all system variables.
  • Explicit Variable Group: Classifies variables by type and divides the explicit variables of the questionnaire into multiple explicit variable groups, with each group containing variables of the corresponding type added in the variable panel.
  • Implicit Variable Group for All Nodes: Each node in the node name list can output a set of variables, known as implicit variables.

Using Variables in Rich Text Boxes

  • Inserting the System Variable/Basic/Questionnaire ID in question text will show the variable being resolved to the current questionnaire's ID.
  • Inserting the variable All Options/Number of Options extracted from a previous multiple-choice question will show the variable's value being resolved to the number of selected options in subsequent questions when certain options are selected for this question.

Numeric Spinner Control

  • N: Numeric input mode, allowing direct numeric input.
  • V: Variable input mode, where the numeric input box transforms into a rich text box, enabling variable insertion in the same way as in rich text boxes.

Using in Carry Forward

Additional Variable Settings

Variable Restriction Rules

  • In a question node, only implicit variables from questions before the current question node can be referenced, and those after the current question are not displayed.
  • If an implicit variable of a question node is referenced in an explicit variable, then no questions before this question can reference this explicit variable.
  • Media variables can only be referenced in places that support media display.
  • HTML variables can only be referenced in places that support HTML rendering.
  • If a variable contains an error, it cannot be referenced.

Resolving Null Values