Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Changing answer choice list based on previous answer

Changing answer choice list based on previous answer 10 Monate 2 Wochen her #101170

  • rvenkat
  • rvenkats Avatar
  • OFFLINE
  • Senior Lime
  • Beiträge: 42
  • Dank erhalten: 1
  • Karma: 2
My problem is as follows:

Based on the answer participants select in Q1, which is a drop-down list, I would like to present users with different answer choices for Q1. Q2 is also a drop-down list. There are a maximum of 12 possible answer choices for Q2, but some participants may see only 2 answer choices for Q2 and others may see 10 answer choices for Q2, depending on what they selected in Q1.

For example:
Q1, Which office location did you visit?
(answer choices could be: Vancouver, Calgary, Toronto, Montreal, Halifax)

If, Vancouver was selected for Q1,
Then Q2, What service did you access?
(answer choices: s1, s2, s3, s4, s5)

If Calgary was selected for Q1,
Then Q2 answer choices could be: s4, s5, s6, s10, s11, s12

If Toronto was selected for Q1,
Then Q2 answer choices could be s3,s4,s6,s8,s9,s10,s11,s12

and so on.

I have 24 office locations and 12 services. I created a separate service list question for each of the 24 offices. Using conditions I am able to present the appropriate list in Q2. But this creates many columns in my CSV file. If s4 occurs in 10 offices, there will be different 10 columns for s4. I want only 12 columns in the CSV, one column per service.

In other words, I want a single Q2 with 12 choices, but only the appropriate choices shown based on the selection in Q1.

What is the most efficient way to do this? Any help would be greatly appreciated.
Thanks.


rvenkat
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Changing answer choice list based on previous answer 10 Monate 2 Wochen her #101212

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4186
  • Dank erhalten: 786
  • Karma: 359
Unfortunately, there is no way to filter the answers in Q2 that way (there is currently no relevance setting for answers).

Even a JavaScript solution would be quite tricky. You cannot hide <option> elements in drop-downs - you need to remove them and that would get messy if the respondent changed Q1.

P.S. You forgot Ottawa in your Q1 choices :laugh:
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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: rvenkat

Changing answer choice list based on previous answer 10 Monate 2 Wochen her #101225

  • rvenkat
  • rvenkats Avatar
  • OFFLINE
  • Senior Lime
  • Beiträge: 42
  • Dank erhalten: 1
  • Karma: 2
Hi Tony,

Thanks for the reply. It's too bad there's no solution.

I love our capital city. Just omitted it in the example. :)
BTW, I'm in Halifax.



Ramesh
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.124 Sekunden
Donation Image