petra Posted August 19, 2009 Share Posted August 19, 2009 I need a code to convert email address by default to below: from jdoe@abc.com to JDoe@ABC.com. I have the code to force the domain, but cant figure out how to return the name in the format above. Thanks Link to comment Share on other sites More sharing options...
esmith Posted August 19, 2009 Share 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; Link to comment Share on other sites More sharing options...
petra Posted August 19, 2009 Author Share Posted August 19, 2009 thank you for the help works like a charm Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.