How to set the email with next number if already exists in the system

Kumar147
Tera Contributor

Hello All,

I need help in setting email if already exists in the system.

for example: if email 'test.test@gmail.com'  exists in the system it should set 'test.test1@gmail.com'  in the email field in the portal. likewise if 'test.test1@gmail.com'  exists it should set 'test.test2@gmail.com' in the field.

 

Please help me out of this thing.

 

Thanks in advance

10 REPLIES 10

In a custom table used in the form.

Ankur Bawiskar
Tera Patron
Tera Patron

@Kumar147 

very difficult to understand without screenshots and valid business requirements.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hello @Ankur Bawiskar 

 

The email field is populating based on the first name and last name. When the email address already exists in the system it should add a numerical value like 1, 2.... to the email before '@'  without based on the first or last name. if email address already having 1 before @ exists in the system. it should take 2 for the email.

 

Phani26_0-1694509815505.png

 

Phani26_1-1694509819004.png

 

@Kumar147 

so check this using GlideAjax wherever you are populating the field

what's the challenge?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

I am checking that, but if same email exists in the system like test@gmail.com. it should add 1 before @ in the email id like test1@gmail.com if test1@gmail.com exists it should add 2 before @ like test2@gmail.com.