How to keep only certain elements

Untitled1
Hello … In Input dialog box asking for email address . we give user input like abc@gmail.com or abc1@yahoo.com or abc@123.com or abc@outlook.com and so on … then how to set condition to accept only @gmail.com or @yahoo.com … when we type abc@gmail.com or x..z@yahoo.com then it should proceed to next step . also when we type abc@outlook.com or any keyword with @123.com it shouldn’t accept then again it go input dialog for asking enter correct email address… how to do this ?

pass email ID into a Global Variable use AnotherString = InStr(GlobalVariable,“@gmail”)
NewString = InStr(txt,“SearchKey”) - use this as if statement condition and pick the variable value for all Gmail IDs

Hope my inputs are useful

Type your email address in input dialog box and use Split operation to Split ur email address…

Use variable.Split(New Char(){"@"c})
The about code will split ur email address like this “abc” “gmail.com…And check whether the second part of the string is belongs to “gmail” and “yahoo”.

If ur input email ID is belongs to the above list it will go to next step, Otherwise return back ur Input Dialog box.

Regards,
Poovarasan Guna.

tried didn’t work … can u please pass me practical work flow i m begineer :sweat_smile:

Hi,
Here we go.
MailIDValidation.xaml (11.6 KB)

2 Likes

Thanks @ddpadil

Hi @ddpadil

How is the UI path way to check if Email is valid or not , it may be for any domain just a format check.

Rgds
Aditi