Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Bring a dynamic attribute (a Plain Text Field) in Email Template

Saviynt_Savvy
Regular Contributor
Regular Contributor

Hello all,

In the ARS, we have a Dynamic attribute named 'Additional Comments' which is a Plain Text Field.
And we need to enter the comments regarding the requesting access as shown in the screenshot below.

Saviynt_Savvy_0-1719561789251.png
How to bring this value in the Email template?

I have used both the below syntaxes:
${accessItems.collect{it.request_access_attrss.findAll{it.attributeName.toString().equalsIgnoreCase('Additonal Comments')} .collect{it.attributeName.toString() + ': ' + it.attributeValue}.join('###')}.toString().replaceAll('\\[','').replaceAll('\\]','').replaceAll('\\,','')}

${dynamicAttrsList.find{ it.attributeName?.equalsIgnoreCase('Additonal Comments') }?.attributeValue}

And I got the below error:

Saviynt_Savvy_1-1719562138223.png

We see the above error in the Email History Job log details.
It is saying that , there is no such property called 'IT'. 'it' is a keyword causing the issue here.

Any suggestions please!

Thanks & Regards,
SaviyntSavvy

3 REPLIES 3

SumathiSomala
All-Star
All-Star

@Saviynt_Savvy Where did you attach this email template and when this will be triggered?

https://forums.saviynt.com/t5/identity-governance/using-dynamic-attribute-in-email-template/m-p/3945...

 

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

PremMahadikar
Valued Contributor II
Valued Contributor II

Hi @Saviynt_Savvy ,

Try below:

${accessItems.collect{it.request_access_attrss.find{it.attributeName.toString().equalsIgnoreCase('Premdynamicattribute')}.collect{it.attributeValue}}}

OR

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

 

If this helps your question, please consider selecting Accept As Solution and hit Kudos

rushikeshvartak
All-Star
All-Star

Are you storing attribute in accounts column ?


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