Hi,
I have a dataset with Purchase Orders that need to update the quantity in an API.
The API can only accept one record at a time, and the performance deteriorates the more records are selected at a given time. So my thinking is to create a grouping macro that will split the records into groups of five and then loop one by one through the records in the group with a macro. then move on to the next group and so on. I am fine with the two individual processes as macros, but how do you combine them to work as a whole. E.g. 26 line items grouped into 20 Purchase orders as per the attached dataset, group into 4 groups of 5 PO's and then update the PO's individually into the API for the group. the API update is not a challenge, just the macro to decide what gets updated when.
Any help will be appreciated.
I am not sure I understand the group part?
Can we just use a batch macro send the data one after another, meaning the API operation will be inside the macro.
HI,
Yes I think that is the idea to include the API update in the macro. The grouping is to select only a previously determined number of records in a batch at a time, so if there are 20 records then select 4 groups of 5 records each, So update :
Group 1 : Iteration 0 PO 10000001 Iteration 0
10000002 Iteration 1
10000003 Iteration 2
10000004 Iteration 3
10000005 Iteration 4
Group 2 : Iteration 1 PO 10000006 Iteration 0
10000007 Iteration 1
10000008 Iteration 2
10000009 Iteration 3
10000010 Iteration 4
And so forth. Hope it makes better sense now.