web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Substring with case Insensitive filter is not working OData V4

(0) ShareShare
ReportReport
Posted on by 15

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

I have the same question (0)
  • Lars Lohndorf-Larsen Profile Picture
    Microsoft Employee on at

    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.

  • Frank Hillsnipe Profile Picture
    1,332 on at

    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.

  • Suggested answer
    awicz Profile Picture
    19 on at
    Use the @ symbol to enable case-insensitive results:
     
    $filter=tolower(Description) eq 'dininG chaiR'
     
  • Suggested answer
    NR-10050744-0 Profile Picture
    4 on at
    Just replying as this was top result when I was searching for an answer as this might help someone else. 
     
    I acheived this by setting an equals filter but wrap the search term in '@*....*'
     
    So the filter above would be $filter = Description eq '@*chair*'

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,949 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,064 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 559 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans