Welcome, Guest
Username: Password: Remember me

TOPIC: Display/Call specific list option(s) in other questions

Display/Call specific list option(s) in other questions 7 months 3 weeks ago #106017

  • pietpomp
  • pietpomp's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 23
  • Thank you received: 3
  • Karma: 0
Hi all, Q1 has a list of answers A1, A2, A3.
What is the proper syntax to get say A2's text to display elsewhere/in another question.
{G2Q00001.question}
successfully displays Q1 text
and
G2Q00001.shown
successfully shows a selected answer

BUT

I can't get something like
{G2Q00001A2.shown}
to work. I need it to display the list option whether it was selected or not.

example:
Q1: What is your favourite colour?
Blue
Red
Pink

Q2: Do you sometimes like Red?
Y
N

I've tried
{G2Q00001A2.shown}
,
{G2Q00001_A2.shown}
,
{that.G2Q00001A2.shown}

Thanks
The administrator has disabled public write access.

Display/Call specific list option(s) in other questions 7 months 3 weeks ago #106020

  • orvil
  • orvil's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 104
  • Thank you received: 4
  • Karma: 4
Hallo pietpomp,

I didn't find a way to read the answer options too (assuming you are writing about a radio/list).

So a solution ist to add three questions like

Q2a: Do you sometimes like Blue? Y/N
Q2b: Do you sometimes like Red? Y/N
Q2c: Do you sometimes like Pink? Y/N

with a relevance equation for each of them
Q2a: Q1.shown!='Blue'
Q2b: Q1.shown!='Red'
Q2c: Q1.shown!='Pink'

btw this is the better solution for analysis too, because you have one defined variable for each 'not favourite' color.

Hope this will solve your problem :cheer:
Best regards/Beste Grüße,
O. Villani
The administrator has disabled public write access.

Display/Call specific list option(s) in other questions 7 months 3 weeks ago #106031

  • pietpomp
  • pietpomp's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 23
  • Thank you received: 3
  • Karma: 0
thanks orvil, but that wouldn't be practical.

I need to be able to call each 'answer option' anywhere from 10 to 180 times through the survey.

I used a simple example to illustrate the idea of 'calling' a 'variable'. In reality the questions could have up to 35 possible options and What they pick in one question does NOT affect the next questions.

-As for the analysis; each variable as you call it will actually be a range of specific 'answer options' and not just Red or Blue etc.
:huh:
The administrator has disabled public write access.

Display/Call specific list option(s) in other questions 7 months 3 weeks ago #106032

  • orvil
  • orvil's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 104
  • Thank you received: 4
  • Karma: 4
Yes, you are right. For so many questions this would be a nuisance.

An alternative is may be to use a multiple answer question type (checkboxes) and to allow only one answer (using avanced setting). This question type allows to adress the answer text.

Another alternative is may be to create a hidden question (eg. short text array) in front with default answers and to adress already the option text in your Q1 exampel by an EM expression as well as the following questions.

May be you can provide a more detailed or longer example, that i can get a glue?
Best regards/Beste Grüße,
O. Villani
The administrator has disabled public write access.
The following user(s) said Thank You: pietpomp

Display/Call specific list option(s) in other questions 7 months 3 weeks ago #106034

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4293
  • Thank you received: 810
  • Karma: 373
It seems that Expression Manager only gives you direct access to the text for questions and sub-questions, not to answer text.

However, I don't understand why you need it. Piping text is usually used to dynamically modify text but your answer text strings are static.


.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Display/Call specific list option(s) in other questions 7 months 3 weeks ago #106061

  • pietpomp
  • pietpomp's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 23
  • Thank you received: 3
  • Karma: 0
Thanks orvil, Your second suggestion is pretty much where I ended up. So ATM I'm looking at different EM approaches in order to resolve the call efficiently.

tpartner, your are correct re the static strings, that is the dilemma.
--> Why, I have a very specific and complex survey project, but I'll use a simple example. Say I put together a survey that calls certain q's re product A. Next week {or next participant for that matter} I want to ask the same questions, but for product B. I hop in, swap out 'static string variable value' with product B and we're all set to use the same survey. ~ in reality I'll do this now by assigning text according to triggered <random> value and that in turn will set up a list of question for either product A or B.
Like: "do you like cheese?" next guy gets "do you like butter?" but, both had a question "do you like cheese, butter or milk?"
Last Edit: 7 months 3 weeks ago by pietpomp.
The administrator has disabled public write access.

Display/Call specific list option(s) in other questions 7 months 3 weeks ago #106064

  • orvil
  • orvil's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 104
  • Thank you received: 4
  • Karma: 4
hi pietpomp,

funny thing, I have had to solve a similar challenge: a survey of constant structure with varying objects to rate.
setting up a new survey every time does not seem to be very handy. So I'm using a hidden text anwer in front, filling it via the default answer option. This can be changed even if the survey is running.
The side effect is that one has to postprocess the resulting answer database because of fields filled with different measurements.
Best regards/Beste Grüße,
O. Villani
The administrator has disabled public write access.

Display/Call specific list option(s) in other questions 7 months 3 weeks ago #106066

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4293
  • Thank you received: 810
  • Karma: 373
Yes, I would be inclined to use hidden equation questions to contain the strings and then use Expression Manager to pipe them where necessary.


.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Display/Call specific list option(s) in other questions 7 months 3 weeks ago #106067

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4293
  • Thank you received: 810
  • Karma: 373
...or token attributes if using tokens...
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Display/Call specific list option(s) in other questions 7 months 2 weeks ago #106103

  • pietpomp
  • pietpomp's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 23
  • Thank you received: 3
  • Karma: 0
So that seems the better approach ATM, thanks guys.
FYI I found that the 'global' label set thingy comes in very handy. It does not update automatically, but you can trigger updates per questions if the 'label'/option answers ever change.

For the data orvil, I was thinking of making the answer ladel codes a bit more indigative, so that 1. it should read sensible, and 2. I could be married up to other 'system names' for each variable set (import data)

tpartner, now I'm looking at the EM to present different survey compositions on a random basis. So it's starting to come together now.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.629 seconds
Donation Image