HTML Variable in email notification

johnnyw
Mega Expert

(Newbie to ServiceNow.)

Hi,

In one of my catalog items, I have a HTML variable that has a table in it.   I want this HTML field to be visible in email notifications.   To attempt this, I created a notification that included a script that has this in the message section (variable name of the HTML field is "move_details")

 

An Employee move request has been submitted.

${current.variables.move_details}

It is bringing back the variable, but all I see is the HTML tags in the email notification.   How do I get the email to display the contents and not the HTML tags?

<div align="center"><table style="height: 247px; border: 2px solid black; border-collapse: collapse;" width="645"><tbody><tr><td style="text-align: center; border: 1px solid black;" width="208"><p><strong>Employee Name</strong></p></td><td style="text-align: center; border: 1px solid black;" width="208"><p><strong>Move From</strong></p></td><td style="text-align: center; border: 1px solid black;" width="208"><p><strong>Move To</strong></p></td></tr><tr><td style="border: 1px solid black;" width="208"><ol><li></li></ol></td><td style="border: 1px solid black;" width="208"><p> </p></td><td style="border: 1px solid black;" width="208"><p> </p></td></tr><tr><td style="border: 1px solid black;" width="208"><ol start="2"><li></li></ol></td><td style="border: 1px solid black;" width="208"><p> </p></td><td style="border: 1px solid black;" width="208"><p> </p></td></tr><tr><td style="border: 1px solid black;" width="208"><ol start="3"><li></li></ol></td><td style="border: 1px solid black;" width="208"><p> </p></td><td style="border: 1px solid black;" width="208"><p> </p></td></tr><tr><td style="border: 1px solid black;" width="208"><ol start="4"><li></li></ol></td><td style="border: 1px solid black;" width="208"><p> </p></td><td style="border: 1px solid black;" width="208"><p> </p></td></tr><tr><td style="border: 1px solid black;" width="208"><ol start="5"><li></li></ol></td><td style="border: 1px solid black;" width="208"><p> </p></td><td style="border: 1px solid black;" width="208"><p> </p></td></tr></tbody></table></div><div id="mceResizeHandlen" class="mce-resizehandle" style="cursor: n-resize; margin: 0px; padding: 0px; left: 358px; top: 4.5px;"></div><div id="mceResizeHandlee" class="mce-resizehandle" style="cursor: e-resize; margin: 0px; padding: 0px; left: 680.5px; top: 144px;"></div><div id="mceResizeHandles" class="mce-resizehandle" style="cursor: s-resize; margin: 0px; padding: 0px; left: 358px; top: 283.5px;"></div><div id="mceResizeHandlew" class="mce-resizehandle" style="cursor: w-resize; margin: 0px; padding: 0px; left: 35.5px; top: 144px;"></div><div id="mceResizeHandlenw" class="mce-resizehandle" style="cursor: nw-resize; margin: 0px; padding: 0px; left: 35.5px; top: 4.5px;"></div><div id="mceResizeHandlene" class="mce-resizehandle" style="cursor: ne-resize; margin: 0px; padding: 0px; left: 680.5px; top: 4.5px;"></div><div id="mceResizeHandlese" class="mce-resizehandle" style="cursor: se-resize; margin: 0px; padding: 0px; left: 680.5px; top: 283.5px;"></div><div id="mceResizeHandlesw" class="mce-resizehandle" style="cursor: sw-resize; margin: 0px; padding: 0px; left: 35.5px; top: 283.5px;"></div>

7 REPLIES 7

Thanks for the details.   I was able to accomplish what I needed!



Regards,


Johnny


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Johny,



Thanks for the update. Can you refer the below thread and adjust your script accordingly.


Adding cat item variables to email notification