How to get Custom Field's description which setted by ExternalValues subroutine

Hi All,

I’ve got a problem with the Custom Field description issue. I created a
custom field named Contact, and when a new ticket is created, I use scrip
to add this Contact user to Requestor list.
I remember that when we set the ExternalValues with code below, we would
pass a description to RT
sub ExternalValues {


push @res, {
name => $element->{‘cont_name’},
description => $element->{‘cont_email’},
sortorder => $i++,
};

}

So i want to use this “description” value to create user or add to mail
list. Can anyone tell me how to get it?

I used code as listed below, but what i got is just the Description value
of this Custom Field, NOT the description of the custom field value I
passed in config file.

my $CF = new RT::CustomField($RT::SystemUser);
$CF->LoadByName( Queue => $ticket->QueueObj->id, Name => $CFName );
$Email = $CF->Description();

Any suggestions would be help, thanks a lot.

Br
Vodar
It’s not where you start – it’s where you finish that count.

Sorry for being annoying. Does anyone have any idea on this?

View this message in context: http://requesttracker.8502.n7.nabble.com/How-to-get-Custom-Field-s-description-which-setted-by-ExternalValues-subroutine-tp53939p53955.html

Hi,

This is description of a value that is not stored along with value on the
ticket or other object value is set on. The only way is to get list of
values, find one that was set on the object and get description. External
Custom Field Values are very sensitive to methods called on collection or
record, so you have to be careful.On Wed, May 22, 2013 at 1:02 PM, Vodar chrilde@gmail.com wrote:

Sorry for being annoying. Does anyone have any idea on this?


View this message in context:
http://requesttracker.8502.n7.nabble.com/How-to-get-Custom-Field-s-description-which-setted-by-ExternalValues-subroutine-tp53939p53955.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


RT Training in Seattle, June 19-20: Training — Best Practical Solutions

Best regards, Ruslan.

Hi.

I’m writing a scrip.
In that scrip, I have no trouble getting the value of a custom field that the user set.
I get the value with: $CF_Value = $self->TicketObj->FirstCustomFieldValue( ‘Colors’ );

But I don’t know how to get the content from the Description value for that same field?
To be clear: I want the description associated with the VALUE set in that CustomField, NOT the Description of the CustomField itself.

In other words, if MyCustomFieldName is a “Select One Value” type of CustomField, and some of the values look like this:

Name = “red” Description = “Red is a lovely color”
Name = “blue” Description = “Blue is nice too”

Inside the scrip I want to read that Description field. E.g. I need to set a variable to “Blue is nice too”, if the user has selected “blue” for the customfield called ‘Colors’.

Many thanks!
BrentRuslan Zakirovhttp://www.mail-archive.com/search?l=rt-users@lists.bestpractical.com&q=from:"Ruslan+Zakirov" Wed, 22 May 2013 03:45:32 -0700http://www.mail-archive.com/search?l=rt-users@lists.bestpractical.com&q=date:20130522

Hi,

This is description of a value that is not stored along with value on the

ticket or other object value is set on. The only way is to get list of

values, find one that was set on the object and get description. External

Custom Field Values are very sensitive to methods called on collection or

record, so you have to be careful.

chrilde at gmail May 21, 2013, 5:54 AM

Hi All,

I’ve got a problem with the Custom Field description issue. I created a
custom field named Contact, and when a new ticket is created, I use scrip
to add this Contact user to Requestor list.
I remember that when we set the ExternalValues with code below, we would
pass a description to RT
sub ExternalValues {


push @res, {
name => $element->{‘cont_name’},
description => $element->{‘cont_email’},
sortorder => $i++,
};

}

So i want to use this “description” value to create user or add to mail
list. Can anyone tell me how to get it?

I used code as listed below, but what i got is just the Description value
of this Custom Field, NOT the description of the custom field value I
passed in config file.

my $CF = new RT::CustomField($RT::SystemUser);
$CF->LoadByName( Queue => $ticket->QueueObj->id, Name => $CFName );
$Email = $CF->Description();

Any suggestions would be help, thanks a lot.