Hi all, I already made a post about this but the issue was not resolved.
I am trying to connect two SharePoint Lists for Ordering and Inventory. The Inventory List will be updated based on the activities of the Ordering List.
This is how I want the Flow to work:
- Item is created/ modified: Item in Ordering list is updated,
- Get Items: Get items from Inventory list.
- Condition: Is the Status of the item in the Ordering list equal to Received?
- No: Do nothing.
- Yes:
- Condition 2: Does the Product Name of updated item from Ordering list exist in the Inventory list?
- No: Create new item in Inventory List with values from Ordering list.
- Yes:
- Update item: Update Quantity of item in Inventory list - Current Quantity + Ordering list Quantity
I understand that Get Items returns an array but I don't understand how I can get one individual item to be updated or an individual item to be created.
The items are not compatible with ID because there will likely be multiple orders for the same products and I want the history of each order, but I only want one product existing in the Inventory List.
When I use the Update Item feature, because of the Get Items array, Power Automate puts in an "Apply to Each" which keeps giving flow failures either in saving or the flow gets to the Apply to Each and stops.
My question is how to achieve this?
Any assistance would be highly appreciated!
Attaching the pictures of the flow in its current setup.