Flow designer IF condition evaluated to FALSE even though it is TRUE

Oliver13
Mega Guru

Hello,

I have designed this flow and it worked perfectly before. but now, the IF condition is not working correctly. Event though the IF condition if true, it is evaluated false. Could someone help me?

The IF condition is to check if the trigger Total Rewards record is approved or not:

find_real_file.png

The IF condition is the is exactly the same and below was tested on 15.06.2020 and it worked.

find_real_file.png

The record is approved, which makes the IF condition = true:

find_real_file.png

 

Now the IF condition is evaluated to false even though it is true:

find_real_file.png

The record is approved but evaluated to FALSE 😞

find_real_file.png

Can someone please kindly help me? What's the issue here.

Thank you so much. 

16 REPLIES 16

Swapnil Soni1
Giga Guru

Hey Oliver,

Check this link below this might helps you

https://hi.service-now.com/kb_view.do?sysparm_article=KB0785106

If this helps please mark correct or helpful.

Thanks

Hello Swapnil,

Thank you for replying but I am afraid this is not my case. 

My IF condition is a choice of approval states, I am not able to change it as suggested in your link. 

Thank you so much though.

DirkRedeker
Mega Sage

Hi

I am guessing, you are running into some racing conditions, where you want to check for a value, which is not already updated in the background (e.g. by a Business Rule).

Your Flow asks for an approval, and then waitf for that approval. Maybe the wait condition (approved or rejected) is waiting on the "approval" record, instead of the "HR total rewards Cases" Record.

If yes, I assume, there will be a business rule running, which will update the "Approval" value on the "HR total rewards Case" Record, based on the outcome of the Approval from above.

This way, the IF condition may ask for the value, before the business Rule will have updated the value, which may lead to having always the same "false" value. This is like that for just a very short time.

find_real_file.png

As this is would be a racing issue, often I read the recommendation of a "timer to wait 5 Seconds". This is no bulletproof solution, as a busy system may not be able to even write the value within the 5 seconds.

I saw implementations wait 2 Minutes - but come on - this is not really cool!

Instead, I recommend to wait for the value you are checking instead.

So, in the picture above, for point (1), instead of waiting for the approval record, wait until the "Approval" value on the "HR Total..." Record was changed to "approved" or "Rejeced" and continue your Flow based on that.

This way, you KNOW, that this value already have been written, from where you are checking for it.

This should work and be stable.

Just give it a try and let me know.

If my answer solved your issue, please mark my answer as correct and helpful.

Enjoy & BR

Dirk

Hello Dirk,

Thank you so much for your detailed reply. 

But actually I do have it waiting on the HR Total Rewards record. and it still fails 😞

Do you know any other potential issues might cause this behaviour?

Thank you.

find_real_file.png