Solved

OData - Generic Inquiry Parameters

  • 22 November 2022
  • 3 replies
  • 524 views

Userlevel 2
Badge

I am trying to execute a query against a GI using OData. I have been struggling in the fact that I need to make multiple round trips to retrieve data.

 

My question is, is there a way to query a GI and pass in a list of InventoryIDs?

 

This is what I am using now...and pulling one at a time. For a few thousand updates a night, this takes a long time.

/IN-InventoryBalance?$filter=InventoryID eq ‘MyInventoryID’&$format=json

 

Is there a way to pass is a list of InventoryID’s where I can get back multiple results? I could at least do this in a batch type of format. Maybe 20 at a time?

 

Thanks for your help!

icon

Best answer by Leonardo Justiniano 22 November 2022, 19:35

View original

3 replies

Userlevel 6
Badge +4

Hi @eelliston 

You can have multiple inventoryID using odata ‘or’ clause.

Example:

$filter=InventoryCD eq 'TFLB.DPR1.OS ' or InventoryCD eq 'TNLB.JK11.OS '

 

You can add as many or clauses as you need.

 

More info can be found here:

https://blog.skyvia.com/odata-cheat-sheet/

 

 

Userlevel 2
Badge

Thank you. That did help. I was thinking this approach might be slower with all the or clauses, but it doesn’t seem too bad after I tried it.

Userlevel 6
Badge +4

Glad to help!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved