Showing results for 
Search instead for 
Did you mean: 

Update a secondary SharePoint list using Flow


In this blog we are going to walk through the steps of building a custom Flow using SharePoint list. When a new item in the primary list is created the Flow will make updates to a secondary list items as well . Both the lists have a similar column which is used to build relationships.

Lists and columns
For this demo we have a Parent list and a Child list. Here are the columns of each list


Parent list - This list is used to record the make and model.





Child list - This list is used to record the number of accessories available for a certain model.





When a certain make and model is added as a new item to the Parent list, a Flow will run which looks for the same model in the Child list and will subtract the Keyboard quantity by 1.




Step 1: Select SharePoint




Then select 'SharePoint - When a new item is created'




Step 2: Add the site address and list name of your primary list. In this demo, we are using the Parent list.




Step 3: Click on New Step and select 'Add an action'





Step 4: Select the 'SharePoint Get Items action' and add the site address and Child list.




Step 5: Select New Step, click on More and select the 'Add an apply to each' action.




Step 6: Here select value from 'Get items'




Step 7: Select 'Add an action'




The action we are looking for is called 'Data Operations - Compose'. You can simply type in Compose to search for this action.




Step 8: This is a critical step. YOU MUST FOLLOW THIS STEP WORD FOR WORD IN ORDER FOR THIS TO WORK. The key point to remember is TYPE THE COLUMN NAME MANUALLY and not use the dynamic content that is available.
In this demo we will be subtracting the keyboard quantity value by 1. Hence go to the Child list and get the accurate column name for keyboard. In this case the column name is 'keyboard'. Below is a screenshot that shows the column name. Pay attention to the uppercase and lowercase. (The demo video available at the bottom shows how you can find these column names)




Now, in the compose action type in the following "@sub(item()?['Keyboard'],1)". You must add the double quotes as well as shown below. The output of this compose will be available as 'Output' which you will see below.



Step 9: This is where we add the condition which will look at the model of the item in the Parent list and compare it against all the items in the Child list.

On the left, select Model from 'When a new item is created'.




Keep the middle condition as 'is equal to'


On the right, select Model from 'Get items'




Here is what the fully populated condition looks like. As you can see, here you cannot identity which model comes from which list.




Step 10: In the 'IF YES' section. Add the Update Item action. Add the same site and list name you put in Step 4. The ID, Title and Model are the dynamic content from the 'Get Items'




In Keyboard, add Output which is the calculated value.




Note: You have the option to change the 'Output' display name to something meaningful such as 'Subtract'


Step 11 (optional) : This step to send out an email notification is option. In this step use the dynamic content from 'Get items'




This video will walk you through the above steps in detail and ends with demonstrating how the flow works.


Helpful links
- Workflow Definition Language
- Getting started with Microsoft Flow 
- Guided learning 


This blog has successfully demonstrated how a medium to advance level workflow built in SharePoint Designer can be rebuilt in Flow. The path followed in Flow is different from SharePoint Designer, however, the end result is the same!

Meet Our Blog Authors
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • Blog site: MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, Techcommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Founder of SKILLFUL SARDINE, a company focused on productivity and the Power Platform. Working on some cool stuff that you're going to enjoy. I also write at, so if you want some Power Automate, SharePoint or Power Apps content I'm your guy 🙂
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 12 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #M365 #Power Platform| Microsoft MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – Youtube channel -