<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Thanks for the info....I'm VERY new to RT....hopefully someday I'll gain enough knowledge to help others out myself...<BR>
 <BR>
Gary<BR><BR>> Date: Thu, 27 Mar 2008 11:33:31 -0700<BR>> To: huws@s2s.ltd.uk; sturner@MIT.EDU<BR>> From: gleduc@mail.sdsu.edu<BR>> CC: rt-users@lists.bestpractical.com<BR>> Subject: Re: [rt-users] adding custom filed value to email<BR>> <BR>> I cut my teeth on APL and used to spend hours shaving 7 or 8 bytes from the <BR>> size of 360 assembly language programs, so I do have an appreciation for <BR>> efficient and elegant coding solutions.<BR>> <BR>> However... several decades later and who-knows-how-many brain cells fewer, <BR>> I've found that I spend less time looking up function names and fixing <BR>> typos using code like:<BR>> <BR>> my $custom_field = get_custom("SomeField");<BR>> <BR>> and<BR>> <BR>> set_custom("SomeField", $my_val);<BR>> <BR>> ### I've also developed a new appreciation for comment lines in my old age. :)<BR>> <BR>> Gene<BR>> <BR>> At 10:13 AM 3/27/2008, Huw Selley wrote:<BR>> <BR>> >On 27 Mar 2008, at 16:57, Stephen Turner wrote:<BR>> > ><BR>> > > Please don't Huw, this has been very entertaining ;)<BR>> ><BR>> >:)<BR>> ><BR>> > > How about just<BR>> > ><BR>> > > return $Ticket->FirstCustomFieldValue($_[0]);<BR>> > ><BR>> > ><BR>> > > or even no subroutine - just use $Ticket->FirstCustomFieldValue($_[0])<BR>> ><BR>> >If you want to ditch the sub $_[0] will always be undef as there will<BR>> >be no @_ (because it's no longer a sub) :)<BR>> >In that case (to use it as a one liner) just:<BR>> ><BR>> >my $custom_field = $Ticket->FirstCustomFieldValue('SomeField');<BR>> ><BR>> >Huw<BR>> <BR>> <BR>> -- <BR>> Gene LeDuc, GSEC<BR>> Security Analyst<BR>> San Diego State University <BR>> <BR>> _______________________________________________<BR>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users<BR>> <BR>> Community help: http://wiki.bestpractical.com<BR>> Commercial support: sales@bestpractical.com<BR>> <BR>> <BR>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. <BR>> Buy a copy at http://rtbook.bestpractical.com<BR><BR><br /><hr />Windows Live Hotmail is giving away Zunes. <a href='http://www.windowslive-hotmail.com/ZuneADay/?locale=en-US&ocid=TXT_TAGLM_Mobile_Zune_V1' target='_new'> Enter for your chance to win.</a></body>
</html>