Welcome to the LimeSurvey Community Forum

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

Use field hidden by relevance in question tailoring

  • Baarceri_122875
  • Baarceri_122875's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
6 years 8 months ago #164716 by Baarceri_122875
Hi there,
I am trying to tailor the text of a question by including the value of a previous question (Q1) which has a relevance equation associated with it.

I am using the following code in the text of the second question:
Code:
{if(is_empty(Q1), 5, Q1)}

However, I also want Q1 to be hidden by a relevance condition. Thus, what I really want is to use the value of the field if it is relevant. At the moment, when it is not relevant, the question tailoring code above does not produce any output.

How can I get around this?

Many thanks,
Will
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 8 months ago #164720 by tpartner
Try this:

Code:
{if(is_empty(Q1.NAOK), 5, Q1)}

www.limesurvey.org/manual/Expression_Manager#Usage_of_NAOK

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: Baarceri_122875
The topic has been locked.
  • Baarceri_122875
  • Baarceri_122875's Avatar Topic Author
  • Offline
  • Banned
  • Banned
More
6 years 8 months ago #164721 by Baarceri_122875
Replied by Baarceri_122875 on topic Use field hidden by relevance in question tailoring
Great, thanks Tony!

Will
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose