Hello,
I have a form, and in the Process Diagram, I'd like to use an exclusive gateway to send an email if the email address captured on the form does not contain a certain domain name. So for example, I want to send the email every time, except for when the domain and the extension are "company.com." If it's anything else, I want to send the email.
I don't appear to be able to do that using the Process Diagram as is, as I can't use "contains" in my condition. Feels like I need to use a hidden field that populates with a certain value when the email address ends in "company.com," but I've been staring at it for a little while and can't seem to make it work. Any advice?
Thanks!
Question
Question
Forms - Send email if variable does not contain certain text
Answer
A hidden field with a calculation on the form is what I usually use.
Something like the following, where the number in the RIGHT function is the length of the text you're trying to match.
=IF(RIGHT(Email,12) = "@company.com", "Yes", "No")
Of course, the output values can be whatever you want, I just put Yes/No as an example.
There's actually a few ways you could do this depending on how exact/specific you want to get as far as case-sensitivity, ends with (RIGHT) vs contains (FIND), etc.
Hi Jason,
Looks great! I'm testing it now and it's working as expected. What would be the best way to make this not be case sensitive? So that regardless of the case of the text entered as the email address, I'll get the value I want from the formula?
You can wrap your email variable in LOWER()
=IF(RIGHT(LOWER(Email),12) = "@company.com", "Yes", "No")