Actions

Created: - Updated:

This article covers these topics:

Introduction to actions

When a condition is fulfilled (evaluated true), one or more of the following actions can be executed:

Action Description
show Show question. Only valid for preconditions, where it is also the default action.

skip

Synonymous to go-to-next.

gotonext

Go to next question. The preconditions of the following question will then be evaluated.

gotoprevious

Go back in the survey to the previous question. This is equal to pressing the back button on the phone.

goto(Qref)

Jump to a specific question, the question reference could be a variable

setans(Qref,value,type)

Set the answer of a specific question to a specific value. For more info check Shared lists.

setvar(varname,value)

Set a runtime parameter. Note that setvar will continue the evaluation after execution, while the rest of the actions will execute and stop the evaluation.

setglobal(varname,value)

Set a variable. Note that setvar will continue the evaluation after execution, while the rest of the actions will execute and stop the evaluation. 

Combining multiple actions in one condition

You can combine multiple actions in the same condition. To do so, simply list all the conditions one after the other, separated by semi-colons.

Note: all actions in the condition will be executed if the condition evaluates to true, and they will be executed in no particular order. Therefore, you should not use dependent actions in the same condition.

For example:

<postcondition="answer(Q3)==2" then="setvar(test44,44blabla);setvar(test55,55blabla);setvar(test66,66blabla)"/>