Hi there - I'm fairly new to Power Apps and Power Automate but have searched the forums and haven't been able to piece together a solution for the issue I'm having.
I have built a model driven inventory management app using Dataverse. I have two tables: Inventory and Orders. In the Inventory table, I have a column called "StockQuantity". In the Orders table, I have several columns that indicate the quantity of an item to be ordered - they are named "Quantity1", "Quantity2", Quantity3", etc. I have established a Many-to-one relationship between the Order table and the Inventory table via an "Item" lookup column in the Order table.
When the user places an order for a certain quantity of an item by adding a value in the "Quantity" column, I would like to subtract that value from the total number in stock for that item ("StockQuantity") using a Power Automate flow.
I have tried to create a flow by using the "When a row is added, modified or deleted" trigger and assigning the corresponding "Quantity" column from the Orders table. However, when I go to add an action to "Get a row by ID" and select the "Inventory" table, the only dynamic content it allows me to choose from are only columns on the Order table, not the inventory?
I'm also struggling with how to use the Compose action to write the equation that would make this function work. 😞
Any help or ideas would be greatly appreciated! Many thanks in advance!