Build chained any query for singleValueExtendedProperties #1101
Replies: 2 comments
-
I managed to create the desired query, but would like to know if there is a clean way to achieve this.
Produces: |
Beta Was this translation helpful? Give feedback.
-
The Query object is there to help. You can always pass a string with your OData filter wherever you pass a |
Beta Was this translation helpful? Give feedback.
-
How do i build a query like this?
singleValueExtendedProperties/Any(ep: ep/id eq 'String {6ac8ccc0-0bad-4679-ac14-2d0501728d3e} Name MyCustomProperty' and ep/value eq 'myvalue')
I tried:
q.any(collection='singleValueExtendedProperties', word='String {6ac8ccc0-0bad-4679-ac14-2d0501728d3e} Name MyCustomProperty', operation='eq', attribute='id') q.chain('and').any(collection='singleValueExtendedProperties', word='myvalue', operation='eq', attribute='value')
but this results in
$filter=singleValueExtendedProperties/any(a:a/id+eq+'String+{6ac8ccc0-0bad-4679-ac14-2d0501728d3e}+Name+MyCustomProperty')+and+singleValueExtendedProperties/any(a:a/value+eq+'myvalue')
which leads to
Error Message: The filter expression for $filter does not match to a single extended property and a value restriction.
Beta Was this translation helpful? Give feedback.
All reactions