petra Posted August 19, 2009 Posted August 19, 2009 I need a code to convert email address by default to below: from [email protected] to [email protected]. I have the code to force the domain, but cant figure out how to return the name in the format above. Thanks
esmith Posted August 19, 2009 Posted August 19, 2009 Do all email names follow the "FirstInitial,LastName" format? Is the domain (abc.com) the same for all records? If so, then: //replace "YOUR_FIELD" with field from your data var YourField = Field("YOUR_FIELD"); var First2Letters = Left(YourField, 2); var CorrectUser = YourField.replace(First2Letters, First2Letters.toUpperCase()); var NewEmail = CorrectUser.split("@",1) + "@ABC.com"; return NewEmail;
Recommended Posts
Archived
This topic is now archived and is closed to further replies.