Displaying different text upon recall of an answer
Problem
You want to recall a previous response but display text that is different from the original answer.
Solution
Use the ALIAS feature of answer categories and a recall which uses the ALIAS number.
Discussion
It is sometimes useful to recall a label other than the one displayed originally when asking the question. For example, say you ask the following question:
and you want to the follow-up question to read Was this accident... in the first case, Was this incident... in the second case and Was this event... in the third case.
You could create a second CALCUL question to compute a synonym and recall these labels or you could use the EXECUTE syntax and the Perl ternary operator to display a label conditional to the previous answer. But there is a simpler solution: label aliases.
In the example above, one would code the intial question as follows:
and use the following recall in the subsequent question:
The &Q1 recalls the answers from Q1 and the #1 states that ALIAS1 must be used. If one category did not possess an ALIAS1, the standard label would be displayed. There can be more than one alias on any given code; the one corresponding to the recall number is displayed.