Unique Actor Label in Outlinder on swapping actors?

Hi. I did a tool that can swap actors using assets from the same folder.
But one thing I can not find how to do is to how to get a unique name for actos?

Does anyone know how to do this properly?