It's all about the answers!

Ask a question

Is there a way to filter a reportable REST URL by the value of a custom attribute?


Brian Fleming (1.6k11928) | asked Mar 02 '13, 2:42 p.m.
workitem/workItem[stringExtensions/value="foo"]/id results in "Error 500: CRRED0135E: Illegal filter.  The field 'workitem/stringExtensions/value' may not be used in a filter because it returns multiple values."

Based on the discussion in 158711 I suspect the answer is no. 

I'm trying to create a document in RPE and I only want to include workitems that have a specific value set for a custom attribute.  Does anyone know of another approach I could take?

2 answers



permanent link
Brian Fleming (1.6k11928) | answered Mar 08 '13, 4:30 p.m.
I did not find any way to do this via REST, so used a Condition Script Expression (key == "bar"  && value == "foo") in a nested query (under a workitem/workitem/stringExtensions query) within RPE to filter work items by a custom attribute key/value.

permanent link
Antoine LELEU (5012728) | answered Jun 12 '13, 7:09 a.m.
Hi Brian,

I very interested by this Post.
I 'm not sure to understand the syntaxe of the query. Please, can you write an example of this type of query.

Thanks,

Antoine



Comments
Brian Fleming commented Jun 12 '13, 11:04 a.m.

In RPE, you would create a query with a scripted filter (these are RPE terms and not REST API terms).  In my example it looks like this:



Your answer


Register or to post your answer.