Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Using the History List Macro

Updated: 11 Jun 2007 | 7 comments
John Doyle's picture
0 0 Votes
Login to vote

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.

Comments

Scott Hardie's picture
06
Oct
2006
0 Votes 0
Login to vote

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<

shan's picture
14
Jan
2008
0 Votes 0
Login to vote

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.

syarlett's picture
21
Aug
2008
0 Votes 0
Login to vote

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!

rahiz's picture
06
Feb
2008
0 Votes 0
Login to vote

Editing HTML

Hi,

How can I do this and where i need to make modifications.

cybi99's picture
07
Apr
2009
0 Votes 0
Login to vote

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

JeffPeters's picture
08
Apr
2009
0 Votes 0
Login to vote

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.

Cenveo_Ben's picture
15
Mar
2010
0 Votes 0
Login to vote

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>