Welcome to the LimeSurvey Community Forum

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

Can I set which questions a participant sees based on pre-defined attributes?

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 months ago #170332 by holch

but only if those previous answers were on a preceding page (ie, in a different group!).

That is not really true. You can have questions on the same page, that are hidden, until you click a certain response for a question. This question can be on the same page. But of course you can't hide a group based on a answer within that same group.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • drcraig
  • drcraig's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago - 6 years 4 months ago #170333 by drcraig
I figured there was probably a way to do that, just more complicated than my understanding.

I posted on another issue, but I think I figured it out. I was having an issue with this statement: r01 == "A1" AND r02 == "A3" OR "A4". It wasn't giving an error, but it also wasn't hiding the desired group.

I discovered I need brackets around the AND statement to make the OR portion work independently of the part prior to the AND.

Example: r01 == "A1" AND (r02 == "A3" OR "A4")
Last edit: 6 years 4 months ago by drcraig.
The topic has been locked.
  • drcraig
  • drcraig's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago - 6 years 4 months ago #170334 by drcraig
Nope, that didn't work. I'm having all kinds of problems with this syntax.

Here is an example:

Group relevance expression: r01 == "A1" AND (r02 == "A3" OR "A5")

If I select r01 = A1, and r02 = A2, this group still shows.

If I place the brackets like this:

r01 == "A1" AND r02 == ("A3" OR "A5")

LS returns an empty page (no questions, but with a "next" box), but since the fields are mandatory, it says you must still complete them. Weird.

If I eliminate the "OR" statement all together, it works. So that seems to be where the problem is.

UPDATE... trial and error seems to have worked.

r01 == "A1" AND r02 == "A3 OR A5"

Putting the quotes around the grouped answers did the trick. For now!

UPDATE... not so fast. That didn't work. But this did:

r01 == "A1" AND (r02 == "A3" OR r02 == "A5")

I'm including all these updates to make my process explicit for anyone else who might be going through the same educational process I am. Would be nice if the manual were helpful here! I've learned a little bit by reading up on Boolean expressions.
Last edit: 6 years 4 months ago by drcraig.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 months ago #170336 by holch
can you provide .lss survey file for us to have a look at it?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • drcraig
  • drcraig's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago #170339 by drcraig
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose