|
Post by danaleighton on Mar 6, 2021 23:47:10 GMT
I seem to be having trouble getting a "set" type question to assign a value of a variable if a condition is satisfied in the conditional logic. For example, this will work:
l: x t: set - if $someQuestion == 1 then A and set the value of $x to "A" -- but this will not:
l: x t: set - if $someQuestion == 1 then $somePriorQuestion the result of the set in that case, is that x will be set to "$somePriorQuestion" rather than than the value of $somePriorQuestion, which is what I would expect it to do. I have also tried {$somePriorQuestion}, calc ($somePriorQuestion), and other possible combinations, but no joy. it seems that the conditional set will only assign the actual text that follows the "then " to the question.
If this is the intended behavior, can I please make an enhancement request that the "then" branch be able to set based on calculations, etc.?
Maybe there is another way around this? I suppose I could use jump logic. FYI, here is some code I was trying to get working:
l: test t: set - random 1 2
l: t: jump - if $test == 2 then goto radio2
l: radio1 t: radio q: choose one radio1 - a - b
l: t: jump - goto test1
l: radio2 t: radio q: choose one radio2 - a - b
l: test1 t: set - if $test == 1 then $radio1 - if $test == 2 then $radio2
l: display t: info q: Here are the values: test= {$test} radio1= {$radio1} radio2= {$radio2} test1= {$test1}
|
|