05/25/2023 03:24 AM
Hi,
We had a requirement to split the displayname in Updateaccountjson as well as createaccountjson,if displayname contains = then remove it and uppercase the right side of string
For ex: Displayname: Esha=Dutta
Output in the AD should be Esha DUTTA
How this can be achieved?
Note: We are not doing this in while importing because we are using schema import for this HR source,it already has performance issue.
I tried below ways Updateaccountjson but it is throwing no signature of method error:
"displayName":"${user.customproperty30.equals('SAPSF') ? user.lastname.toString().toUpperCase() +' ' + user.firstname : (user.customproperty30.equals('SAPHR') && (user.displayname==null || user.displayname.equals(''))) ? user.firstname+' '+user.lastname.toString().toUpperCase() :(user.customproperty30.equals('SAPHR') && (user.displayname!=null || user.displayname!='' && (user.displayname.contains('=')))) ? substringAfter(user.displayname,'=').toUpperCase() : (user.customproperty30.equals('SAPHR') && (user.displayname!=null || user.displayname!=(''))) ? user.displayname : user.displayname}"
And also used this
SUBSTRING_INDEX(displayname, '=', -1).toUpperCase()
Please help me how we can split the displayname.
Thanks,
Harsha
05/25/2023 05:34 AM
user.displayname.substring(0, user.displayname.indexOf("="))
05/25/2023 05:46 AM
Hello @rushikeshvartak ,
Thank you for the quick response, above mentioned logic will remove part that comes next to =. I just want to replace = with space and uppercase right side part.
Thanks,
Harsha
05/25/2023 07:55 AM
Example
05/26/2023 02:10 AM
Hello @rushikeshvartak ,
Ex: If it comes from Source as Displayname: Alessandro=Di Bianchi
transformed displayname: Alessandro DI BIANCHI
Thanks,
Harsha