Multiple Value custom fields in templates

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

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?

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: