Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Asking questions based on user ID

  • Ecoban
  • Ecoban's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #207194 by Ecoban
Asking questions based on user ID was created by Ecoban
Hi,

I have a long questionnaire in which I am asking same questions with different wordings to assess the differences in the answers to the same questions in terms of their context. I do not want tyo create two different surveys, and simple want to ask some certain questions to the participants with even id numbers, and other questions to participants with double id numbers.

The first 25 questions are the same for everyone, and I want to ask 26th question only those with even id numbers and 27th question to only those with double id numbers.

Is this simply possible with limesurvey?

Thank you.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #207197 by Joffm
Replied by Joffm on topic Asking questions based on user ID
Hi, Escoban,
what is the id number?
I assume it is a closed survey with a participants table.
You do not have direct access to this participants id, but you may double it as an additional attribute.
Then you use the relevance equation in your survey.
In my opinion easier - and also working in an open survey - is the use of the id in the reponse table {SAVEDID}.
As there is no direct formula to decide if a number is even or odd, it would something like floor(SAVEDID/2)==SAVEDID/2. If true it is even else odd.

The third option (and the usual approach to this) is to create a random number (1-2) at the beginning and then use relevance equation to ask either the 26th or the 27th question.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose