[rt-users] CFs in Templates?

JB Segal jb at smarterliving.com
Fri Dec 14 19:27:09 EST 2007


Quoth JB Segal (jb at smarterliving.com):
> { my @CFlist = ('Product', 'Application Area');
>   foreach my $CFname (@CFlist) {
>   my $CFvalues = $Ticket->CustomFieldValues($CFname);
>   my $OUTPUT;
>   while ( my $value = $CFvalues->Next ) {
>     $CFName =~ s/ /-/g;
>     $OUTPUT .= "X-$CFname: ";
>     $OUTPUT .= ($value->Content eq '') ? $value->Content : 'unset';
>     $OUTPUT .= "\n";
>   }
>   $OUTPUT;
>  }
> }
> 
> but this doesn't work.
> 

fixing it so it read
    $OUTPUT .= ($value->Content neq '') ? $value->Content : 'unset';
doesn't help, and neither does
    $OUTPUT .= $value->Content ? $value->Content : 'unset';

I've reverted to the non-looping version for the weekend. I look forward
to enlightenment on Monday. :)

JB
--
JB Segal                 617-886-5575            www.smartertravel.com
Systems/Network Admin.   465 Medford St. Ste 400 www.bookingbuddy.com
Smarter Travel Media LLC Boston, MA 02129        www.tripmania.com



More information about the rt-users mailing list