Reputation: 21
I'm trying to query Accounts from NAV2017 with OdataV4.
For your background but not directly related to the actual problem:
I have written a function to do a query and return an object. When querying I want to filter the list by the property 'No'(String). My input could be a string like "1600-1699" or "1600-1699,2000-2099" and so on. That's why I need to be flexible with my function and the ODATA query. I have tried the following with my function and also with Insomnia (which is very much like Postman). The results are the same, so the problem is not my code.
The actual problem:
The filter should be a range so I try the following:
http://myaddress/.../AccountList?$filter=(No ge '1600' and No le '1699')
This works perfectly fine. But if I try to add another range like:
http://myaddress/.../AccountList?$filter=(No ge '1600' and No le '1699') or (No ge '2000' and No le '2099')
I get:
501 "The OData filter expression is not supported."
My Question:
Why can't I combine two or more filter groups like I did above with the or
-operator?
Is there another way on how I could achieve my goal?
Thank you.
Btw. leaving out the parantheses/brackets has no impact.
Upvotes: 1
Views: 1428