Solved with following code:

CustomField-Serial Numbers: {
  my $values = $Tickets{'TOP'}->CustomFieldValues('Serial Numbers');
  my @SNUM;
  while ( my $value = $values->Next ) {
        push (@SNUM, $value->Content);
         }
  join ("\nCustomField-Serial Numbers: ",@SNUM);
}



taan wrote:
I found that I can have multiple lines in the template to add multiple values to a custom field. eg:

CustomField-Serial Numbers: 1234
CustomField-Serial Numbers: 5678


however, how do I iterate through an unknown number of CustomField values, ie how do I include the CustomField template variable inside the perl code?



I have a "Create-Ticket" template, and in the template I would like to assign values to a custom field of type "Multiple Values". The problem is only the first value is assigned. Is there any way to do this.

Here is where I assign values in the template:

CustomField-Serial Numbers: { my $values = $Tickets{'TOP'}->CustomFieldValues('Serial Numbers');
  my $OUTPUT;
  while ( my $value = $values->Next ) {
        $OUTPUT .= $value->Content;
        $OUTPUT .= "\n";
  }
  $OUTPUT;
}

thanks
Taan




_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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

Reply via email to