Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/10/2022 11:56 PM
Hi Team,
We have a requirement to display only Security group name in email templates.
In the entitlement value we have "Job and Position Administrator (UB-HR-Job_and_Position_Administrator)" which is combination of security group name and Tenent security Id.
Requirement is to display only "Job and Position Administrator" while sending email notification and we tried few options but that didn't work
i.e,
<div>Entitlement Value: ${entitlement_values}.get[0].substring ${entitlement_values}.indexOf(" (",1) </div>
<div>Entitlement value: entitlement_values.substring(entitlement_values.indexOf(" ("),1)) </div>
<div>Entitlement Value: <% if (${entitlement_values}.contains(" (")) print "SUBSTRING_INDEX(${entitlement_value}, " (", 1) else print "${entitlement_value}" %></div><br>
Could you please advise how can we achieve this.
Thanks,
Bhavya.
Solved! Go to Solution.
08/11/2022 01:53 AM
Is it possible to store value in entitlement customproperty / display name / glossary while import?
Which connector is used?
08/11/2022 02:09 AM
Hi Rushikesh,
We are using "Workday connector"
Not possible to store value anywhere as we don't have mapping available at the connector level
08/12/2022 04:40 AM - edited 08/12/2022 04:40 AM
@tbhavya ,
Can you tell me which email templates are you trying this in?
08/12/2022 05:01 AM
Hi Sahaj,
We are using notification email template as shown in the screenshot below.
08/12/2022 06:39 AM
Hi @tbhavya ,
This worked for me :
${entitlement_values.collect{it.toString().indexOf("(") == -1 ? it : it.toString().substring(0, it.toString().indexOf("(") -1)}}
Entitlement Value :
Email :
08/12/2022 07:03 AM
Hi Sahaj,
Thank you. It worked.
However, Is it possible to remove square bracket [] from security group name?
i.e., Job and Position Administrator
08/12/2022 07:21 AM
${entitlement_values.collect{it.toString().indexOf("(") == -1 ? it : it.toString().substring(0, it.toString().indexOf("(") -1).replaceAll("\\[","").replaceAll("\\]","")}}
08/12/2022 09:17 AM
@tbhavya
I tried the following for it, worked :
${entitlement_values.collect{it.toString().indexOf("(") == -1 ? it : it.toString().substring(0, it.toString().indexOf("(") -1)}.toListString().replaceAll('\\[|\\]','')}
Email :
08/15/2022 10:46 PM
It worked. Thank you
Regards,
Bhavya.
08/16/2022 01:09 AM
Thanks @tbhavya
Please mark the answer as solution to close the topic.