Quoth JB Segal ([EMAIL PROTECTED]): > Kenn, > This is fabulous! Thank you so much. > Would you mind me sticking this in to the wiki to fix the broken > information that's in there?
I tweaked the wiki, mainly noting that what was there doesn't work, but also including a bit of the howto. Further wiki searching lead me to http://wiki.bestpractical.com/view/AddCustomFieldstoTemplates and Christopher C. Weis' helpful addition. I'm almost there. But... My problem now is... This works: { my $Pvalues = $Ticket->CustomFieldValues('Product'); my $AAvalues = $Ticket->CustomFieldValues('Application Area'); my $OUTPUT; while ( my $value = $Pvalues->Next ) { $OUTPUT .= "X-Product: "; $OUTPUT .= $value->Content; $OUTPUT .= "\n"; } while ( my $value = $AAvalues->Next ) { $OUTPUT .= "X-Application-Area: "; $OUTPUT .= $value->Content; $OUTPUT .= "\n"; } $OUTPUT; } but is, of course, ugly. I'm aiming at collapsing this in to a single, extensible loop, something like: { 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. What am I missing? It's probably REALLY stupid... really, I don't speak perl. Thanks in advance and I hope everyone has a great weekend! 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 _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users SAVE THOUSANDS OF DOLLARS ON RT SUPPORT: If you sign up for a new RT support contract before December 31, we'll take up to 20 percent off the price. This sale won't last long, so get in touch today. Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745. Community help: http://wiki.bestpractical.com Commercial support: [EMAIL PROTECTED] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com