In this article, we’ll discuss how to auto-update columns in the SharePoint list using power automate flow.
Automation, the term that is growing day by day. Everything gets automated like jobs, monitoring and so on. It’s very important to know how to automate tasks to reduce manual work. In recent days, the Automation process hit as the maximum needed technology in and around the world of information technology market.
As a SharePoint developer, consultant and all roles related to SharePoint Online and On-Premises, it’s mandatory to know how to employ automation.
I hope this article will help to get basic knowledge of automation in SharePoint by using Power Automate. Before getting into Power Automate, we’ll discuss use case or real time scenarios of why we need auto updating columns in SharePoint.
In some cases, columns in the SharePoint list need to get auto updated as like Increment field of the Database. Usually, in Database you will set a certain field as auto-increment, so that the field gets auto updated without the manual input. The same thing we need to do in the SharePoint list.
In a database we can do easily by setting a certain field as auto-increment in the table, it will auto increment the particular column by one. Instead of auto-incrementing the columns, we are going to auto-update the columns in the SharePoint list.
Auto-updating or auto-generation in SharePoint can be done in several ways, in this article we are going to see one of the ways via Power Automate.
In Previous article, we have seen a detailed concept of Power Automate, Power Apps etc. As an overview, we’ll discuss again about Power Automate.
What is Power Automate and why do we need Power Automate?
It is nothing but a service that is used to create an automated-workflow between your application and other services to get notification, data synchronization and so on.
Power Automate helps a lot in data synchronization activities between apps and services.
Follow the steps given below to auto increment the column in SharePoint list.
Login to the Office 365 account. Create a site or Open Existing one Create a new list or Use Existing one.
Here New site and a new list is created as given below in the screenshots. We have taken a scenario to update the Job Id column automatically based on the Job number column. Create the columns as mentioned in below screenshot,
Navigate to Power automate portal Click create from side menu Choose automate flow to create a new workflow as given below in the screenshot.
Enter Flow name and choose flow trigger as “when an item is created” as given below in the screenshot, since we are auto updating the field based on new item creation.
Once it’s done Workflow screen will be loaded. Enter the site address and the particular list name in the SharePoint site as given below in the screenshot.
Once it’s done, Click at New Step Choose an action as “Variable”. Once the variable field is Clicked, Initializing the variable need to be done as given below in the screenshot.
Enter name, type as per the requirements. For value choose expression and add the expression given below for auto updating the field.
Based on Job Number, Job Id column will get auto updated as per the expression.
In Case if the expression fails, it will throw an error in the value field.
Once it’s done, Click at New Step Choose an action as “Update Row”. As we are updating the row in the SharePoint List.
Enter the site address List name in the particular SharePoint site. Id and title as given below in the screenshot. Here add the Job Id field as the Expression which was created in the previous step.
You will be able to check the workflows from the power automate portal itself, choose test icon on the top right corner Either test by trigger action or using data from previous runs.
When it is a newly created flow, Test by data from the previous run will be disable. Test by means of trigger actions
Output obtained as below in the screenshots as test run as succeeded.
Now navigate back to the SharePoint portal, enter all fields except the Job Id field, It will get auto generated by means of power automate.
Based on the Expression given in the initialize the variable, Job ID auto generated as given below in the screenshot.
Change the Expression field based on requirement and try to auto generate Job Column in different ways.
By using the same step, we will be able to perform various actions like auto-deleting a row or column and so on in the SharePoint list. This is not only a single way to auto-generate columns in the SharePoint list, it is one of the easiest and simplest ways.