In this Microsoft flow or Power Automate tutorial, we will discuss how to auto generate column value using Power Automate or Microsoft flow in SharePoint.
If you are new to Microsoft flow, you can check out a video tutorial on Microsoft flow or Power Automate.
SharePoint auto generate column value using Power Automate or Flow
I will show a simple example where we will auto generate column value for a SharePoint list using Power Automate or Microsoft flow.
The SharePoint Online list looks like below and we will create the JobID like below automatically.
Here, the JobID column will be generate like:
We can automatically generate this by using Microsoft flow or Power automate.
So let us create the flow.
Go to https://flow.microsoft.com and sign in with your Office 365 credentials.
Next click on Create from the navigation and then select Automated flow like below:
In the next screen, it will ask you to provide Flow name and in the choose your flow’s trigger select When an item is created like below:
Then click on the Create button. And your flow will looks like below:
Next, select the SharePoint site address from the Site Address dropdown like below. Once you select the SharePoint site, it will auto-populate the lists in the List Name dropdown. Select your List.
Next, click on + Next step. And then search for variable in choose action.
There select Initialize variable.
It should looks like below:
Here, Provide a Name for the variable, select Type as String and in the value click on “Add dynamic content” and select Expression and write the below expression:
Here JobCategory and ID and the list columns.
To get the selected value of a SharePoint list choice column, we have to write like below:
And it looks like below:
Now, we need to update the list column value with this value coming in the variable. For this click on + New Step and then you can choose Update item flow action (you can search for the action in the search box).
Now, we need to configure the flow “Update item” action.
Here Select the below properties:
- Site Address: Select the SharePoint site
- List Name: Then Select the required list, in this case the same Jobs list I have selected.
- Id: From the Dynamic content select the list item id column.
- Title: From the Dynamic content select the list item Title column
- Description: From the Dynamic content select the list item Description column
- JobCategoryValue: From the Dynamic content select the list item JobCategoryValue column
- JobID: From the Dynamic content, select the variable that we have created before.
Both the important flow action will looks like below:
Save the flow and by this step, we created our flow successfully, that will auto generate SharePoint list column value.
Next step is to test the flow and check whether it is working fine or not.
Open the SharePoint Online list (in my case Jobs list) and add one item like below:
Note: Don’t enter anything for the JobID column, this column value will be updated by the Microsoft flow. You can also remove the list column from the New form or edit form in the SharePoint list.
Once your Save the list item, the flow will trigger and it will update the SharePoint List column value like below:
You may also like my previous flow tutorials:
- Microsoft flow Send an email showing wrong time for SharePoint list column
- Microsoft flow change true to yes
- How to get manager email or name in Microsoft Flow (Power Automate)
- Create a Custom Document Template from SharePoint List using Microsoft Flow
- Microsoft Flow Example: Product Notification Approval Flow
- Microsoft flow copy list items to another list
You can also use various other string functions to make unique auto-generate value for the list column.
I have also created a complete video tutorial, to know how to auto-generate list column value using Microsoft Flow in SharePoint Online.
I am Bijay a Microsoft MVP (8 times – My MVP Profile) in SharePoint and have more than 15 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com