[rt-users] Custom Field values - included in Autpo-reply Template

Gene LeDuc gleduc at mail.sdsu.edu
Wed Dec 1 11:29:03 EST 2010


Hi Jo,

On 11/30/2010 9:31 PM, Joanne Keown wrote:
> Hi,
>
> I have been trying out numerous suggestions on how to code to include values from Custom Fields into an Auto-reply email.  The Custom Field is "First Name" and I want the first name entered on the ticket, to appear after the word "Hello" on the Auto-reply email.   The below is my latest attempt (based on user feedback on other threads) however, this doesn't work either as the email just doesn't send (NB; if I take the line of code out altogether then the email does send).
>
> Hello {my $First Name = $Ticket->FirstCustomFieldValue('First Name')}
>
> I'm not a programmer, so apologies if this problem sounds a bit 101, however I could really use some pointers.
>
> Kind regards
>
> Jo

If the line you included above is actually from your template, then the 
problem is the "my $First Name =" part.  Perl will see "$First" as a 
variable name and won't know what to do with "Name".  Try replacing "my 
$First Name =" with "my $First_Name =".  The underscore makes "Name" 
part of "$First".  I'm not sure whether spaces are allowed in custom 
field names.

Regards,
Gene



More information about the rt-users mailing list