Conditions by Script
Note: the original version of AskiaScript (version 1) has been superseded by
AskiaScript 2.0. For backwards compatibility with existing projects, AskiaScript 1.0 is still supported, but for all new scripting you should use AskiaScript 2.0, which is both considerably easier to use and more powerful. The following section of the Assistant describes AskiaScript 2.0. If you are working with an older project that includes AskiaScript 1 code, please refer to the
Appendix on AskiaScript version 1.
The conditions by script feature enables you to define sophisticated routing instructions. You can set up:
-
Simple conditions outside of the simple script builder interface;
-
Simple conditions based on a variable other than the Start variable;
-
Conditions using AskiaScript functions;
-
Conditions based on more than one variable.
Creating a condition by script
To create a condition by script:
- When editing your routing instruction, click
.
- Click
to open the condition dialog, where you define the condition. The interface to define the condition appears as follows:
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8xMTAwLzIyNTAvY2tmaW5kZXIvaW1hZ2VzL2ltYWdlKDEwMikucG5nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzgxOTcxOTM3fX19XX0_&Signature=BGfjKS5QbjujyMra4ri4a~kAZB9bcDZ~Ki~mlIEIAWkYX6WUyS8K-R9dzeHhBGK6vu40PI9wyWB-SLdBjXbVgMsHCLikQUtksK~YlzVrtlRR6cLjOXWYMaNHc-nQTzp0OQP1XAYU-GEaSi8e0WP8W1N8b3BFJaIBEYd4mQHT3oTULT3hCzsKosnrB2w4FWBjyz8olKN3cxvLwSBtjRXNtrWHpv4YgZZvdtJzBXR2gF~hTJRFK7CkSQ57lx52fF~CLyKrb2xMK1wdqLlkOHkg89zL~A2m3Nea0A0fKlBHnBbsWNbrmVzIC8ymnEnfjoAeV9155Nllpkym1bX75fPl8g__&Key-Pair-Id=K2TK3EG287XSFC)
- Use the condition dialog as described below.
Note: If you are familiar with the syntax of your condition, you can type it directly into the entry dialog. If you would like to add comments in your condition, use a single quotation mark before each comment, for example 'this is a comment.
Note: you can drag questions from the question list into the condition dialog, saving the need to type the question name.
Note: you can enter Unicode characters as part of your script.