0 votes
in SoSci Survey (English) by s110836 (120 points)

Hi there,

I am currently stuck with random generator. I would like to have the questionnaire randomly distributed, and people in the Treatment Group should answer question VE07, and VE08 for those in the Control Group. But all other questions and procedures are exactly the same.

Here is what I did: on page 2,

First I created a random generator question, ID is RG01;
codes are:
1 = Treatment Group
2 = Control Group

Then, under this question, I inserted a PHP code:

if (value('RG01') == 1) {
question('VE07');
} else {
// You may omit the else part,
// nothing happens here
}

Lastly, both questions VE07 and VE08 are listed on below on the same page.

However, the result looks ridiculous, question VE07 appears twice, and I have no idea how to solve this, could you please help me with this problem?

Best,

Ji

1 Answer

0 votes
by SoSci Survey (304k points)

Try this one, please

if (value('RG01') == 1) {
  question('VE07');
} else {
  question('VE08');
}

And then (that's the important part) make sure that you DO NOT have the questions VE07 and VE08 dragged into the questionnaire page. If you have already dragged them there, please remove them: Problem solution for filters (Top 3).

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

...