Filtering ODataV4 with list of values

TallyHoTallyHo Member Posts: 413
Hi,

I exposed a query in Web Services (query object added below).

I want to filter on multiple selected GLACC's. According to
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/use-filter-expressions-in-odata-uris
this is possible:
"In a list of values $filter=EntryNo in (610, 612, 614)
Query that returns entry numbers 610, 612, and 614"


So, I call the odatav4 api on my docker with.
http://bc24:7048/BC/ODataV4/Company('CRONUS Nederland BV')/GLTotals?$filter=GLACC_FilterOnly in ('7200', '7250')

But it just ignores the filter values for glacc's 7250 and 7200. It doesn't throw an error,
it just returns the aggregated totals for all glacc's.
Using the other filter methods presented in the dev-itpro page, do work.

Does anybody here know what am I overseeing?


query 50000 "G/L Totals"
{
QueryType = Normal;

elements
{
dataitem(GLEntryTotals; "G/L Entry")
{
filter(GLACC; "G/L Account No.")
{
}
filter("DATE"; "Posting Date")
{
}
filter(GDM1; "Global Dimension 1 Code")
{
}
filter(GDM2; "Global Dimension 2 Code")
{
}
column(GlobalDimension1Code; "Global Dimension 1 Code")
{
}
column(GlobalDimension2Code; "Global Dimension 2 Code")
{
}
column(Amount; Amount)
{
Method = sum;
}
}
}

}

Answers

Sign In or Register to comment.