Welcome to the LimeSurvey Community Forum

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

show groups on condition

  • john_bons
  • john_bons's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago - 3 years 4 months ago #223981 by john_bons
show groups on condition was created by john_bons
Dear team.I have a survey where the respondent answers 4 questions in group 1 about Work (W) , Grocery (G), non grocery (N) and Leisure (LST)and then I have following groups that are to be displayed on certain conditions:1) only 4 groups out of 6 below are to be displayed in total max2)WGN (1.1 Typical trip - work, 1.2 Typical trip - grocery,1.3 Typical trip - non-grocery shopping )  to be displayed always if answered by user i.e. the answer for them is anything but ''nooit'' and3)LST (1.4 Typical trip - leisure, 1.4 Typical trip - social, 1.4 Typical trip - touring )  depending on which of them is answered and how many WGN , coz in total only 4 groups are to be displayed at maxi.e.If lst == 1 (i,e, leisure, social or touring one of them is answered by respondent  i.e. (LSTFreq_SQ001 != "A6" or LSTFreq_SQ002 != "A6" or LSTFreq_SQ003 != "A6"))), Then show that 1 lstIf (lst ==2)
Last edit: 3 years 4 months ago by holch. Reason: LSS file removed based on a request from the original owner of the questionnare via admin notification
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago - 3 years 4 months ago #224087 by Joffm
Replied by Joffm on topic show groups on condition
Hi,at first: Why didn't you answer the questions at the beginning?As far as I understand, you want to display up to 4 groups out of these 6.WGN always if the question is not answered "I do not..."As many of the LST groups to reach the maximum of 6.Well, here is a solution with only built in equations.All equations in group "equation" have to be set to "Always hide this question" after you understood the workflow.Everything should be easy to understand.And the joining of the '

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 4 months ago by holch. Reason: LSS/image file removed based on a request from the original owner of the questionnare via admin notification
The topic has been locked.
  • john_bons
  • john_bons's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago #224094 by john_bons
Replied by john_bons on topic show groups on condition
Dear Joffm,

Firstly thank you soooo much! Indeed a very smart and efficient way to resolve the problem.

I am sorry but I did not understand by - Why didn't you answer the questions at the beginning?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224096 by Joffm
Replied by Joffm on topic show groups on condition
When you started this new topic you should have seen these questions.
 

These informations about the used version, the place where LS is hosted (own server, LimeSurvey Cloud, "university" installation, or...) and the used theme are really important for us.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • john_bons
  • john_bons's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago #224097 by john_bons
Replied by john_bons on topic show groups on condition
oh okay. I will keep this in mind for next time.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago - 3 years 4 months ago #224162 by Joffm
Replied by Joffm on topic show groups on condition
Hi,
I realized that there is a small glitch in my solution.

Change the equation "eqLSTGroupsFinal" to
{if(eqNumWGN==3,substr(eqLSTGroups,eqRandLST-1,1),if(eqNumWGN==2,if(eqNumLST==3,str_replace(substr(eqLSTGroups,eqRandLST-1,1),"",eqLSTGroups),eqLSTGroups),eqLSTGroups))}

Sorry

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 4 months ago by Joffm.
The following user(s) said Thank You: john_bons
The topic has been locked.
  • john_bons
  • john_bons's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago #224239 by john_bons
Replied by john_bons on topic show groups on condition
thank you.
The topic has been locked.
  • john_bons
  • john_bons's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 4 months ago #224422 by john_bons
Replied by john_bons on topic show groups on condition
Dear Joffm,Thank you for resolving the first part. unfortunately our survey is bit long and so we are unable to activate it on our instance since it says - too many questions and subquestions. Could you help me how to resolve the issue?
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago - 3 years 4 months ago #224423 by Joffm
Replied by Joffm on topic show groups on condition
[url] www.limesurvey.org/manual/General_FAQ/en...egarding_survey_size [/url]

1. Remove questions and/or subquestions.

2. Split the survey into two parts and join by end-url

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 4 months ago by Joffm.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224428 by Joffm
Replied by Joffm on topic show groups on condition
In my opinion you can do a lot.

I only looked at S1
Instead of creating 16 question you can display 1 question and pipe the text by tayloring.
Either you use an IF-statement or you may use a question of type "huge text" to store all possible answers and select by the function "substr".

Then these 4 questions "HousePartner..."
Only 1 of the 4 question is displayed to a respondent.
And the question is the same and the subquestions are nearly the same.
So you can use subquestion relevance.


So revise your design carefully.

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224461 by Joffm
Replied by Joffm on topic show groups on condition
Of course, the crucial thing are the groups S1-S8.

Here you use 1024 columns.
But usually this type of question is asked as single punch question.
Seeing this design I remembered a colleague of you with this requirement.

To use single punch see here the "old" apple-banana example.
[url] forums.limesurvey.org/forum/can-i-do-thi...ions-in-a-box#194429 [/url]

Or you use tayloring.
Either by some nested IF-statements, like
{if(ask1==1,"Text 1",if(ask1==2,"Text 2",if(ask1==3,"Text3,... )))}
what you enter in each cell.

or you may use a text question where you store all texts in a certain (fixed width) format. You grab the desired text by something like
Code:
<td style="background-color:#f2f2f2;text-align: center;vertical-align:middle;font-size:14pt;"><strong>
{trim(substr(substr(H1, (substr(H0, 3, 3) - 1) * 80, 80),0,20))}
</strong></td>
In this example each text was 20 characters long and there were 4 attributes (4x20 = 80)

In the German part of this forum there is my Tutorial "Joffms Tutorial 3: Gimmicks..." where you find this in Group G10 to Group G11c.
And there is a link to a lss file.

In my opinion the same with all these Switch questions. The answer options are the same; so you only have to taylor the question text.

Furthermore there a many question displayed several times without need. I already mentioned this.
E.g. the 4 "OwnCar" questions.
There is only one of these 4 questions asked depending on HouseComposition and NumberCars.
Again use tayloring of the text, like
{if(NumberCars=="A3" OR NumberCars=="A4", "...meest gebruikte ...", "")}
And subquestion relevance that the second row is only displayed if there are 2 or more cars.
By the way: Why didn't you use numerical codes?

As said before: Revise your structure.

Joffm





 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224470 by Joffm
Replied by Joffm on topic show groups on condition
Now I realizede that the structure of all "Situaties" is equal.
So you only have to taylor the numbers and some texts in the MaaS column

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose