The Zurich release has arrived! Interested in new features and functionalities? Click here for more

A Simple Flow If Statement is Evaluating to False

Steven Parker
Giga Sage

I have a Sub Flow with an input variable for addRemove.  I am passing "add" to it and it evaluates in the If statement to Add=Add, but is still evaluating to False.  I have tried various upper and lowercase possibilities such as Add, add, "Add", "add". 

 

What am I missing here?  This seems like it should be pretty simple.

 

StevenParker_1-1758291125487.png

 

StevenParker_0-1758291110316.png

 


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
6 REPLIES 6

@Steven Parker 

yes sometimes it behaves weird especially when it comes to action/subflow inputs.

try to re-create the subflow again.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

M Iftikhar
Mega Sage

@Steven Parker ,

Sometimes Flow behaves unpredictably; try removing the step, clearing the cache, and then re-adding it. Also, check the thread below, it might give you some useful pointers.

Using iterative/enumerated comparisons (Choice/Boolean/Integer) is generally much more reliable than plain string checks, since it avoids issues with casing or hidden whitespace. So it’s worth giving that approach a try.

https://www.servicenow.com/community/servicenow-ai-platform-blog/do-not-run-into-that-weird-flow-des... 

 

Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution and helpful so others can benefit as well.