Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Modify users level customproperties in email template

Harish_Yara
New Contributor III
New Contributor III

Hi All,

Can someone pls help how to substring user's customproperty in email template.

For example - customproperty44 is having string value as "abc.xyz@domain.com"

Requirement is to pass username in template as "abcxyz" from customproperty44 [Here dot is removed in between abc & xyz and also "@domain.com" is removed. 

@rushikeshvartak 

Thanks,

Harish

 

Thanks,

Harish

6 REPLIES 6

Sivagami
Valued Contributor
Valued Contributor
${user.customproperty44.substring(0, user.customproperty44.lastIndexOf('@')).replace('.','')}

Please handle null pointer exception in case cp44 is blank


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Harish_Yara
New Contributor III
New Contributor III

Thank you @Sivagami it worked.

Harish_Yara
New Contributor III
New Contributor III

Hi @Sivagami  @rushikeshvartak  

Can u please help me in replacing dot with comma+space

For example  abc.xyz should be replaced with comma and space like abc, xyz in CN of AD account (Account Name Rule)

Tried with CN=${user.customproperty1.replace('.','\\, '),OU=abc,DC=xyz,DC=com} but it is giving error Invalid Argument while AD account creation.

Thanks,

Harish

CN=${user.customproperty1.replace('.',',').replace(' ','')},OU=abc,DC=xyz,DC=com


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Try below

CN=${user.customproperty1.replace('.',', ')+',OU=abc,DC=xyz,DC=com'}

 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.