[rt-users] retrieving list of CustomField values using API in RT 3.6.3

Greg Petras gpetme at gmail.com
Wed Jul 18 19:03:00 EDT 2007


Hi -

Does anyone know how to enumerate a list of possible values for a
custom field type of 'Select Multiple Values'? Right now I'm doing
this:

my $queue = new RT::Queue($RT::SystemUser);

$queue->Load('my_queue');

my $CustomFields = $queue->TicketCustomFields();

while (my $CustomField = $CustomFields->Next()) {

    if ($CustomField->Name eq "Project") {

        my $CustomFieldValues = $queue->CustomFieldValues($CustomField->Id);
        print "COUNT: " . $CustomFieldValues->Count . "\n";
        print "Content: " . $CustomFieldValues->Content . "\n";

    }
}


Unfortunately, this doesn't completely work (specifically, the block
of code inside the if statement). $CustomFieldValues->Count and
$CustomFieldValues->Content both return nothing. Does anyone have any
pointers for me as to where to look for this info?

Thanks,

Greg



More information about the rt-users mailing list