Closed by single script (AskiaAnalyse)

Note: until version 5.3.5.5, this feature was called single by script.

This option allows you to create a closed question (single or multi-coded), by using the specified AskiaScript syntax. It has an advantage over the closed by script type, in that you can define one script that returns a number indicating the modality number (the index is 1-based), or a set of modality numbers for multi-coded questions, instead of having one script per modality. The easiest way to create the script is to paste in values from Excel or a tab-separated text file.

To access this feature, in the edit menu select create a variable..., then select single by script.

The following commands are available above the list of new responses:

Icon Name Description

Insert

Insert a new response item.

Delete

Delete the selected response item.

Move up

Move the selected response item upwards in the list. You can also drag and drop responses into the desired sequence.

Move down

Move the selected response item downwards in the list. You can also drag and drop responses into the desired sequence.

Paste

Paste a response item from the clipboard (i.e. create a new response item as a duplicate of the last item copied).

Click insert to insert a response, then specify a name for it by replacing the default name 'New'. To delete a response, click: .

Pasting in values for easy script creation

To paste in values, click  above the response list. Modalities can be pasted in from Excel or from a tab-separated text file (tsv) where each line has a caption and an entry code. The script is then created automatically from the pasted-in values. For example, imagine the text file contains the following:

Retailer1 > 10000
Retailer2 > 20001
Retailer3 > 10003

Where > is a tab character.

The resulting script would be:

FindIndexIn ( { 10000; 20001; 10003 } , CodeRetailerNum )

Create your own Knowledge Base