Which IIQ version are you inquiring about?
IIQ 8.3p3
Share all details about your problem, including any error messages you may have received.
Hello everyone!
We’ve encountered this problem with the logic in our custom email templates.
Currently we’re sending the notification to users with the table of all requested roles and trying to set the approval result (approved or rejected) for each individual work item.
Using the default $approvalSet.hasApproved() and $approvalItem.hasRejected() will only give us the result for the first role in the approvalItem. A. e. if the user requested two roles and the first of them was approved and the second rejected, both of them will be “Approved” in the table.
Here’s the part of the code we use in the email template:
#if ( $approvalSet.hasApproved() || $approvalSet.hasRejected())
<p>Dear $identityDisplayName,</p>
<p>All stages of the authorization request have been executed:</p>
<table class="table">
<tr>
<th>Action</th>
<th>Result</th>
<th>Application</th>
#if ($item.nativeIdentity) <th>Account</th> #end
<th>Attribute</th>
<th>Value(s)</th>
<th>Comments</th>
</tr>
#foreach ($item in $approvalSet.items)
<tr>
<td>$item.operation</td>
<td>#if ($approvalSet.hasApproved())
Approved
#else
#if ($approvalSet.hasRejected())
Rejected
#else
Cannot calculate
#end
#end</td>
<td>$item.applicationName</td>
#if ($item.nativeIdentity) <td>$item.nativeIdentity</td> #end
<td>#if ($item.displayName) $item.displayName #else $item.name #end</td>
<td>#if ($item.displayValue) $item.displayValue #else $item.csv #end</td>
<td>#foreach ($comment in $item.comments) $comment #end</td>
</tr>
#end
</table>
Does anyone know how to deal with resolving the approval result for each of the roles? Or maybe some other way to make this table based on the approval set result?
Thanks in advance!
Best Regards,
Danylo