Using Script Mode to define a variable (AskiaVista)

This topic describes how to define a variable using script mode, which gives you a great deal of power and flexibility, but requires that you understand AskiaScript syntax. You can also use assisted mode, which provides an easy-to-use way to define variables.

To use Script mode when defining a custom variable, simply type your script condition into the box. For a full description on the AskiaScript language, see AskiaScript. While you are editing your script, AskiaVista can check your script's syntax for you. To instigate this check, simply click Check variable.

Note: in no way does this validation imply that AskiaVista can verify a condition's logic, that is, whether or not it will have the intended effect. This check only confirms that the correct AskiaScript syntax has been used, and it is possible that logical errors in the syntax remain.

Example: variable created from a category question

Suppose we have a category question called Gender, and we want our variable to consist only of respondents who gave the answer Male. We would type the following script:

??i1. Gender?? HasAll {1}

You can use the following operators in your expressions (see the AskiaScript reference for details):

Create your own Knowledge Base