10.3 and 3.1 How To Include Multiple Question Group Answers on Pass Template
Problem
Can you include multiple question group answers on one Pass Template? If so,
a) What if we would like to include each question answer in a different field on the Pass Template?
b) What if we would like to include all question answers in one field on the Pass Template?
Solution
a) If you have multiple questions for which you wish to print answers on the card; and you want each answer in its own moveable field use the Syntax found in the MultiQ_MultiField.txt file (attached).
b) If you have multiple questions for which you wish to print answers on the card; and you want all of the answers in one Misc Text object, use the Syntax found in the MultiQ_SingleField.txt file (attached).
The logic at work in the two files is as follows:
MultiQ_MultiField.txt
- In any given pass template you can only call the variable qAns one time. If you wish to pull multiple answers on a template; each additional answer must use a different variable. The easy way to do this is to add 1,2,3,etc to the end of the variable for each question (Example: qAns1, qAns2, etc.). This variable must get changed in the initial variable definition, as well as the answer string.
- You will also notice that in the syntax for answer number one Z is specified as the variable; whereas in the syntax for answer number two, Y is specified as the variable. This again is because a pass template cannot pull two of the same variable on one print job.
- Any letter can be used to in the place of x, y, z, etc. You just have to define which variable is which.
- The only other item you will have to update is the specified question/answer number in the if statement for each answer syntax.
MultiQ_SingleField.txt
- Essentially we are combining the Syntax from the first method with one small twist. At the end of each set of syntax there is a line of code that reads: x = z (z being the defined variable). If all answers are being entered in one field, remove this line from each piece of syntax. At the end of the code for this we will add a line that reads: x = z + y + a (where z, y, and a are the answer variables).
- By default this syntax will place each answer on its own line. If you would like all answers on the same line I think you just have to remove the following from each answer syntax: + chr(13)
See Attachment: MultiQ_MultiField.txt
See Attachment: MultiQ_SingleField.txt