Welcome to the LimeSurvey Community Forum

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

Merge token attribute into answer options

More
2 years 8 months ago #239101 by lowprofile2
Hi,


I'm trying to survey/audit users who are responsible for unique items
If the list of items is in a token field, can I populate the array answer options for that user
eg create an array of ~150 answer options and prefill the answer options with the values from the token attribute

email,attribute_1
email1 "abc,acb,aac,aca,aab" ... where list can be up to 150
email2 "bbc,bcb,bac,bca,bab"
email3 "ebc,ecb,eac,eca,eab"
email4 "gbc,gcb,gac,gca,gab"
email5 "fbc,fcb,fac,fca,fab"

Question is an Array 
For email1 would show  
      Eval1 , Eval 2 , Eval 3
abc
acb
aac
aca
aab




Please help us help you and fill where relevant:

Your LimeSurvey version: 3.x
Own server or LimeSurvey hosting:Own
Survey theme/template:
==================
 

Please Log in to join the conversation.

More
2 years 8 months ago #239103 by holch
So each item is unique? No other user will for example evaluate the same item than another one, right?

The problem that I see is having all items in one custom attribute. I am not sure how you want to "split them up" later. Let's see if Joffm has a solution for this.

I personally probably would have created 150 custom attributes... ;-)

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
2 years 8 months ago #239107 by lowprofile2
150 custom attributes could be doable, can i just reference them into the answer options with
{atrribute_1}..{attribute_150}
Is there already some java example to do this (and hide the options that are blank for people that < 150

Please Log in to join the conversation.

More
2 years 8 months ago #239109 by holch
No javascript required for this one.

As you are using an array, you can just create 150 subquestions into this array and pipe the attributes from 1-150 into the subquestions just like you have shown:
{TOKEN:ATTRIBUTE_1}

Then you can create a relevance equation that will only show the subquestion if TOKEN:ATTRIBUTE_1 is not empty.

Give it a try with a small example, create like 5 custom attributes, should work.

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.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose