How To use Functions Across a Script using the Advanced Scripts section


While scripting a survey you may find out that a certain capability/calculation is needed across the survey (not only in one or two questions). For example a validation rule that repeats itself across many questions like phone number consistency. The Advanced scripts section of the script is meant to contain such functions. Once you’ve written a function in the advanced scripts, you can call that function from anywhere in your script, just by using the function’s name and its parameters (if exist).
This How-To will explain and show how you can set self-made functions in the advanced script and use them in your survey.

Step 1: Add the needed function to the ‘Advanced Scripts’

  1. Click on the ‘Script’ tab.
  2. Click on the ‘Advanced Scripts’ button.
  3. Add the self-made function.

Step 2: Use your self-made function in you survey 

  1. For example you can use your function as a Validation rule
  2. For example you can use your function in the Start/End script of the specific question you want that calculation to be executed.

That’s it!

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request



Please sign in to leave a comment.