1. Introduction to scripts
Scripts are used to provide special functions that are not part of the built-in logical language of Q_Survey. Typically, these can be complex functions (like segment models), mathematical functions and API calls to external systems. Scripts can be used in filters, answer control and reference to questions.
In Research Studio, scripts were written in VB Script language. It had the restrictions that the number parameters to functions needed to match exactly. In addition, parameter values were interpreted, meaning that all special characters like "&", "+", "-" etc. could not be sent as a parameter value. That is why we had multiple versions of functions, like "sum2", "sum3", "sum4" in order to sum 2,3 or 4 numbers.
In Q_Survey (Azure) scripts are implemented in C#. Function names have been modified to follow a standard naming syntax, and in general functions do not have fixed numbers of parameters. E.g. script:Sum(1,2,3,4,5,6,7,8,9) will sum 9 numbers.
For compatibility the function names from Research Studio are still available, but we recommend that you change to the generic new function names.