OData in and not in filter not working with OData V4 Adaptor

I need to filter a OData Query to get de values that are not in a collection, the Odata working Query is:

https://localhost:44329/odata/peps?$filter= Id in (23ba746a-897c-4956-a002-08da2693dc19,22a3342d-60ee-4f23-a001-08da2693dc19)

it works with no problem but I could not find a way to make it work with your OData v4 Adaptor, All other where filters are working fine, but no "in" and "notin".

Could any one teach about how to make this filter?

Regards,

Héc


3 Replies

MS Monisha Saravanan Syncfusion Team April 28, 2022 02:11 PM UTC

Hi Crespo,


Greetings from Syncfusion support.


Query: “it works with no problem but I could not find a way to make it work with your OData v4 Adaptor, All other where filters are working fine, but no "in" and "notin".”


We have checked your reported query and we would like to inform that we have generated the filter query string by using “and” and “or” operator. Kindly refer the attached filter query string and UG for your reference.


Reference: https://blazor.syncfusion.com/documentation/data/adaptors#odatav4-adaptor


Filter query: https://services.odata.org/V4/Northwind/Northwind.svc/Orders?$count=true&$filter=(startswith(tolower(CustomerID),%27vinet%27))%20and%20(OrderID%20eq%2010248)&$skip=0&$top=10


OtherReference:

https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.WhereFilter.html

https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.WhereFilter.html#Syncfusion_Blazor_Data_WhereFilter_And_Syncfusion_Blazor_Data_WhereFilter_

https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Data.WhereFilter.html#Syncfusion_Blazor_Data_WhereFilter_Or_Syncfusion_Blazor_Data_WhereFilter_


If we misunderstood you query or if you have further queries. Kindly get back to us with more information regarding your query.


Regards,

Monisha



HC Hector Crespo April 29, 2022 06:39 AM UTC

I have implemented with where filter, thanks. Maybe could be useful and improves performance have in and not in to at least have a smaller query. But it´s only a tip. Thanks for help



MS Monisha Saravanan Syncfusion Team May 2, 2022 03:04 PM UTC

Hi Crespo,


Welcome. Kindly get back to us if you have further queries.


Regards,

Monisha


Loader.
Up arrow icon