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

ODATA URI not contains doesn't work

(0) ShareShare
ReportReport
Posted on by 7

Hi,

I want every record that doesn't contain a specific word.

I've tried the following:

"not(contains({Field}, '{Value}'))" resulting in "Client requests that contain ''Not'' filter options are not supported by Dynamics 365 Business Central OData web services."

"not contains({Field}, '{Value}')" resulting in "Client requests that contain ''Not'' filter options are not supported by Dynamics 365 Business Central OData web services."

"indexof({Field}, '{Value}') eq -1" resulting in "Client requests that contain ''indexof'' filter options are not supported by Dynamics 365 Business Central OData web services."

Can anyone explain why this is happening and why these things are not supported while the documentation here says that it does and how I can fix this?\

learn.microsoft.com/.../use-filter-expressions-in-odata-uris

I have the same question (0)
  • DAnny3211 Profile Picture
    11,417 Super User 2026 Season 1 on at
  • Suggested answer
    YUN ZHU Profile Picture
    99,084 Super User 2026 Season 1 on at

    Hi, unfortunately, as far as I know, "not" is not supported in BC's API and Odata's filter method.

    I'm not sure if "indexof" is supported. Anyway we can only avoid using these methods.

    Hope that other experts can give you better advice.

    Thanks.

    ZHU

  • B Menick Profile Picture
    7 on at

    Hi Zhu

    I've tried a few things as described above. Which one of the things was the indexof and unfortunately it says that it isn't supported.

    Bo

  • B Menick Profile Picture
    7 on at

    Hi Daniele

    The problem with the first link is that my list would be way too big. There are too many combinations to consider which is why I need a contains functionality or something similar to that.

    The second link is a link that I'm already aware of. But for some reason some of those filter expressions are not supported. Any idea why?

    Bo

  • B Menick Profile Picture
    7 on at

    Hi

    I found a solution to this.

    I found out that contains works in a bit of a weird way. We need to compare it to a boolean.

    For example:

    contains({Field}, '{Value}') eq true

    But to check if it DOESN'T contain a certain value we have to use ne true instead of eq false. Because eq false doesn't return any records but says that the odata uri query is valid. So for some reason using ne true does return the correct records.

    For example:

    WORKS: contains({Field}, '{Value}') ne true

    DON'T WORK: contains({Field}, '{Value}') eq false

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,946 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,177 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 555 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans