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

Ankur Bawiskar
Tera Patron
Tera Patron

@Steven Parker 

the input to the subflow is of type String?

If yes then it should work.

Also any leading or trailing space is passed along with the input? see that

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

Yea it's not working.  I've made sure no spaces exist, I change the text/value of Add to both be Add to avoid any discrepancies there.  I deleted the IF and recreated it in Edge instead of Chrome as I was seeing some people complain about IF statements evaluating strings.  That didn't help either.  I also tried creating a flow variable, storing the addRemove in the Flow Variables and evaluating the Flow Variable and that also didn't work.  Still says "Add=Add" and evaluating to False so I don't know what's going on here.


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

@Steven Parker 

in the flow variable did you try to compare and set output as true/false?

then use that flow variable in IF logic

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

Something is seriously wrong with Flow Designer and now I know why I don't use it very much.

 

I changed the value of the variable to "1" and changed the input on the Sub Flow to type of Integer.  Flow Designer either still has the old input cached or something else is going on....it still thinks the Input is "Add" when it should be "1".  The word "Add" is no where in any input so why is it being used in the IF Statement?

 

This is crazy....I am not sure how you are supposed to rely on this when it works like this:

StevenParker_0-1758295698590.png

 


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