Summary

This article defines the instruction script. 

Table of Contents


Instruction script

Overview

This instruction calls a script that can be used for custom exports. In addition to normal script commands, the script can also access string variables and question variables. String variables are accessed with the scripting command varString, and question variables are accessed with the scripting command varQst.

All variables that the script will access need to be set prior to running the script. When using the command “varString,” the instruction setVar must be used in the export configuration. When using the command “varQst,” the instruction setVarQst must be used in the export configuration.

Note: The script commands varString and varQst and the export instructions setVar and setVarQst can only be used with custom exports.


Question Id

Unused.

Instruction

Required. Lists the Instructions used.

Value

Required. Value of the script to evaluate.

Input value

Unused.

Examples

In the following example, the string “Successfully” is written to the variable, scriptVar, and the script, scriptInstr, is called.

Form Type IdQuestion IdInstructionValueColumn NumberColumn TitleData Type
 const
$>setVar
$>script
 “Successfully”
$>scriptVar
$>scriptInstr
 18 SUCCESSFUL

The script, scriptInstr, uses the ‘varString’ command to access the value of scriptVar. The script will return “Script testScript -Successfully- exported.”

<script scriptId='scriptInstr' >
<body>
<s:concat>
<s:string value='Script testScript -' />
<s:varString name='scriptVar' />
<s:string value='- exported' />
</s:concat>
</body>
</script>



Need more help?

Please visit the Fountayn Contact Information page.