Help with meeting relevance conditions

Good Day,

I am working on a form where a note should be displayed if it meets the
correct conditions. my condition for relevance is:
Note 1
selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or
selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or
${audit_c} < 4 and (selected(${tp}, 'A') and selected(${q1}, '1'))
Note 2
selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or
selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or
${audit_c} < 3 and (selected(${tp}, 'A') and selected(${q1}, '2'))
Note 3
selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or
selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or
${audit_c} > 3 and (selected(${tp}, 'B') and selected(${q1}, '1'))
Note 4
selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or
selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or
${audit_c} > 2 and (selected(${tp}, 'B') and selected(${q1}, '2'))
What i need it to do is show if either of the following, I am using note 1
as example:
If user has selectted:

  • q2 = 5 or
  • q4 less than 18 or
  • q5 = 0 or
  • c1 less than 3 or
  • q7 = 1 or
  • q8 = 0 or
  • q9 = 1 or
  • audit_c leass than 4 AND
  • the user has selected a combination of tp = A and q1 = 2

I would then like to it display note 1, however it displays all the notes.
So I am assuming I must have a syntax issue of sorts relating to the last
part which references the combination. I know the fist part is working (selected(${q2},
'5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or selected(${q7},
'1') or selected(${q8}, '0') or selected(${q9}, '1') or ${audit_c} < 4) as
the notes show based on these conditions, however the the last AND part is
not working as expected.

Thanks in advance for the great support and help.

Bash

Hi, Bashir.
I think, there are missing parentheses.
Try this(hoping that will meet your need):
Note1
(selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or
selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or
${audit_c} < 4) and
( (selected(${tp}, 'A') and selected(${q1}, '1')) ).

Note 2
(selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or
selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or
${audit_c} < 3 )
and
( (selected(${tp}, 'A') and selected(${q1}, '2')) )

Note 3
(selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or
selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or
${audit_c} > 3)
and
( (selected(${tp}, 'B') and selected(${q1}, '1')) )
Note 4
(selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or
selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or
${audit_c} > 2 )
and
( (selected(${tp}, 'B') and selected(${q1}, '2')) )
Best,

··· Le mercredi 15 mars 2017 11:36:09 UTC+1, Bashir Jahed a écrit : > > Good Day, > > I am working on a form where a note should be displayed if it meets the > correct conditions. my condition for relevance is: > Note 1 > selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or > selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or > ${audit_c} < 4 and (selected(${tp}, 'A') and selected(${q1}, '1')) > Note 2 > selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or > selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or > ${audit_c} < 3 and (selected(${tp}, 'A') and selected(${q1}, '2')) > Note 3 > selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or > selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or > ${audit_c} > 3 and (selected(${tp}, 'B') and selected(${q1}, '1')) > Note 4 > selected(${q2}, '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or > selected(${q7}, '1') or selected(${q8}, '0') or selected(${q9}, '1') or > ${audit_c} > 2 and (selected(${tp}, 'B') and selected(${q1}, '2')) > What i need it to do is show if either of the following, I am using note 1 > as example: > If user has selectted: > > - q2 = 5 or > - q4 less than 18 or > - q5 = 0 or > - c1 less than 3 or > - q7 = 1 or > - q8 = 0 or > - q9 = 1 or > - audit_c leass than 4 AND > - the user has selected a combination of tp = A and q1 = 2 > > I would then like to it display note 1, however it displays all the notes. > So I am assuming I must have a syntax issue of sorts relating to the last > part which references the combination. I know the fist part is working (selected(${q2}, > '5') or ${q4} < 18 or selected(${q5}, '0') or ${c1} < 3 or selected(${q7}, > '1') or selected(${q8}, '0') or selected(${q9}, '1') or ${audit_c} < 4) as > the notes show based on these conditions, however the the last AND part is > not working as expected. > > Thanks in advance for the great support and help. > > Bash >