Welcome to the LimeSurvey Community Forum

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

ranking based on a previous array question

  • BOBYJAMES
  • BOBYJAMES's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 3 months ago - 4 years 3 months ago #192147 by BOBYJAMES
Thanks in advance


How can we rank a question based on the previous array question-answer option

eg.


q2. please rate


like ----dislike--- nothing

1. s-- *
2. d -- *
3. g --*
4. f
5. a


q3. rank liked products

1. s
2. d
3. g



we only need answers select "like" option in q2...
normally we put code q2 in array filter option of question 3 .. but how we display answers who select "like" option in q2

please look the attachement
Last edit: 4 years 3 months ago by BOBYJAMES.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 3 months ago - 4 years 3 months ago #192150 by tpartner
Replied by tpartner on topic ranking based on a previous array question
There is no array-filter for ranking questions so you will need to...

- Place q2 and q3 in different groups.

- Insert a hidden (via CSS) multiple-choice question (qHidden) after q2 with identical sub-questions as q2.

- Insert a hidden (via CSS) equation question (qEquation) after qHidden.

- Place Expression Manager code in qEquation that uses the assignment operator to set the check-boxes depending on the array values.

- Activate an array-filter in q3 based on qHidden.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 3 months ago by tpartner.
The topic has been locked.
  • BOBYJAMES
  • BOBYJAMES's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 3 months ago #192223 by BOBYJAMES
Replied by BOBYJAMES on topic ranking based on a previous array question
- Place Expression Manager code in qEquation that uses the assignment operator to set the check-boxes depending on the array values.

- Activate an array-filter in q3 based on qHidden.[/quote]


Thanks for your reply

can you please explain this quoted section. am a starter for this lime survey.. how can we write the code for filter the "liked" answer options and where we place it..
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 3 months ago #192225 by Joffm
Replied by Joffm on topic ranking based on a previous array question
Place something like this in question text of qEquation:
{qHidden_SQ001=if(Q1_SQ001==**code of "like"**," Y","")}
Same for SQ002, and so on.

Study the demo surveys, which you can download (in manual), and which are in the demo installation.
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • BOBYJAMES
  • BOBYJAMES's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 3 months ago #192257 by BOBYJAMES
Replied by BOBYJAMES on topic ranking based on a previous array question
Many thanks..

its working as you said....
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose