Hi, I have a grid and dataview within Inspection Processing which shows where all the stock from the inspection record is located.
I also have a button which when clicked runs a fucntion to do a STK-STK move from whse to whse in the same bin which allows us to sell the product.
When i click the button only the top row of the grid is passed through the function.
When there is only one record this works perfectly, the inventory transfer works and then the data view is refreshed but with more than one row in the data view the first record is run through the function but the grid also doesnt update it leaves the row in the dataview meaning when you click the button again the same inventory transfer happens.
I am unsure on how to send all rows from the data view to the function and then have the dataview/grid refresh so it removes the rows once they are moved (they do disapear from the underlying BAQ)
I’m not sure how to do that but I wonder if you can “process” the additional rows by pulling the data straight from the DB into your Function. For example the first dataview row gives you a PO # to latch onto, then you use that to grab all Releases, etc., whatever would be in those other dataview rows.
This of course depends on the data structures you’re working with and whether the data in those dataviews are committed to the DB already when you trigger the Function.
@TomAlexander The dataview is a BAQ. Im using the rows to pass variables into a function.
I managed to refresh the dataview by calling the erp-baq widget again after the function which works fine.
I saw something about adding rows into a new dataview and then processing them once the row has been added to the new dataview but this is something i cant get my head around.
A For Each widget would be perfect
Not sure if this will work but I have a few instances where I just call the BAQ in the function then use a custom code widget to go through the returned rows and process another function for each row. A for each widget would be cool. I thought about trying a condition with an incrementing variable for each row also.
Hey OP, did you ever find out a good way to do this via App Studio? I am in a similar spot where I am trying to figure out how to analyze the rows in a displayed grid and send data from specific dataview/grid rows to a function depending on field values. (Not just field values from the current selected row). @klincecum this is for a different (kinetic) dashboard haha, very similar thing I am trying to figure out but basically from App Studio side.