Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

in-filter expression not working in odata/api

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 68,586 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
     

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,326 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,166 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans