SharePoint auto generate column value using Power Automate or Flow

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:

“TSInfo-“+JobCategory+”-“+ID

SharePoint auto generate column

We can automatically generate this by using Microsoft flow or Power automate.

So let us create the flow.

Step-1:

Go to https://flow.microsoft.com and sign in with your Office 365 credentials.

Step-2:

Next click on Create from the navigation and then select Automated flow like below:

Create autogenerate id sharepoint using flow

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:

Create autogenerate id using flow

Then click on the Create button. And your flow will looks like below:

create flow for sharepoint
Microsoft flow

Step-3:

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.

Create autogenerate id using microsoft flow

Step-4:

Next, click on + Next step. And then search for variable in choose action.

There select Initialize variable.

Create auto generate column sharepoint

It should looks like below:

SharePoint auto generate column flow

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:

concat('TSInfo-',triggerBody()?['JobCategory']?['value'],'-',triggerBody()?['ID'])

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:

triggerBody()?['JobCategory']?['value']

And it looks like below:

SharePoint auto generate column microsoft flow

Step-5:

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).

SharePoint auto generate column value using Power Automate

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.
sharepoint list column auto generated value

Both the important flow action will looks like below:

Create autogenerate id sharepoint flow

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.

Step-6:

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.

sharepoint list column auto generated value

Once your Save the list item, the flow will trigger and it will update the SharePoint List column value like below:

sharepoint list column auto generated value using flow

You may also like my previous flow tutorials:

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.

>