Skip to main content
Solved

OData call to a GI with multiple values for a filter

  • February 9, 2026
  • 10 replies
  • 90 views

Forum|alt.badge.img

Hi,

How can I make an OData call to a Generic Inquiry with multiple values for a filter?  For example, OrderID is 1001, 1003, or 1004.

I know OData v3 does not support the “IN” filter clause.  But can I user parameters or OData v4 to retrieve multiple records based on an array of filter values?

Thanks!

Best answer by Naveen Boga

@bruno71   Currently, the only supported way to read data from a Generic Inquiry is through OData (v3). There isn’t an alternative API call to execute a GI directly, and OData does not support the IN operator.

So, when filtering by multiple values, using multiple OR conditions in the $filter clause is the supported approach. If this becomes too large or frequent, a custom REST endpoint would be a better long-term solution for your requirement.

10 replies

VardanV
Varsity I
Forum|alt.badge.img+1
  • Varsity I
  • February 10, 2026

Hi ​@bruno71 ,

Use multiple or conditions in $filter (most common)

GET /odata/MyGenericInquiry?$filter=OrderID eq ‘1001’ or OrderID eq ‘1003’

 

 


Forum|alt.badge.img
  • Author
  • Freshman II
  • February 10, 2026

I was afraid that was going to be the only answer.  I’m generating the request in code, so it’s certainly doable.  But there can be dozens of order numbers.  So it could be a request with 50+ “OR” conditions.

Will that be an issue?  And is this the most efficient method in terms of the SQL server query it creates?


Jhon Reeve Penuela
Freshman I
Forum|alt.badge.img

Hi ​@bruno71 ,

Use multiple or conditions in $filter (most common)

GET /odata/MyGenericInquiry?$filter=OrderID eq ‘1001’ or OrderID eq ‘1003’

 

 

Hi ​@bruno71 . I think this is only way to do that.


KrunalDoshi
Freshman II
Forum|alt.badge.img
  • Freshman II
  • February 20, 2026

Hi ​@bruno71,

I would add a condition in GI instead of adding a multiple SOs through OData request. Alternative, you can add a parameter to GI which you can use in your OData request to retrieve your data. Let me know if this helps.

Refer to below link for more help

Generic Inquiry Access Through OData: To Filter the Results of a Generic Inquiry

Retrieve a List of Sales Orders with Details and Related Shipments


Forum|alt.badge.img
  • Author
  • Freshman II
  • February 23, 2026

Hi ​@bruno71,

I would add a condition in GI instead of adding a multiple SOs through OData request. Alternative, you can add a parameter to GI which you can use in your OData request to retrieve your data. Let me know if this helps.

Refer to below link for more help

Generic Inquiry Access Through OData: To Filter the Results of a Generic Inquiry

Retrieve a List of Sales Orders with Details and Related Shipments

 

Neither article provides any information on how to add a filter with multiple values.


Naveen Boga
Captain II
Forum|alt.badge.img+20
  • Captain II
  • February 23, 2026

@bruno71 Did you get a chance to look into the below link regarding filters.

 

https://www.augforums.com/forums/acumatica-odata-with-microsoft-excel-and-power-bi/applying-filters-in-odata/


Forum|alt.badge.img
  • Author
  • Freshman II
  • February 23, 2026

@bruno71 Did you get a chance to look into the below link regarding filters.

 

https://www.augforums.com/forums/acumatica-odata-with-microsoft-excel-and-power-bi/applying-filters-in-odata/

I reviewed that article, but I did not find any information on how to filter based on multiple values (ie. “Order Number IN [001, 002, 005, 007]” )


Naveen Boga
Captain II
Forum|alt.badge.img+20
  • Captain II
  • February 23, 2026

@bruno71  Currently, Acumatica does not support Contains or IN conditions in this context. As a result, the available approach to retrieve multiple records would be to use multiple conditions combined with the OR operator.

That said, this is a great suggestion. I would recommend submitting this idea to the Acumatica Product Ideas forum, where the product team reviews enhancement requests. If approved, it may be considered for inclusion in a future release.

 

 

 

 


Forum|alt.badge.img
  • Author
  • Freshman II
  • February 23, 2026

Thanks, ​@Naveen Boga.  I am just making sure I exhaust all my options before building an OData call with 30+ OR clauses.  For example, is there some way to make an API call (instead of OData) to a GI? Or a way to use OData4 (instead of OData3) for reading from a GI?

If there truly is no other way to read data from a GI other than OData3 and multiple OR filters, then so be it.


Naveen Boga
Captain II
Forum|alt.badge.img+20
  • Captain II
  • Answer
  • February 23, 2026

@bruno71   Currently, the only supported way to read data from a Generic Inquiry is through OData (v3). There isn’t an alternative API call to execute a GI directly, and OData does not support the IN operator.

So, when filtering by multiple values, using multiple OR conditions in the $filter clause is the supported approach. If this becomes too large or frequent, a custom REST endpoint would be a better long-term solution for your requirement.