The way I've setup my Likert5 answers, each answer code is A1..A5.
All questions are mandatory, so there will be an answer for each.
My summary Equation Question then computes the totals for a particular set of questions, for example:
{sum(if(C1AQ1=='A1', 1, 0),if(C1AQ1=='A2', 2, 0),if(C1AQ1=='A3', 3, 0))}
This works, but if you look at it, 'A1' == 1 and 'A2' == 2. I have 10 questions per section when means I will have 50 equations to add 10 values.
If I could use something like preg_replace('[^\d]','', C1AQ1) the answer would produce 1..5 as desired.
The resulting equation would then be {sum(preg_replace('[^\d]','', C1AQ1),preg_replace('[^\d]','', C1AQ2), etc.)}
While I can write the 50 equation solution, is there a way to simply extract the integer value from the answer?
Dave Phillips
The topic has been locked.