Hello,
I having an issue with the var "${item.data.comment}" in a mail template.
Based on this documentation : https://experienceleague.adobe.com/docs/experience-manager-64/administering/operations/notification....
I have customized the template used for the mail sent for each workflow participant step where the "email" box is checked.
The header is now :
header=-------------------------------------------------------------------------------------\n \
Time: ${event.TimeStamp}\n \
Step: ${item.node.title}\n \
User: ${participant.name} (${participant.id})\n \
Workflow: ${model.title}\n \
Comment: ${item.data.comment}\n \
The comment line is working for each step but the first one.
For the first step, I receive this mail :
-------------------------------------------------------------------------------------
Time: Wed Oct 27 10:52:13 CEST 2021
Step: Demande de validation DCP
User: Polo Administrator (admin)
Workflow: CNP - DCP Validation
Comment: ${item.data.comment}
-------------------------------------------------------------------------------------
Then, for an other step :
-------------------------------------------------------------------------------------
Time: Wed Oct 27 11:05:39 CEST 2021
Step: Demande de validation DCP
User: Polo Administrator (admin)
Workflow: CNP - DCP Validation
Comment: Commentaire pour dire KO
-------------------------------------------------------------------------------------
Is there anyway to prevent the mail template to display a var that is not initialized ?
Many thanks,
Grégory
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Not sure but try adding if helps
Comment: ${item.data.comment ?item.data.comment : ''}
I did not tried this, this is just an assumption, it may not work because workflow template is not htl. But you can try.
Views
Likes
Replies