- Posts: 22
- Thank you received: 0
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
- Topic Author
- Offline
- Junior Member
Less
More
4 years 3 months ago - 4 years 3 months ago #192147
by BOBYJAMES
ranking based on a previous array question was created 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
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
Attachments:
Last edit: 4 years 3 months ago by BOBYJAMES.
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10630
- Thank you received: 3696
4 years 3 months ago - 4 years 3 months ago #192150
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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.
- 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
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
- Thank you received: 0
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..
- 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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12779
- Thank you received: 3940
4 years 3 months ago #192225
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
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
{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
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
- Thank you received: 0
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....
its working as you said....
The topic has been locked.