Get the email template body part variable in subject of email

Which IIQ version are you inquiring about?

Version 8.3

Share all details related to your problem, including any error messages you may have received.

I need assistance with VTL and Email Templates.

I’m trying to use a variable whose value I compute in the body of an email template in the subject line. But it looks like the variables created and assigned a value in the body cannot be used in the subject. Is there any way to get the variable body part to subject?

You can write rule in subject tag itself .

1 Like

@vishal_kejriwal1 This is good to know.
Can you please share a sample script for getting the value in subject line?

Hi @jchinnapareddy, @soswain ,

Please check this document it has a lot of sample example of variable usage and the use of spTools for getting variable via context. Let me know if you need further help.

https://community.sailpoint.com/t5/Technical-White-Papers/Email-Template-Usage-and-Customization/ta-p/78164

https://community.sailpoint.com/t5/Technical-White-Papers/Email-Template-Arguments/ta-p/73115

@ashutosh08
I am well aware about writing velocity code inside body tag of the emailtemplate. However, I am willing to know about writing a rule in subject tag as mentioned by @vishal_kejriwal1 .

Do you have any sample code for this?

I have seen the implementation in earlier version but now, with IdentityIQ version 8.1p3, 8.2+, we will only be allowed to use Velocity templates in the body of an EmailTemplate. It will not be allowed in the cc field, Subject, etc.

IIQMAG-3560
[SECURITY] IdentityIQ now restricts class loading from within Velocity templates except for email bodies

Thanks @ashutosh08 for confirming.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.