Multiple value custom fields

HI,

I’m in the process of writing a scrip that needs to parse through multiple
value fields. How do I access these fields one at a time.

I tried:

while (defined $self->TicketObj->CustomFieldValues(‘Source IP’)->Next) {
$src_ip = $self->TicketObj->CustomFieldValues(‘Source
IP’)->Next->Content;
.
.
.

which resulted in a never-ending loop :S

Thanks for any help.

Ramon Kagan
York University, Computing and Network Services
Information Security - Senior Information Security Analyst
(416)736-2100 #20263
rkagan@yorku.ca


I have not failed. I have just I don’t know the secret to success,
found 10,000 ways that don’t work. but the secret to failure is
trying to please everybody.
- Thomas Edison - Bill Cosby


You want something more like:

my $cf = $self->TicketObj->CustomFieldValues(‘Source IP’);
while (my $value = $cf->Next) {
$src_ip = $value->Content;
}On Mon, Feb 21, 2005 at 02:56:05PM -0500, Ramon Kagan wrote:

HI,

I’m in the process of writing a scrip that needs to parse through multiple
value fields. How do I access these fields one at a time.

I tried:

while (defined $self->TicketObj->CustomFieldValues(‘Source IP’)->Next) {
$src_ip = $self->TicketObj->CustomFieldValues(‘Source
IP’)->Next->Content;
.
.
.

which resulted in a never-ending loop :S

Thanks for any help.

Ramon Kagan
York University, Computing and Network Services
Information Security - Senior Information Security Analyst
(416)736-2100 #20263
rkagan@yorku.ca


I have not failed. I have just I don’t know the secret to success,
found 10,000 ways that don’t work. but the secret to failure is
trying to please everybody.

  • Thomas Edison - Bill Cosby


Rt-devel mailing list
Rt-devel@lists.bestpractical.com
The rt-devel Archives