Welcome to the LimeSurvey Community Forum

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

Displaying 1 of 3 questions in a question group randomly

More
3 weeks 5 days ago #274016 by LukrecjuszLiżma
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Cloud [url=https://lukrecjuszli--ma.limesurvey.net/admin/user/sa/personalsettings#modalSystemInformation] Version 6.16.14 [/url]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
I have trouble with displaying one of three questions, I already followed guidelines on randomization and everything looks neat but the problem still occurs. 

Please Log in to join the conversation.

More
3 weeks 5 days ago #274017 by holch
You should tell us what the problem is. You just say there is a problem, but what is it? What did you try? What was the outcome?

The LSS file helps, but can only tell so much.

Will have a look at it later.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

More
3 weeks 5 days ago #274018 by holch
Very difficult to help you when you provide a questionnaire in a language that most of us don't speak and also do not delete the unnecessary parts.

I assume the questions you want to show 1 out of 3 randomly are the ones in the last question group? "Przykładowa sytuacja nr.1"?

So you created a question called "Randgroup". I assume that is where things should happen?

But it is at the end of this group, it is empty and it is referred to in questions that are before it, like in this relevance equation:
Code:
(ZGODa.NAOK == "Y") and (!is_empty(Q002.NAOK) && Q002.NAOK >= 18) and (RANDGROUP== 1)

So you only want to show this question if Randgroup==1. But Randgroup contains nothing in your example. So it can never be 1.

Also, Q002 is a text question, so the answers are stored as a text, but you want to compare it as a number. That might be another issue.

So there are a couple of issues going on.

Maybe you can create a dummy survey in English with only the questions relevant for this problem, so we can actually understand what you are trying to do? I find it very hard to understand your survey.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

More
3 weeks 5 days ago #274026 by LukrecjuszLiżma
Here is the dummy survey, containing only the questions related to the problem. I changed the text question to a regular one hoping this might solve part of the issue. Instead of showing one of three questions from randomised pool, the survey shows only the name of question group and no questions at all. What I am trying to achieve here is the survey showing randomly one of three questions in the question group, possibly with them being shown in proportions 1:1:1.

Thank you kindly for your help.

Please Log in to join the conversation.

More
3 weeks 5 days ago - 3 weeks 5 days ago #274027 by Joffm
Your "equation" is wrong. 

An equation is surrounded by curly brackets -> {rand(1,3)}
Better you use the construct that holch showed {if(is_empty(RANDGROUP),rand(1,3),RANDGROUP)}

And instead of using the conditon agreement.NAOK == "Y" and !is_empty(age.NAOK) && age.NAOK >= 18 in all following groups
(where you do not need !is_empty(age.NAOK) - if the age is >17 it is obviously not empty)
you'd better use a quota

Joffm
BTW: In my opinion it's better to place the equation in the question text insted in the setting "equation"

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 weeks 5 days ago by Joffm.

Please Log in to join the conversation.

More
3 weeks 2 days ago #274053 by LukrecjuszLiżma
I have applied the changes, the problem persists. Not sure why, maybe I misunderstood the instructions. Whenever I preview "Randomised question" question group it displays only "Randomised question" group name, nothing else, when I preview the whole survey it just skips "Randomised question group".

Thanks in advance.

Please Log in to join the conversation.

More
3 weeks 2 days ago #274054 by Joffm
If you applied the changes and still get issues,
show what you did.
less export 

Joffm 

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

Please Log in to join the conversation.

More
3 weeks 2 days ago #274055 by Joffm
BTW:
I do not see any issue.

File Attachment:

File Name: limesurvey...72_J.lss
File Size:65.58 KB

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

Please Log in to join the conversation.

More
3 weeks 1 day ago #274063 by LukrecjuszLiżma
Sorry, I was sure the file was attached. 

File Attachment:

File Name: limesurvey...1172.lss
File Size:69.77 KB

Please Log in to join the conversation.

More
3 weeks 1 day ago #274064 by Joffm
Sorry, but why didn't you import and study the sample I sent?

In your survey the equation vanished; insted there is a question of "short text" with a condition "{if(is_empty...)}.
How do you expect this to work?.
And you hide this question.
While testing you shouldn't hide a question.

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