Relevance issue not skipping if =! a number

I want to skip question EA17c based on the integer value entered in the question EA17b; if the integer value entered for EA17b is either “99” or “77.” However, despite setting the relevance for EA17c to ask only when the value is not equal to “77” and not equal to “99,” the skipping is not working as expected.

I appreciate your request for assistance with this issue!

Hi @myriamdagher1, and welcome to the community!

It is possible that there is a simple logical error :slight_smile:

(NOT A) AND (NOT B), means it is only true when both is NOT TRUE.

It seems you need to change your syntax to (NOT A) OR (NOT B), which means it is true when either is true.

Can you try that and tell us if it worked?

1 Like

Hello Hakan, thank you for your reply. The syntax is already placed as OR ${EA17b} != ‘77’ or ${EA17b} != ‘99’ and still not working.

@myriamdagher1, could you share the relevant part of the XLSForm so that the community can also help you?

USD.xlsx (41.0 KB)

Here is the attached part of the relevence. Thanks alot and willl look forward to hear from you,

It seems to be a problem of your logic, e.g ‘77’ != ‘99’.
You may try … not(… =‘77’ and =‘99’). See hints from @hakan_cetinkaya.

1 Like

@myriamdagher1, you should be able to do it as outlined by @hakan_cetinkaya and @wroos as shown in the image below:

In the survey tab of your XLSForm:

In the choices tab of your XLSForm:

Image 2

Data entry screen as seen in Enketo:

Image 3

Data entry screen as seen in Enketo:

Image 4

Data entry screen as seen in Enketo:

Reference XLSForm:

USD.xlsx (17.3 KB)

1 Like

Thank you very much it worked! @Kal_Lam @hakan_cetinkaya @wroos