It's all about the answers!

Ask a question

Is it possible to query on a custom attribute?


adam krumholz (111) | asked Nov 06 '13, 12:08 p.m.

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



permanent link
Brian Fleming (1.6k11928) | answered Nov 07 '13, 4:07 p.m.
What is the error you are getting?  Based on the lack of response to:
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
adam krumholz commented Nov 12 '13, 10:53 a.m.

I am getting the following error:

Error 500: CRRED0122E: Illegal syntax in fields argument: ].

Brian Fleming commented Nov 12 '13, 1:56 p.m.

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 &#39;workitem/mediumStringExtensions/key&#39; may not be used in a filter because it returns multiple values.

Your answer


Register or to post your answer.