Skip to main content
Solved

OData - Generic Inquiry Parameters

  • 22 November 2022
  • 3 replies
  • 752 views

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!

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/

 

 


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.


Glad to help!


Reply