<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:"Trebuchet MS";}
h1
        {margin:0in;
        margin-bottom:.0001pt;
        line-height:12.0pt;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Trebuchet MS";}
h2
        {margin-top:5.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        line-height:11.0pt;
        page-break-after:avoid;
        font-size:10.5pt;
        font-family:"Trebuchet MS";}
h3
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:6.0pt;
        margin-left:0in;
        page-break-after:avoid;
        font-size:8.0pt;
        font-family:"Trebuchet MS";
        color:black;}
h4
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:6.0pt;
        margin-left:0in;
        text-align:right;
        page-break-after:avoid;
        font-size:8.0pt;
        font-family:"Trebuchet MS";
        color:black;}
h5
        {margin:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:20.0pt;
        font-family:"Trebuchet MS";
        color:#5F9BCF;
        font-weight:normal;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:"Trebuchet MS";}
p.MsoFooter, li.MsoFooter, div.MsoFooter
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:"Trebuchet MS";}
p.MsoListBullet, li.MsoListBullet, div.MsoListBullet
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:"Trebuchet MS";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.BodyCopy, li.BodyCopy, div.BodyCopy
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:5.5pt;
        margin-left:0in;
        text-align:justify;
        line-height:11.0pt;
        font-size:9.0pt;
        font-family:"Trebuchet MS";}
p.Address, li.Address, div.Address
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:5.5pt;
        margin-left:0in;
        line-height:11.0pt;
        font-size:9.0pt;
        font-family:"Trebuchet MS";}
p.BlueBullets, li.BlueBullets, div.BlueBullets
        {margin-top:5.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:9.0pt;
        margin-bottom:.0001pt;
        text-indent:-9.0pt;
        line-height:11.0pt;
        mso-list:l2 level1 lfo1;
        font-size:9.0pt;
        font-family:"Trebuchet MS";
        color:#5F9BCF;}
span.BulletHighlight
        {font-family:"Trebuchet MS";
        color:#5F9BCF;}
p.BulletedText, li.BulletedText, div.BulletedText
        {margin-top:5.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:9.0pt;
        margin-bottom:.0001pt;
        text-indent:-9.0pt;
        line-height:11.0pt;
        mso-list:l1 level1 lfo2;
        font-size:9.0pt;
        font-family:"Trebuchet MS";}
p.ChartHeadline, li.ChartHeadline, div.ChartHeadline
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:9.0pt;
        font-family:"Trebuchet MS";
        color:white;}
span.EmailStyle26
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:-119;
        mso-list-type:simple;
        mso-list-template-ids:-844232150;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.25in;
        mso-level-number-position:left;
        margin-left:.25in;
        text-indent:-.25in;
        font-family:Symbol;}
@list l1
        {mso-list-id:188375409;
        mso-list-type:hybrid;
        mso-list-template-ids:-1653196144 644005994 1402504774 -1962386178 -23065280 -1074111796 -974348484 1119898426 1288722710 643723058;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-style-link:"Bulleted Text";
        mso-level-text:\F0B7;
        mso-level-tab-stop:9.0pt;
        mso-level-number-position:left;
        margin-left:9.0pt;
        text-indent:-9.0pt;
        mso-ansi-font-size:9.0pt;
        font-family:Symbol;
        color:#255282;
        text-decoration:none;
        text-line-through:none;}
@list l2
        {mso-list-id:1790511624;
        mso-list-type:hybrid;
        mso-list-template-ids:-1006877356 66467032 -1700212784 33853722 1079563414 1082569268 84672690 213937502 799435120 2052885906;}
@list l2:level1
        {mso-level-number-format:bullet;
        mso-level-style-link:"Blue Bullets";
        mso-level-text:\F0B7;
        mso-level-tab-stop:9.0pt;
        mso-level-number-position:left;
        margin-left:9.0pt;
        text-indent:-9.0pt;
        mso-ansi-font-size:9.0pt;
        font-family:Symbol;
        color:#5F9BCF;
        text-decoration:none;
        text-line-through:none;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I am trying to create a script with a custom condition that runs
upon ticket creation.  Depending on the value of a user-defined field, the
scrip should use one template or another.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>So far, in my Custom Condition I have:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>if ($self->TransactionObj->Type eq
"Create"){<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:.5in'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>if
($self->TicketObj->FirstCustomFieldValue('Parent Company') eq 'MY_COMPANY'){<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#
LOAD TEMPLATE #<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:.5in'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>} else {<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>#
LOAD DIFFERENT TEMPLATE #<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:.5in'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:.5in'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>return 1;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>}<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>else{<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:.5in'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>return undef;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>}<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Does this look right?  What do I need to add in
place of “# LOAD TEMPLATE #” to get the scrip to load a template?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Thanks,<br>
Craig<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>

</div>

</body>

</html>
<br>
THE INFORMATION CONTAINED IN THIS MESSAGE AND ANY ATTACHMENT MAY BE PRIVILEGED, CONFIDENTIAL, PROPRIETARY OR OTHERWISE PROTECTED FROM DISCLOSURE. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this message and any attachment is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and permanently delete it from your computer and destroy any printout thereof.