0 votes
in SoSci Survey (English) by s145402 (125 points)

I created a random generator to show one of two questions when someone fills out the survey.
The codes are as follows:
1 = Neutral
2 = Environmental

The questions are labeled
OA05 Neutral
OA06 Environmental

When I go to the Compose Questionnaire section I followed the instructions to list the Random generator and then add a PHP code followed by the questions.
In this case:
if (value ('Neutral') == 1) {
question('OA05');
} else if (value ('Environmental') == 2) {
question('OA06');}

For some reason I keep getting "Variable Neutral is unknown to this project (see listing of variables). Therefore no result can be retrieved." and the same for Environmental variable.

I also added internal variables and I got the same issue. What I'm I missing? (first time user >_<)

Thanks in advance for your help!

1 Answer

0 votes
by s139847 (2.7k points)
selected by s145402
 
Best answer

Hi,

never fear, you're already very close! Instead of "Neutral" and "Environmental", use the actual ID of the random generator (my test generator e.g. is A105). Additionally, don't put the actual questions onto the page, they're called with question(), so you don't need to drag and drop them.

by s145402 (125 points)
Thank you so much! ^_^

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...