Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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