Hi,
first I recommend to read the manual about ExpressionScript.
[url]
www.limesurvey.org/manual/ExpressionScri...Quick_start_guide/en
[/url]
E.g. the BMI example.
And you also may download and study the sample surveys
[url]
www.limesurvey.org/manual/ExpressionScript_sample_surveys/en
[/url]
In this "Condition" box you enter a logical term which either displays the question or not.
If it is TRUE the question is displayed, if FALSE it is not displayed.
But you want to do something quite different.
You only want to display something in a question of type "text display".
So you enter your function into the question text.
And DON'T FORGET to surround with curly brackets.
And you'd better use numerical codes.
Then you may use:
{if(Residence.NAOK<3,"Europe",if(Residence.NAOK<4,"America","Asia")))}
And the age group?
Now you only display "1", "2", "3",... What for?
You#d better store the age group in a (hidden) question of type "list(radio)"
Here you have to assign the result to this question of type in a question of type "equation"
Let's call the questions "AgeGroup" and "eqAge" (eq=equation)
Well, AgeGroup with the answer options
1: younger than 25 years
2: 25-39 years old
...
in "eqAge" you assign the values according to your shown formula.
{AgeGroup=if(Age.NAOK < 25, 1, if(Age.NAOK <= 39, 2, if(Age.NAOK <=54 , 3, if(Age.NAOK <= 69, 4, 5))))}
Joffm