Skip to content

Trigger Schema

Triggers run actions when an expression becomes true. Prefer simpler properties like visibleIf, enableIf, setValueIf, and setValueExpression unless a root-level trigger is specifically needed.

  • setvalue — set a question value
  • copyvalue — copy one question value to another
  • skip — skip to another page
  • complete — complete the form
  • runexpression — calculate an expression and optionally store its result
{
"type": "setvalue",
"expression": "{sameAsBilling} = true",
"setToName": "shippingAddress",
"setValue": "Same as billing"
}
  • Type: string
  • Required: Yes

Trigger type.

  • Type: expression
  • Required: Yes

Boolean expression that activates the trigger.

  • Type: string

Question or calculated value name to update.

  • Type: value

Value assigned by a setvalue trigger.

  • Type: string

Source question for a copyvalue trigger.

  • Type: boolean

Copies the displayed text instead of the stored value for a copyvalue trigger.

  • Type: string

Page or question name used by skip-style triggers.

  • Type: expression

Expression evaluated by a runexpression trigger. If setToName is provided, the result is stored there.

  • Type: boolean

When true on a setvalue trigger, stores the value as a survey variable instead of a question answer.

{
"triggers": [
{
"type": "complete",
"expression": "{screenOut} = true"
}
]
}
{
"triggers": [
{
"type": "copyvalue",
"expression": "{sameAsBilling} = true",
"fromName": "billingAddress",
"setToName": "shippingAddress"
}
]
}
{
"triggers": [
{
"type": "skip",
"expression": "{hasIncident} = true",
"gotoName": "incidentDetails"
}
]
}
{
"triggers": [
{
"type": "runexpression",
"expression": "{quantity} notempty and {unitPrice} notempty",
"runExpression": "{quantity} * {unitPrice}",
"setToName": "lineTotal"
}
]
}
  • Prefer visibleIf, enableIf, requiredIf, setValueIf, setValueExpression, and resetValueIf for local question behavior.
  • Use root triggers for survey-level actions: completing early, jumping focus, copying answers, or storing a computed result when an expression becomes true.
  • Trigger expression is always the activation condition. runExpression is the calculation performed by a runexpression trigger.
  • Use Completion Behavior for complete triggers and post-submit messages.