Welcome to the LimeSurvey Community Forum

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

Removing options from Ranking question when pulling through previous answers

  • kathryncarpenter
  • kathryncarpenter's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 4 months ago #232757 by kathryncarpenter
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 3.28.31
Own server or LimeSurvey hosting:
Survey theme/template: Vanilla
==================
Hi all,

I have a multiple text entry question with six boxes (not mandatory)

I then have a ranking question with a list of pre-defined options. I would like to add the responses to the six text box questions if they are filled. 

I am currently using this code in the answer options of the ranking list to hide or show the answer from the multiple short text. E.g. to pull text box 1 into the ranking I'm adding an answer option:

{(if(OtherBMetrics_Other1 != "",OtherBMetrics_Other1.shown))}

This works fine to pull through the text, but if nothing is entered into the multiple short text box, I'm getting blank options in the ranking list. How do I hide the ranking option if the corresponding multiple short is blank?

Thanks In advance,
Kathryn

Please Log in to join the conversation.

  • kathryncarpenter
  • kathryncarpenter's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 4 months ago #232759 by kathryncarpenter
I also tried
{(if(OtherBMetrics_Other1.NAOK != "",OtherBMetrics_Other1.shown))}

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 4 months ago #232768 by Joffm
Hi,
it's always the same procedure.
Use a (hidden) multiple question and a (hidden) equation.
Preset the multiple question by the equation and use it as array filter for the ranking.

 



 

File Attachment:

File Name: limesurvey...7512.lss
File Size:27 KB


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • kathryncarpenter
  • kathryncarpenter's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 4 months ago #232792 by kathryncarpenter
Many thanks Joffm, this worked perfectly.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 4 months ago #232822 by tpartner
I don't understand the need for a hidden multiple-choice here. Can you not simply place an array-filter in the ranking dependant on the multi-text?

Sample survey attached:  

File Attachment:

File Name: limesurvey...2(1).lss
File Size:21 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 4 months ago #232825 by Joffm
@tpartner,
to be honest, this seems to be due to an age-related stubbornness.
You get stuck on certain things 

You are absolutely right.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose