Announcements
Working on the filter options through ODataV4 endpoints.
In the API I have a field name called Description and it has the value.
No: "BC001",
Description: "Black poly chair"
No: "BC002",
Description: "Dining Chair "
If I search for the word "Chair". that should bring all the Items ( Case shouldn't matter).
This is the Filter Option I'm using for it.
$filter=contains(tolower(Description),'chair').
Actual URL I'm trying:
api.businesscentral.dynamics.com/.../
Note: $filter= tolower(Description) eq 'dininG chaiR ') is Working, showing empty result.
When I apply the same, under the contain option., that time only its not working.
Example : In the below example they provided the solution that is for services.odata.org. I tried the same code for filter. but still I'm getting empty result.
https://github.com/OData/ODataSamples/issues/66#issue-257575195
Can you help me for solve this.
Thank in Advance
As of September 30th 2022 - This is a documented limitation, note the "Nested function calls" section in the article.
learn.microsoft.com/.../use-filter-expressions-in-odata-uris
"Nested function calls in filter clauses aren't supported in the current OData implementation. This means that filter clause expressions like contains(tolower(field), 'some') don't return the expected results - in this case a partial case-insensitive text search - but will instead either throw an error or return an undefined result."
If anyone has a way around this issue I would greatly appreciate it.
Hello,
I am interested too - I can get this to work:
{{BaseURI}}/companies(2e396114-00ff-ea11-bc53-00155df3a615)/items?$filter=tolower(displayName) eq tolower('LONDOn Swivel Chair, blue')
but this returns nothing:
{{BaseURI}}/companies(2e396114-00ff-ea11-bc53-00155df3a615)/items?$filter=contains(tolower(displayName),tolower(%27chair%27))
I know this does not help you much, but I will try to research a bit and return here if I find out something, and meanwhile I hope others also have some ideas.
André Arnaud de Cal...
294,219
Super User 2025 Season 1
Martin Dráb
232,980
Most Valuable Professional
nmaenpaa
101,158
Moderator