cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

OData V4 query limitation for collection filtering?

viren
4-Participant

OData V4 query limitation for collection filtering?

Hi,

I am trying to write an OData query that can get all objects having a specific classification. This is quite easy to do with this command:

URL/servlet/odata/ClfStructure/ClfNodes(classID)/ClassifiedObjects.

Now this classID class had many parts in it and I want to narrow the search to only parts that are also part of another specific class. Knowing the ClfBindingAttributeAndNodeValues property, I thought I could do something like this in order to get only the parts I want :

URL/servlet/odata/ClfStructure/ClfNodes(classID)/ClassifiedObjects?$filter=ClfBindingAttributeAndNodeValues/any(d:d/clfNodeID eq NewClassID)

But this leads to a PROPERTY_NAME_NOT_SEARCHABLE error code. I suspect there is nothing wrong with my OData statement, as a similar statement works with the TripPin OData V4 test service. For example, the below statement filters the People data based on their email, which is a collection:

URL/TripPinServiceRW/People?$filter=Emails/any(d:d  eq 'Keith@example.com')

Do you know if it is a known limitation and if so, how can I make a query filtering what I want? I could do the filtering on the client side, but this would be really inefficient and resource intensive as I would have to handle all the parts listed in my ClassID classification...

Thank you for your help!




2 REPLIES 2
MichaelChatel
20-Turquoise
(To:viren)

Hi Viren,

 

I would suggest opening a Support case for this, as we have Support engineers who specialize in the customization/ODATA aspect of Windchill.

 

I wonder if this has to do with the entity json file, and the non-filterable parameter?

ex.

https://www.ptc.com/support/-/media/96F867EC504F4779A210009FD9175EED.pdf?sc_lang=en

 

Mike

 

 

viren
4-Participant
(To:MichaelChatel)

Ok thank you! I will do that.

Top Tags