Hi,
you did not say, how you coded the answer options.
I show it with numerical codes, like
0: 0, 1: 1, 2: 2; 3: 3, 4: 4+
What do you want to do?
You want to sum up the values in red of the selected answer
So this means:
If the answer code of the first item is 0, sum 0, if it is 1, sum 3, if it is 2, sum 7, if it is 3, sum 10, else sum 14.
Here the "else" is allowed because your question is mandatory.
Same with second, third item,...
Translated into the IF-statement:
{IF(F5_F501.NAOK==0,0,IF(F5_F501.NAOK==1,3,IF(F5_F501.NAOK==2,7,IF(F5_F501.NAOK=
,10,14))))}
Now you have the value of the first item.
now you use the sum-function
{sum(item1,item2,item3,...)}
You find these implemeted functions in the manual:
manual.limesurvey.org/ExpressionScript_-...mplemented_functions
Now we combine it.
In a question of type equation (let's call it SumF5) you enter (linefeeds here only to display better):
{sum(
IF(F5_F501.NAOK==0,0,IF(F5_F501.NAOK==1,3,IF(F5_F501.NAOK==2,7,IF(F5_F501.NAOK=
,10,14)))),
IF(F5_F502.NAOK==0,0,IF(F5_F502.NAOK==1,3,IF(F5_F502.NAOK==2,7,IF(F5_F502.NAOK=
,10,13)))),
IF(F5_F503.NAOK==0,0,IF(F5_F503.NAOK==1,3,IF(F5_F503.NAOK==2,5,IF(F5_F503.NAOK=
,8,11)))),
...
IF(F5_F512.NAOK==0,0,IF(F5_F503.NAOK==1,2,IF(F5_F503.NAOK==2,2,IF(F5_F503.NAOK=
,2,2))))
)}
Now the sum of all your items is stored in the code of this question and you can use it later by {SumF5}
Remember: If you did not change the answer codes and still use this "A1", "A2", ... you have to adapt the function (now you compare with a text) to
IF(F5_F501.NAOK=="A1",0,IF(F5_F501.NAOK=="A2",3,IF(F5_F501.NAOK=="A3",7,IF(F5_F501.NAOK=="A4",10,14))))
Joffm
By the way:
What does the "(from/to)" mean?