Relevance equation for -oth-

More
1 month 4 weeks ago - 1 month 3 weeks ago #157854 by Matadeleo
Matadeleo created the topic: Relevance equation for -oth-
Hi, my set up is like this:

Q1. How many dogs do you have?

1. None
2. 1
3. 2
4. 3
5. 4
-oth- : More than 4: Please specify

Now, I'm following this with a multiple short text question to collect the breed for each dog

So I have a bunch of subquestions labelled, Dog 1, Dog 2 etc, and am showing them based on the option selected at Q1.

Label - (Relevance Equation)

Dog 1 - (1)
Dog 2 - ((Q1.NAOK == "3" OR Q1.NAOK == "4" OR Q1.NAOK == "5" OR Q1.NAOK == "-oth-"))
Dog 3 - ((Q1.NAOK == "4" OR Q1.NAOK == "5" OR Q1.NAOK == "-oth-"))
Dog 4 - ((Q1.NAOK == "5" OR Q1.NAOK == "-oth-"))
Dog 5 - ((Q1.NAOK == "-oth-"))
Dog 6 - ((Q1.NAOK == "-oth-"))
etc

You can see at the end there, even if the person entered "5" at Q1, they will see 6+ boxes to answer. Ideally I would like to be able to "target" the -oth- answer, which is numeric-only.

Something like:

Dog 5 - ((Q1_-oth- == "5"))
Dog 6 - ((Q1_-oth- == "6"))


Here is the example survey:

File Attachment:

File Name: testrelequat.lss
File Size:21 KB
Attachments:
Last Edit: 1 month 3 weeks ago by Matadeleo.

Please Log in to join the conversation.

More
1 month 3 weeks ago #157856 by jelo
jelo replied the topic: Relevance equation for -oth-
How to accessing the other field is depending on the questiontype. Often it is the best to attach the exported question here.

The value of the field is often accessible via Q1_other.shown .

You might assign the answer of the question to a new variable via a equation question, which you can use for relevance.
{if(Q1.NAOK=='-oth',Q1_other.shown,Q1.shown)}
The following user(s) said Thank You: Matadeleo

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #157857 by Matadeleo
Matadeleo replied the topic: Relevance equation for -oth-
Hi Jelo, I have attached the file to my original post now.

Thank you for the solution, this was exactly what I needed.

No need for an equation question, you can simply enter - ((Q1_other.shown >= "5")) - into the relevance equation on the subquestions
Last Edit: 1 month 3 weeks ago by Matadeleo.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now