[rt-users] Custom Field values - included in Autpo-reply Template
Kevin Falcone
falcone at bestpractical.com
Wed Dec 1 12:06:30 EST 2010
On Wed, Dec 01, 2010 at 08:29:03AM -0800, Gene LeDuc wrote:
> 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.
Spaces in custom fields are perfectly valid.
Jo didn't seem to want to assign to a variable at all, so
Hello { $Ticket->FirstCustomFieldValue('First Name') }
is likely to be closer to what she wants, since it will print
the content of the CF.
-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20101201/1464a16d/attachment.sig>
More information about the rt-users
mailing list