[rt-users] R: Question on use of Category in a scrip

Guadagnino Cristiano guadagnino.cristiano at creval.it
Wed Jun 10 11:32:09 EDT 2009


Hi Ken,
what do you mean by category?

Here is part of a scrip I use on our system (RT 3.8.3) that will print (in the log) the CF name, type and validation pattern. See if that helps.

my $ticket = $self->TicketObj;

my $CustomFields = $ticket->QueueObj->TicketCustomFields();
while (my $CustomField = $CustomFields->Next()) {
    my $nam = $CustomField->Name;
    my $typ = $CustomField->Type;
    my $vad = $CustomField->Pattern;

    $RT::Logger->info( ">  CustomField: $nam \n" );
    $RT::Logger->info( ">  CustomField: $typ \n" );
    $RT::Logger->info( ">  CustomField: $vad \n" );
}

Bye
Cris


Da: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] Per conto di Ken Crocker
Inviato: martedì 9 giugno 2009 20.26
A: Jesse Vincent
Cc: rt Users
Oggetto: Re: [rt-users] Question on use of Category in a scrip

Jesse,

    I was thinking that that particular command gave me the Custom Field value only. I don't see where the "category" value for that CF can be determined from that code.

Kenn
LBNL

On 6/9/2009 9:24 AM, Jesse Vincent wrote:





On Tue, Jun 09, 2009 at 09:21:41AM -0700, Ken Crocker wrote:



To List,



    Has anyone used the category of a Custom Field in a scrip? Does

anyone know how to access that information in a scrip? I need to create

a scrip where I need that information. Thanks.





$TicketObj->FirstCustomFieldValue('The CF Name');









Kenn

LBNL

_______________________________________________

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users



Community help: http://wiki.bestpractical.com

Commercial support: sales at bestpractical.com<mailto:sales at bestpractical.com>





Discover RT's hidden secrets with RT Essentials from O'Reilly Media.

Buy a copy at http://rtbook.bestpractical.com








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090610/19f957b8/attachment.htm>


More information about the rt-users mailing list