Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
HLeyes
Contributor III
Contributor III

Splitting a String at the Comma into FirstName and LastName

In tMap, is there a way to test a string to see if it has a comma, and if it does, split it at the comma into FirstName and LastName?

Thanks in advance,

HLeyes

Labels (2)
2 Replies
TRF
Champion II
Champion II

row1.fullname.contains(",") ? row1.fullname.replaceAll(",.*$", "") : row1.fullname   --> to populate out.Lastname
row1.fullname.contains(",") ? row1.fullname.replaceAll("^.*,", "") : ""   --> to populate out.Firstname
Check the syntax before to go

Regards,
TRF
HLeyes
Contributor III
Contributor III
Author

Thanks, TRF.  I'll test it out!

HLeyes