Welcome to the LimeSurvey Community Forum

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

Filtering a ranking question

  • GriesbachConsulting
  • GriesbachConsulting's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 months ago #190294 by GriesbachConsulting
Filtering a ranking question was created by GriesbachConsulting
I would like to have users choose from options before doing a ranking. I know, the ranking question already assumes that one choses and ranks just the options that are really of interest. But our tests showed that the users did the ranking for all options (not just for the important ones). That's why we would like to first ask for importance and then let them create a ranking for the this sub-selection.

I've tried the same mechanism as you posted above but there are two problems: 1. When clicking one option in the first selection it will immediately show all options for the ranking (not just the selection). 2. In the original survey I cannot change the relevance equation anymore because of another condition and the ranking question those not show the relevance equation for each subquestion.

It's similar to this thread: www.limesurvey.org/forum/can-i-do-this-w...oice?start=15#190291

The example is in the attachment.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #190296 by tpartner
Replied by tpartner on topic Filtering a ranking question
The array-filtering does work with a ranking question but the sub-question/answer codes must be identical in both questions.

Additionally, in your sample survey, I changed the relevance for the ranking question to count(that.Q1) > 1 because there's not much point in ranking a single item. :)



Sample survey attached:

File Attachment:

File Name: limesurvey...3151.lss
File Size:22 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • GriesbachConsulting
  • GriesbachConsulting's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 months ago #190311 by GriesbachConsulting
Replied by GriesbachConsulting on topic Filtering a ranking question
Thank you. It really works. The only problem I have is that the relevance equation cannot be changed in my larger survey, as there are conditions set (in this case only show this question if in the beginning told to have used the solution. Is there any way to still change the relevance equation? For example by deleting the conditions and first insert the count(that.Q1) > 1 and add the conditions afterwards?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #190314 by Joffm
Replied by Joffm on topic Filtering a ranking question
So, you used the condition builder?

Yes, that's the problem that you can't change.
Therefore we all recommend only to use the Expression Manager.
It's more powerful and more flexible.
You do not have to deal with scenarios or other things.
Just write everything needed into the relevance equation like
{(Q1_SQ001.NAOK=="Y" AND Q1_SQ003.NAOK!="Y") OR (Q2==7 AND countifop(">","4",that.Q5)>3) OR (sum(that.Q3.NAOK) lt 12)}
Okay, this is a silly example.
In your case
{count(that.Q1) > 1 AND Q1==5} or however the solution is selected.

The best is to delete the conditions and add everything by Expression Manager.

In my opinion this condition builder was implemented long before the Expression Manager, and it's still there.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • GriesbachConsulting
  • GriesbachConsulting's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 5 months ago #190382 by GriesbachConsulting
Replied by GriesbachConsulting on topic Filtering a ranking question
Thanks a lot. I've tried that but somehow if there are more than two answers it shows all the answers of Q1 and not just the selection. I attach the original question group. I really checked all the spellings and other potential mistakes. Any idea what could be wrong?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #190384 by tpartner
Replied by tpartner on topic Filtering a ranking question

I've tried that but somehow if there are more than two answers it shows all the answers of Q1 and not just the selection.

Are the answer/sub-question codes identical in both questions?

I attach the original question group.

Please only attach survey export files (.lss files) containing only the relevant questions. It's not fair to ask the volunteers here to spend time creating surveys to import your group or question files.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • GriesbachConsulting
  • GriesbachConsulting's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 5 months ago #190394 by GriesbachConsulting
Replied by GriesbachConsulting on topic Filtering a ranking question
Your absolutely right. Sorry for not creating a .lss file. In the meantime I saw the mistake myself. Not only the subquestions but the ANSWER CODES as well needed to be identical as you already wrote earlier in the thread. Again many thanks.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose