[rt-users] Finding distinct CustomField values

Bret Martin bam at miranda.org
Mon Jul 12 15:53:43 EDT 2004


I'm making various customized versions of the Quicksearch element and
one I'd like to do is to list ticket counts by a text-entry
("FreeformSingle") custom field.

The Values method returns a CustomFieldValues of acceptable values for
the given CustomField -- for a text-entry one, it's empty (as I supposed
is to be expected).

I know how to do what I want in SQL, but it's a no-no to circumvent the
RT API:

	SELECT DISTINCT(Content) FROM TicketCustomFieldValues AS tcfv, \
		CustomFields AS cf \
		WHERE tcfv.CustomField = cf.id \
		AND cf.Name = 'Lab';

Can I get similar results via the RT API?

--Bret





More information about the rt-users mailing list