Skip to main content

I have a run if condition of If [ A AND B OR C]

 

According to both of these links: 

Logic operators 

Run If

 

That RunIf should evaluate to false if  is false. However, that's not the case I'm finding. I had a scenario where A was false, but B was true, and the run if evaluated to true and executed. After changing the order of the Run If conditions to be If bB OR C AND A] and the condition (with the same values as before and A still being false and B being true) evaluated to false. Why would this happen? This seems counter to the documentation. What are we missing? We've solved the "issue" by reworking our workflow, but I'm more interested in the "principle" of why this is functioning the way it is. 

GREAT question Courtney! I have this problem also!


I brought up this issue a long time ago on User Voice.   I think being able to use (    ) to surround statements would be helpful.   Vote up the issue here:  More Advanced Conditions in RunIf Action – Customer Feedback for Nintex 


Thanks, Mike! I gave it 3 votes on User Voice.


Hi Courtney Vargo‌,

how C was evaluated in your scenario?

if it was true, than it's right that the first condition was evaluated to true, because Nintex consider the order so first condition is equal to (A and 😎 or C while second evaluates as (B or C) and A

so, looking at a table with possible results (A is false and B is true like in your description), we have 

(A and 😎 or C(B or C) and A
A false, B true, C trueTrueFalse
A false, B true, C falseFalseFalse

Giacomo


C was false. B and C are evaluating the same field, just checking for different values. So it is something like this:

IF fieldA == value1 AND fieldB == value2 OR fieldB == value3, thus, B and C can not both be true at an evaluation.

Also, for your table with (A and 😎 or C with parameters A false, B true, C true, I don't believe you're correct that it should evaluate to True. Because your first check of (A and 😎 should be false because A is false, B is thus irrelevant because for that check to be true, A and B both must be true.


(A and 😎 is false, as you say, but subsequent evaluation state False OR True (C is True for that row) and it returns True because of C, if it was (A and 😎 and C, then all of them should be True in order to evaluate true all the condition.


Ahh, I was thinking as in our case when C is also false. However, agreeing with the poster above, parentheses would make this easier, because when I created the Run If I was thinking of it as A and (B or C) not (A and 😎 or C, which changes the logic.


Hi Courtney Vargo‌, if you consider the question as solved, could you mark one answer as correct?

Giacomo


Reply