[rt-users] Re: Multiple Value custom fields in templates

taan taan at cryologic.com
Fri Sep 22 00:09:01 EDT 2006


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: ", at 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
>>
> 
> 




More information about the rt-users mailing list