Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Can we use a substring in the email template for dynamic attributes

necoutinho
New Contributor III
New Contributor III

Hi Team,

We are using below syntax to display the dynamic attribute of a disconnected application on task creation

$ {task?.requestAccessKey?.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('FinCode')}.collect{it.attributeValue}}.get(0).join(', ')}

Output of this is - Finance Report - FRI

However we want to display only 'FRI' in the email template. Can we apply any substring to the above syntax

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

$ {task?.requestAccessKey?.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('FinCode')}.collect{it.attributeValue.split("-")}}.get(0).join(', ')}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Tried this but when i try to save the Email template it says - "Operation not allowed as you are entering a value that resembles or contains script code"

AM

$ {task?.requestAccessKey?.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('FinCode')}.collect{it.attributeValue.split('-')}}.get(0).join(', ')}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Saathvik
All-Star
All-Star

@necoutinho : Try below

${task?.requestAccessKey?.collect{ it.request_access_attrss.find{it.attributeName.toString().equalsIgnoreCase('FinCode')}.collect{it.attributeValue}}.get(0).split("-")[1]}

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

necoutinho
New Contributor III
New Contributor III

Thank you this worked