Using the History List Macro
The HISTORY_LIST macro allows you to create a HTML table in e-mails that you send out from the Helpdesk containing the complete history of a workitem.
The following example, taken from the reference manual, shows how to create a simple table.
<TABLE>HISTORY_LIST[[<TD>$$workitem_version$$
</TD><TD>$$workitem_modified_on$$
</TD><TD>$$workitem_modified_by_worker_name$$</TD>]]</TABLE>
This table will contain the version number, the modification date and the name of the worker that modified the incident.
We can use the same format to output the comments:
<TABLE>HISTORY_LIST[[<TD>$$workitem_version$$</
TD><TD>$$workitem_modified_on$$</
TD><TD>$$workitem_comment$$</TD>]]</TABLE>
However, if this is used in an e-mail to the users, they will see all the comments added to the incident including ones which were set as not visible to guests. In order to remove these comments I came up with the following code:
<TABLE>
REGEX{{HISTORY_LIST[[<TR><TD TAG=$$workitem_comment_visible_to_guest$$>$$workitem_modified_on$$</TD></TR><TR><TD TAG=$$workitem_comment_visible_to_guest$$>$$workitem_comment$$</TD></TR>]]}}{{(<TR><TD TAG=0)(.*?)(</TR>)}}{{ }}
</TABLE>
Note: For the above to work the entire REGEX statement must be entered as a single line in the e-mail template.
The Endpoint Management Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management community. Any authenticated Connect member can contribute to this blog.
Comments
Nice Work!
This tip will prove very useful for supporting some customers using handhelds as well for support. Thanks for posting it.
James "Scott" Hardie
Vice President of Technology Services
shardie@xcendgroup.com
http://www.xcendgroup.com
James "Scott" Hardie
Security Architect
Security Business Practice
Symantec Corporation
www.symantec.com
__________________________________
Office: (810) 588 9464
Mobile: (810) 588 9464<
Just what I was looking for
We correspond alot through email from our Incidents and this will help in keeping the contact informed on what the email is about and what information we need from them.
Thank you.
Hi, Is there a way to make
Hi,
Is there a way to make the Date in BOLD, thought it might just seperate the different days better.
Otherwise very usefull edit!
Editing HTML
Hi,
How can I do this and where i need to make modifications.
workitem_modified_by_worker_name not found
$$workitem_modified_by_worker_name$$ does not work in our e-mail template.
on the other hand $$workitem_modified_on$$ works,
so does $$workitem_status_lookup_value$$
so does $$workitem_modified_by_worker_ID$$
Can anyone help. I would like the e-mail history table to show the modified by worker name
modified worker name
the correct tag is $$modified_by_worker_name$$
My version of the same thing using his code:
<TABLE>
REGEX{{HISTORY_LIST[[<TR><TD TAG=$$workitem_comment_visible_to_guest$$>$$workitem_modified_on$$ $$modified_by_worker_name$$</TD></TR><TR><TD class="txtMsgValue" TAG=$$workitem_comment_visible_to_guest$$>$$workitem_comment$$</TD></TR>]]}}{{(<TR><TD TAG=0)(.*?)(</TR>)}}{{ }}
</TABLE>
(REGEX All on one line though)
Bolds the Comments themselves. Includes the worker name next to date.
Not working, Can someone take a look at my code.
I cannot get this to work. Can anyone help me. Here is what I have for code. (everything in the REGEX is on one line, each of the <TABLE> </TABLE> are on their own lines above and below respectivly.
<TABLE>
REGEX{{HISTORY_LIST[[<TR><TD class="txtMsgValue" valign="top" bgcolor="#C0D399" TAG=$$workitem_comment_visible_to_guest$$>$$workitem_modified_on$$ $$modified_by_worker_name$$</TD></TR><TR><TD class="txtMsgValue" TAG=$$workitem_comment_visible_to_guest$$>$$workitem_comment$$</TD></TR>]]}}{{(<TR><TD TAG=0)(.*?)(</TR>)}}{{ }}
</TABLE>
Would you like to reply?
Login or Register to post your comment.