I'm having trouble with creating an expression to trigger the Error Message Tool. I have it connected to a Text Box and I wanted it that if they entered an invalid value (in this case an invalid ID), it would trigger the error message.
I've tried the following:
[#1] != "ID1" or "ID2"
I've also tried:
([#1] != "ID1")
or
([#1] != "ID2")
I'm guessing there's some nuance in the Error Message Tool that I'm not getting or maybe I'm just not thinking about it right lol
Solved! Go to Solution.
This tool generates the Error when the condition is true. At the moment, your condition returns true if the user doesn't enter ID1 OR if the user doesn't enter ID2 ; in other words it is ALWAYS returning true.
Try using AND:
([#1] != "ID1")
AND
([#1] != "ID2")
@justinihil This might not be the best option but I like configuring the message tool for errors here with some kind of logic check. I just find it a bit more intuitive. In this instance I can check to see if the number of records coming out my false anchor is the same as the original data, and if they're the same it means the ID entered hasn't matched anything in the data (easier than dealing with no records coming out the true).
Thank you @FinnCharlton ! I knew I was thinking about it incorrectly! lol
Thanks for the tip @JamesCharnley !