How to get the last name from a full name by transform

Hello everyone,
I have a field with a full name, but I only need the last name. I’m trying to get a last name using a division transformation, but without success.

I’m trying to use -1 in the index, but an error occurs,

for example, I have an employee with 3 name indexes, others with 4 indexes, etc.

Does anyone have a solution?

Hi @guilherme_sec

Did you get chance to look at below solutions?

Identity now: Transform for last last word from last name - Identity Security Cloud (ISC) / ISC Discussion and Questions - SailPoint Developer Community

Transform Name to Firstname / Lastname - Identity Security Cloud (ISC) / ISC Discussion and Questions - SailPoint Developer Community

as you can tell from your employee with 3 name indexes and others with 4 indexes, “last name” is not a thing you can realistically discern based on its position.

see Falsehoods Programmers Believe About Names | Kalzumeus Software

splitting on something like a space would yield many incorrect results - folks who have (and use/identify with) multiple surnames, as is common in many cultures (spain, for example), or people with a space in their last name.

your current solution would break cases where someone has a legitimate space in their last name, like Van Der Beek, St. James, or Lloyd Weber or Bonham Carter.

see this previous discussion on this as well.

1 Like

I wouldn’t go for guessing names, sometimes I have seen employees taking it offensive with incorrect lastname. I would ask the application team to provide lastname explicitly.

1 Like