I have two sets of embedded data in the survey flow…
A1 A1ess
A2 A2ess
A3 A3ess
… …
A10 A10ess
I wrote some JavaScript that randomizes an array of text elements and stores the individual elements into A1 - A10. The other set of embedded data fields, A1ess - A10ess, are all set equal to zero in the survey flow. That part is working fine.
I then pipe A1-A10 into the statements of a matrix question that asks the user to rate each statement as essential, beneficial, or not necessary …
For all the statements for which the user rates them as essential, I want to change the A#ess data field to 1. A simple boolean flag indicating that this field has been rated as essential.
For example, if the third statement in the matrix question is rated as essential, then A3ess would be set equal to 1.
I’m floundering around trying to write some JavaScript to do this. Nothing is even close to working. Any help would be greatly appreciated.
Thanks