Welcome to the LimeSurvey Community Forum

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

Urgent: How to reuse only unique, previous free text responses in sub question

  • Chipmonkey
  • Chipmonkey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago - 3 years 1 month ago #227146 by Chipmonkey
LimeSurvey version: Version 3.27.26.oecd.8
Survey theme/template: oecd
==================
Hi, I have a semi-limited experience working with LimeSurvey and has come across a difficult issue to solve. 

I have solved how to re-use (feed) answers from Q.1. (multiple short text) into a Q.2 (array (text))

Here are the details: 

Q.1. Is asking the names of organisations 1, 2, and 3 (...) 

Q.2 is asking follow up questions about the organisations 1, 2 and 3 (...) listed in Q.1. 

However, sometimes the names listed in Q.1 for organisation 1, 2 and 3 are the same. If organisation 2 and 3 are the same in Q.1. I only want the name of that organisation to be listed one time in Q.2. I.e. I want to only re-use the unique names provided in Q.1., and for those to populate my array question Q.2. 

Is there a way to do this, and if so how?

I hope you understand what I'm asking and sorry if it's any confusing  Very thankful for any type of assistance! 

 
Last edit: 3 years 1 month ago by Chipmonkey.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago - 3 years 1 month ago #227150 by Joffm
Please, attach a small sample (lss export) of these relevant questions.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 1 month ago by Joffm.

Please Log in to join the conversation.

  • Chipmonkey
  • Chipmonkey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #227152 by Chipmonkey
Here is a copy of survey (it is a test version and only includes 2 questions + one equation)  

File Attachment:

File Name: limesurvey...7547.lss
File Size:29 KB

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #227154 by Joffm
Well,
how do you want to decide if two entries are equal?
If somebody enters "Fire Fighters of NSW" and "Fire Fighters of New South Wales"?
Or "The Irish Gardeners Association" and "Gardeners Association".

And I am sure you are only interested in a certain subset of ALL organisations of the world.
Therefore I propose to use an autocomplete question which forces that all entries are unique.
And additionally with dynamic rows

Like this






Here the sample survey
 

File Attachment:

File Name: limesurvey...9877.lss
File Size:26 KB


The jquery files you find in the internet
and the csv-file is a simple file with one organisation per row.
like
 

Joffm

 

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

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #227156 by Joffm
And here an example with an arry instead of a csv file (countries of the world)
and without dynamic rows.

 

 

File Attachment:

File Name: limesurvey...2779.lss
File Size:21 KB


Joffm
 

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

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #227160 by holch

If somebody enters "Fire Fighters of NSW" and "Fire Fighters of New South Wales"?
Or "The Irish Gardeners Association" and "Gardeners Association".


Hahahahaha, this reminds me of Monty Python's "Life of Brian"...

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.

  • Chipmonkey
  • Chipmonkey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #227165 by Chipmonkey
Sorry what you’ve provided is good but does not answer the need I have. 

The actual Q.1 will ask:

Which organisations are responsible for the  following areas? 

Area 1: *answering name of organisation responsible for area 1*
Area 2: : *answering name of organisation responsible for area 2*
Area 3: *answering name of organisation responsible for area 3*

The same organisation can be responsible for several areas, let’s say area 1 and 3. For the topic I’m working on this is quite common. When there is the same name for two different areas most people will copy paste what they wrote so while I enjoy the monty python reference the event that they write the same name differently might not happen - but I understand it can.  If it happens a few times it’s not too problematic put not ideal. 

It might be more clear now that I don’t want to remove duplicates in Q.1 because that would mean I’d loose information relevant to the survey. Instead I want Q.2 to only populate the unique names answered and listed in Q.1 for me to ask follow up questions about the organisations 

If you have an alternative way of doing this more intuitively I’m open for it but please note I need the info in Q.1 to remain as it’s relevant for the project. Q.2 needs to be configured if possible 

thank you! 
 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #227168 by Joffm
Oh, I see, now it is more clear.
The question is, how many subquestions ("areas") will be there.
Here you talk about three, but your first example showed 11.

You can do this by some (or some more) equations.

I will think about it an send an example.
But not tonight.

Joffm

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

Please Log in to join the conversation.

  • Chipmonkey
  • Chipmonkey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #227170 by Chipmonkey
Actually there are quite many areas… which I understand might cause some difficulties. They are around 78 in total. 

This test example one only has 11 yes.

Thanks! extremely helpful 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago #227171 by Joffm
Hi,
I will send a solution tomorrow.
Just a bit more of fine tuning necessary.





Joffm

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

Please Log in to join the conversation.

  • Chipmonkey
  • Chipmonkey's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #227175 by Chipmonkey
That’s amazing thank you! Looking forward to see how you did that. 

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 1 month ago - 3 years 1 month ago #227177 by Joffm
Here is the sample with two ways to display.

 

File Attachment:

File Name: limesurvey...8524.lss
File Size:41 KB


Joffm

To add an explanation:
The first "#" is used to avoid that a valid result of strpos is "0".
You see, there are two meanings of "strpos==0"
1. found at index "0" (the count starts at 0)
2. not found

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 1 month ago by Joffm.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose