I am trying to simply update a product inventory list (subtract 1) when a new item is added to an order list. The flow runs successfully but does not update the Current Inventory field after a product is added.
@afaw as you are running the flow after each item is created your first action should be get item not get items. Then you can get rid of that apply to each control. What is in your condition?
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
Hey @afaw
can you please share more information about your formular within your condition?
Also your compose looks like just a text, instead of an expression, can you also show this action within flow edit mode?
Thanks in advance!
Best regards
Marvin
If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.
I tried Get Item and doesn't flow get Action 'Get_item' failed. The condition is simply matching the Inventory IDs.
Sure, the formula is sub(CurrentInventory, 1)
Hey @afaw
instead of a condition, please consider using the Filter Query within your SharePoint "Get items" filter, using something like
<Your Internal SharePoint Column Name> eq <dynamic value from your trigger>
example:
InventoryID eq 1
This will only return the items which meets your Filter, without getting every item and checking it in your flow using the condition. You can find more information here: Filter Query in SharePoint Get Items in Power Automate (sharepains.com)
With the Compose:
I meant it looks like you added the formula just as text into the "Inputs" like this, when you edit the flow:
It should look something like this:
When you click into the "Inputs" it should open a pane on the right side, where you can enter an "Expression":
I used a text for "CurrentInventory", you would need to use the dynamic value from your Trigger or SharePoint - Get items action.
Best regards
Marvin
If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.
I need Sharepoint to use the number in Current Inventory and minus -1 from it.
I now see the get items is looking at a different list, so my original comment was incorrect. But you do seem to have a problem with the compose action which subtracts the inventory number and updates it. Have you added it as an expression, not text, as @MarvinBangert has suggested?
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
I have tried both ways as Dynamic and Expression, neither works.
Could you share a Screenshot or the expression to us, so we can have a look on this?
Best regards
Marvin
If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.
I think i've got the flow down now but the formula isn't working because the output shows the same inventory before order was added. See formula.
You still haven't got the creation of the expression right: you're typing into the field which is wrong. In the Compose you click in the field then in the dynamic content box on the right you click on the Expression tab then enter the expression there, selecting where necessary the dynamic content from that tab. You need to create your expressions properly or it's never going to work.
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
Got it. However, I can't choose the Current Inventory dynamic field from the Expression within the formula.
Hey @afaw
you can switch between the Expression and Dynamic Field Tab, when you write your expression, it will get attached to your expression and you can switch back or do you mean, that the dynamic field is not visible, when you switch over to the dynamic field?
Best regards
Marvin
If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.
The dynamic field isn't visible.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
User | Count |
---|---|
25 | |
23 | |
23 | |
23 | |
17 |
User | Count |
---|---|
58 | |
39 | |
37 | |
29 | |
28 |