Script nodes typically contain code for:
- Internal programming purposes.
- Defining functions used in code masks, conditions, text substitution, other script nodes or validation code.
- Assigning values to different variables.
- Performing actions such as sending an email, redirecting the respondent to a different URL, etc.
Setting complete status before the end of the survey
Sometimes you want the "complete" status to be set before the last question (e.g. an open text "Other comments"-question), so that a respondent will be treated as a complete even though the last question(s) has not been answered. This can be done using the SetStatus function (go to GetStatus and SetStatus for more information), in a script node:
SetStatus("complete");Figure 1 - SetStatus function