Hi everyone,
I’m using an IF node with an expression to check if a message string exists in a list of strings.
MY WORKFLOW
SAMPLE OUTPUT
The comparison is set to is true.
When I run the workflow, the expression correctly evaluates to false (as shown in the Result preview), but the IF node still routes the message to the True Branch instead of the False Branch.
Has anyone experienced this before or knows what might be going wrong?
Thanks in advance!
hi there, it’s because you’re converting a string into a boolean where the way how it works is like this
it does not really check what’s inside the string, but it checks if the string is empty or undefined or not
so it will always return true if the string has value, but if the string is empty or null or undefined, then it will return false
for example
let str1 = "true"; // str1 will be true
let str2 = ""; // str2 will be false
let str3 = "hello"; // str3 will be true
let str4 = "false"; // str4 will be true
if this answer your question, please give it a like and mark it as the solution
It doesn’t solve my issue, can you give me an example flow. I simply want to check if the word.text that come into the if branck exist in a list(list of string)
The left side is a string false
It’s not boolean false.
Please use string - is equals to - false
Don’t use Boolean in this case.