Welcome to the LimeSurvey Community Forum

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

Trouble with relevance equation

  • RenaudRD
  • RenaudRD's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 month 3 days ago #267677 by RenaudRD
Trouble with relevance equation was created by RenaudRD
Hi,

I am having trouble with relevance equations. I have a few questions that I want to appear based on if previous answers are populated with certain values. The logic is that I have questions with multiple numerical answers that I want to check, they represent years and months, and if they have a pair of values that is <= 24 months, the questions should appear. The problem is that they never appear regardless of the values entered.

q16a, q16b and q16c are themselves only populated with values (appear) based on previous answers so they may be empty, but this works fine. q16b has two pairs of subquestions that I have to check.

I have checked the forums and the manual and cannot find a solution to this problem. Can someone see what is wrong with my relevance equation? Let me know if information is missing to help me and I will happily provide it.
Code:
( !is_empty(q16a_SQ001) and !is_empty(q16a_SQ002) and sum(q16a_SQ001 * 12 , q16a_SQ002) <= 24 ) or
( !is_empty(q16c_SQ001) and !is_empty(q16c_SQ002) and sum(q16c_SQ001 * 12 , q16c_SQ002) <= 24 ) or
( !is_empty(q16b_SQ001) and !is_empty(q16b_SQ002) and sum(q16b_SQ001 * 12 , q16b_SQ002) <= 24 ) or
( !is_empty(q16b_SQ003) and !is_empty(q16b_SQ004) and sum(q16b_SQ003 * 12 , q16b_SQ004) <= 24 )

Version 3.28.52
LimeSurvey hosting on umontreal.ca

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 2 days ago #267687 by Joffm
Replied by Joffm on topic Trouble with relevance equation
Hi,
check your brackets
and check for HTML code in the condition.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose