Summary

This command returns the question that corresponds to the variable specified in the name parameter, or it returns “No question” when there is no question stored for that name.  


When using this command, the instruction setVarQst should be used in the export configuration to fill the variable with a question.


Note: This script command is intended to be used with the custom export instruction script. In all other cases, this command will return no question.


Attributes

  • None

Parameters

  • name – name of the variable

Example

In the following example, the custom export instructions “script” and “setVarQst” are used in conjunction with the script “scriptSampleVarQst”. For this example we assume that we have a form with type ‘simpleForm’ that contains a question with alias or type ‘simpleA’.

Form Type IdQuestion IdInstructionValueColumn NumberColumn TitleData Type
simpleFormsimpleA
$>
setVarQst
$>script
qstVar
$>scriptSampleVarQst
2COL2String


<script scriptId="scriptSampleVarQst" >
        <body>
                   <s:if>
                        <s:isSet>
                            <s:question>
                                  <s:varQst name="qstVar" />
                            </s:question>
                        </s:isSet>
                        <s:string value="Question is set" />
                        <s:string value="Question is not set" />
                   </s:if>
        </body>
</script>

The output of the script “scriptSampleVarQst” is either “Question is set” or “Question is not set” depending on whether or not question simpleA is set on form simpleForm. 


Need more help?

Please visit the Fountayn Contact Information page.