Hi all,
I am trying to create a Flow that will work like a Stock Control. The data is stored in 2 separate Sharepoint lists. One that displays current stock levels for multiple items and one that is updated when any stock goes out or comes in.
The idea is that if you add an entry for any stock going out or coming in, Flow will automatically adjust the stock levels in the other list.
I have started the Flow but got stuck on the update item step (where it should adjust the levels of the stock), it needs the ID of the item to update in the list but I am unsure how to get this. I need to be able to get the ID based on what the item name is if that makes sense?
Has anybody setup something similar before and could give some pointers?
Many thanks
Gary
Solved! Go to Solution.
This is a very common scenario in Flow. The main thing you need between both lists is a field that works as a unique ID, or as a Primary Key in database terms. For example, you can use the Title column from each list, and when you add or update an item in List A, you do a Get Items from List B matching the unique ID from the item in List A. If Flow finds it, then you can proceed to perform the Update Item action.
So you can have an idea, I have added a link below to one of the very first solutions I helped build with a user in the Flow Community board. Go through the post so you can see his scenario and then look at the solution; it should point you in the right direction. And if you have any questions, please do not hesitate to reach out.
Regards,
Fausto Capellan, Jr
This is a very common scenario in Flow. The main thing you need between both lists is a field that works as a unique ID, or as a Primary Key in database terms. For example, you can use the Title column from each list, and when you add or update an item in List A, you do a Get Items from List B matching the unique ID from the item in List A. If Flow finds it, then you can proceed to perform the Update Item action.
So you can have an idea, I have added a link below to one of the very first solutions I helped build with a user in the Flow Community board. Go through the post so you can see his scenario and then look at the solution; it should point you in the right direction. And if you have any questions, please do not hesitate to reach out.
Regards,
Fausto Capellan, Jr
Hi @GaryHounslow,
I agree with faustocapellanj suggestion.
You may need to set things like primary key for these two lists, so that when one of the list item changes, you could use this primary key to find corresponding item in another list, and then change it.
Could you please share a full screenshot of the configuration of your flow?
Please provide more details and which should be helpful for us to share a further suggestion.
Best Regards,
Barry
I have figured out a way around this now, the item field in the list is now a lookup field which also pulls back the ID of the item 🙂
Another query though, how do you put simple maths in to Flow? For example, add an item to the sharepoint stock control list and choose how many items are going out (or coming in) and then have flow alter the stock level amount for the corresponding item in the list based on what was entered?
So when doing the update item task in the Flow, in the stock level field it should be "stock level + Items in" or "stock level - Items out"
I hope that makes sense
Gary
I have figured this out now.
Thank you both for your replies, they pushed me in the right direction.
Gary
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
29 | |
28 | |
27 | |
20 | |
10 |