Step-by-Step Guide to Use If to Find the Domain in the Email Address

Let's create an example to automate the process to know the provided Email Id has gmail domain name or some other domain name.

1.    Create a process.

2.    In the Parameter bar, create an In argument, EmailID of Argument type - String and set the Default Value as "dave.daniel@gmail.com".

 

 

3.    From the Canvas Tools panel, add the If activity to the Flowchart designer on the Canvas.

4.    In the Enter Expression here field, enter EmailID.Contains ("gmail.com").

5.    Double-click If activity box.

6.    In the Drop activity here section of the Then activity box, add the WriteLine activity from the Canvas Tools panel.

7.    In the Text field, enter text "Gmail.com exists".

8.    In the Drop activity here section of the Else activity box, add the WriteLine activity from the Canvas Tools panel.

9.    In the Text field, enter text "it is not a gmail ID".

 

 

10.  Save the process.

11.  Set up the environment and perform test run.

 

 

The console displays the output as per the received inputs.

 Related Topics

  If