04-28-2020 11:54 AM
That was an overly complicated way of asking if there is a way to verify if an email submitted on a form is valid.
Here is the situation:
We collect information on a shared form. The information collected includes an email keyword that is used in the workflow for notifications, both in system events and ad-hoc tasks. When the email address is not formatted as an email address should be (basically, no
I hope this makes sense!
Thanks!
04-28-2020 12:32 PM
Hi Devine,
You can use a script that checks if an email provided is valid or not at the unity form level. If you are looking for something that validates when the form is submitted using regular expressions you can use this.
You can replace %Vvalue with the email KW(%K000) and execute it.
Thanks,
Ram.
04-28-2020 01:36 PM
Hi Devine,
If you want to validate at form level
1) Create 2 fields in the hidden section one for copying the value entered in the email field and other to write the value from the script (Valid/Not Valid)
2) Using custom action copy the email field value to the created field and execute a script when field not empty and get the value valid/not valid from the script.
3) If the script returns Invalid make the field as invalidate using a custom action and display a msg something like "Please input a valid email address"
NOTE: This validates only if the email maintains the standards for email format but not if this email exists or not?
Thanks,
Ram.
04-29-2020 05:15 AM
I like both of these answers for different reasons - I think I will be able to use them for a lot of things in the future. If I want to check both the symbol (sorry, when I try to type it now, it brings up your names) and a '.') can I do both in one script with an &. Sorry I don't know the scripting very well.
04-29-2020 09:40 AM
You can look for both the "@" and "." in the same expression in work flow and in the same Script
Thanks,
Ram
04-29-2020 09:40 AM
You can look for both the "@" and "." in the same expression in work flow and in the same Script
Thanks,
Ram
10-20-2022 02:05 PM
Thanks!
04-30-2020 05:48 AM
This is so helpful! Thank you so much! I am going to do the evaluation in workflow because I don't know enough (anything:)) about how to write Unity scripts yet. I am going to try to find the expression cheat sheet, which I hear is somewhere on this site - this is going to come in really handy.
Thanks again!!
05-29-2020 12:58 PM
Hi Deanne,
As an extra note, you may want to be careful with just evaluating the value for containing the "@" and "." characters, since a valid email address requires them to be in a correct order as well. For example:
This is obviously not a valid email but would evaluate "True" and would still cause the error you are encountering.
Checking the value against a regular expression (regex) may be a better option since it allows you to ensure the address adheres to a valid email format. For example:
In addition to checking to ensure proper format, it will return "False" if there are invalid characters (such as spaces) found in the address. This is configured with the "Evaluate Expression" rule type in Workflow with the following expression (for easy copying):
IsMatch(%Vvalue;"^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$";true)
Let me know if you have any questions and hopefully this helps!
Thanks,
Doug
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.