[rt-users] Copying CustomFields in templates

Graeme Pyle graeme at raspberry.co.za
Wed Nov 19 03:41:08 EST 2003


Hello,

I've been copying custom fields from one ticket to a new one in a 
template as below:

CustomField-41: {$Tickets{'TOP'}->CustomFieldValues(36)->Next()->Content}

Unfortunately this fails if the custom field is not set. I assume Next() 
returns the Perl equivalent of null and then the call to "Content" fails.

Can anyone tell me how I can change my code snippet to simply return an 
empty string if the custom field is undefined?

Thanks,
Graeme




More information about the rt-users mailing list