Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Error Message Tool Expression

justinihil
7 - Meteor

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

4 REPLIES 4
FinnCharlton
13 - Pulsar

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")

JamesCharnley
13 - Pulsar

@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).

 

JamesCharnley_0-1674490430639.png

 

 

justinihil
7 - Meteor

Thank you @FinnCharlton ! I knew I was thinking about it incorrectly! lol

 

justinihil
7 - Meteor

Thanks for the tip @JamesCharnley !

Labels
Top Solution Authors