Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

in-filter expression not working in odata/api

(1) ShareShare
ReportReport
Posted on by 4
I'm having issues with the in-filter expression in odata. It is simply not working in both an api endpoint or a odata web service.
 
Is is documented here:
 
When I try
 
query?$filter=resourceNo in ('USERA','USERB')
 
the filter is not applied at all (no error, simply the results as if no filter is applied at all)
If I use
 
query?$filter=(resourceNo eq 'USERA' or resourceNo eq 'USERB')
 
it works as expected.
 
This is against latest version of cloud sandbox (23.2.14098.14274) and the field is a normal code[20] field, no flowfield or something (although that shouldn't matter).
An I doing something wrong here or is this an issue in BC?
  • Nick Profile Picture
    Nick 4 on at
    in-filter expression not working in odata/api
    The 404 in your test is because you miss the ? before the $filter statement. But thanks for testing.
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 75,595 Super User 2024 Season 2 on at
    in-filter expression not working in odata/api
    Hi, I remember BC does not support in-filter expression. I just tested it again and it does not work. I checked the information on the Internet, and except for Microsoft's documents, no other experts mentioned that in-filter expression can be used.
    https://api.businesscentral.dynamics.com/v2.0/c8558e71-6ad8-4fcd-9f29-3ca165b41bbe/Sandbox223/ODataV4/Company('My%20Company')/VendorLedgerEntries$filter=Entry_No in (1760,1762,1768)
    Hopefully other experts can give you better advice.
     
    Thanks
    ZHU
     

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans