<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">It might be good if someone could update the wiki with this code, but I don't think I should be the one to do it as I'm not a programmer. ;) I think it might be helpful for others trying to answer this question in the future.<br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>--</div><div>Cassandra Phillips-Sears</div><div>Office Manager</div><div>Best Practical Solutions, LLC</div><div><a href="http://www.bestpractical.com">http://www.bestpractical.com</a></div></div></div></span></div></span></div></span> </div><br><div><div>On Jun 10, 2009, at 11:12 AM 6/10/09, Rémi wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Ken,</div><div><br></div><div>here is the code I use to do what you want (quite painful like Jesse says ...)</div><div><br></div><div>my $CustomFieldObj = RT::CustomField->new($_[0]->CurrentUser);</div><div>$CustomFieldObj->LoadById($field);</div> <div>my $CFVs = $CustomFieldObj->Values;</div><div>while ($CFVs and my $value = $CFVs->Next ) {</div><div> if ($value->Name eq $_[0]->FirstCustomFieldValue($field)){</div><div> return $value->Category;</div> <div> }</div><div>}</div><div><br></div><div>($_[0] is a the Ticket object and $field is the CF id)</div><div><br></div><div><br></div><div>Rémi</div><div><br></div><br><div class="gmail_quote">2009/6/9 Ken Crocker <span dir="ltr"><<a href="mailto:kfcrocker@lbl.gov">kfcrocker@lbl.gov</a>></span><br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div bgcolor="#ffffff" text="#000000"> Jesse,<br> <br> <br> Painful?? Please explain. I'd love to hear it.<br> <br> Kenn<br> LBNL<div class="im"><br> <br> On 6/9/2009 11:56 AM, Jesse Vincent wrote: <blockquote type="cite"> <pre>On Tue 9.Jun'09 at 11:26:08 -0700, Ken Crocker wrote:
</pre> <blockquote type="cite"> <pre>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.
</pre> </blockquote> <pre>Indeed. I misread your question. Category is an attribute of the
CustomFieldValue, itself. Getting at it will require some more work
and will be a bit painful
</pre> </blockquote> </div></div> <br>_______________________________________________<br> <a href="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users" target="_blank">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</a><br> <br> Community help: <a href="http://wiki.bestpractical.com" target="_blank">http://wiki.bestpractical.com</a><br> Commercial support: <a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a><br> <br> <br> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br> Buy a copy at <a href="http://rtbook.bestpractical.com" target="_blank">http://rtbook.bestpractical.com</a><br></blockquote></div><br> _______________________________________________<br><a href="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</a><br><br>Community help: http://wiki.bestpractical.com<br>Commercial support: sales@bestpractical.com<br><br><br>Discover RT's hidden secrets with RT Essentials from O'Reilly Media. <br>Buy a copy at http://rtbook.bestpractical.com</blockquote></div><br></body></html>