Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Fetching First name and last Name from email ID

Savita P
Tera Contributor

How we can fetch first name, last name from email id and store it to fields?

Thanks.

1 ACCEPTED SOLUTION

Sample script:

var empMail = 'abhishek.gardade@company.co.in';

var fullName = empMail.split('@')[0].split('.');

var firstName = fullName[0];

var lastName = fullName[ fullName.length-1 ] ;

gs.log("firstName: "+firstName);

gs.log("lastName "+lastName );

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade

View solution in original post

3 REPLIES 3

AbhishekGardade
Tera Sage

Can you please elaborate more?

What is the email format you are receiving?

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

 

Thank you,
Abhishek Gardade

Sample script:

var empMail = 'abhishek.gardade@company.co.in';

var fullName = empMail.split('@')[0].split('.');

var firstName = fullName[0];

var lastName = fullName[ fullName.length-1 ] ;

gs.log("firstName: "+firstName);

gs.log("lastName "+lastName );

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade

The email format is: firstname.lastname@xxxx.com