A Simple Flow If Statement is Evaluating to False
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
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.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
45m ago
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:
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven