Is it possible to query on a custom attribute?
I am currently building a set of queries using the RTC REST API. Below is the query that is giving me trouble. I have added carriage returns for readability.
If i remove the mediumStringExtensions from the filter portion of the query data is returned and the product application structure is returned.
e.g.
<mediumStringExtensions>
<key>com.ak.adt2.workitem.attribute.productapplication</key>
<helperId>_TTqPsSzYEeMzHuEstN_GtQ</helperId>
<value>Reporting system V1</value>
<numericValue>0.0</numericValue>
</mediumStringExtensions>
When I add the filter mediumKeyExtensions to the query I get an error. Is it possible to query on a custom attribute that is used to populate a dropdown combo box? Is this a syntax issue?
https://adam.kaye.com/ccm/rpt/repository/workitem?fields=workitem/workItem
[
modified > 2013-10-24T10:10:53.000-0500
and
mediumStringExtensions[key="com.ak.adt2.workitem.attribute.productapplication"]/Value = "Reporting System V1"
]/
(
id|
creationDate|
mediumStringExtensions[key="com.ak.adt2.workitem.attribute.defecttype" or
key="com.ak.adt2.workitem.attribute.productapplication"]|mediumStringExtensions/*
)
One answer
https://jazz.net/forum/questions/104578/is-there-a-way-to-filter-a-reportable-rest-url-by-the-value-of-a-custom-attribute
and the discussion in 158711 I do not think its possible to filter a REST query by a custom attribute.
Comments
I am getting the following error:
Error 500: CRRED0122E: Illegal syntax in fields argument: ].
That error indicates your query is not structured properly, but its hard to tell what your original query was given the formatting above. When I try this query:
https://<hostname>:<port>/<contextroot>/rpt/repository/workitem?fields=workitem/workItem[mediumStringExtensions/key="a"]/id
I get this error:
Error 500: CRRED0135E: Illegal filter. The field 'workitem/mediumStringExtensions/key' may not be used in a filter because it returns multiple values.