Auto Populate SharePoint List Columns Based on Value in One Column using Power Automate

Do you want to auto populate SharePoint list columns based on the value in one column using Power Automate? In this tutorial, we will see how to auto populate SharePoint list columns based on value in one column using Power Automate.

For example, I have a SharePoint list called Employee Directory, which contains the following columns:

  • First name
  • Last name
  • Joining Date
  • Department
  • Organization Email
Auto-populate Sharepoint list columns based on the value in one column using Power Automate

When a new employee is added to the list, we will automatically generate an email address by using First name and Last name. For example, first name =Grady and Last name = Jenifer, then the email ID will be Grady.jenifer@domain.com

Let’s say another employee joins the organization with the same name, in that case, the email id will be generated as Grady.jenifer1@domain.com.

Let’s see how we can auto-populate the email ID based on the first name and last name column using Power Automate.

Auto Populate SharePoint list columns based on the value in one column using Power Automate

Here we will see how we can auto-populate SharePoint list columns based on the value in one column using Power Automate.

Follow the below steps to auto-populate SharePoint list columns based on the value in one column using Power Automate.

1. Open Power Automate Cloud, click on “+Create”, and select Automated Cloud flow.

Auto-populate Sharepoint list columns based on the value in one column Power Automate

Then provide the flow name, and select the When an item is created action. Then click on Create.

auto populate column based on another column sharepoint list Power Automate

Now, you can When an item is created action is added to the flow. Provide the below information:

  • Site address: Provide the SharePoint site address.
  • List name: Provide the list name.
auto populate column based on another column sharepoint list in Power Automate

2. Next, we will create the first part of the email. for this, click on +New step -> select Compose action. Then provide the below information:

  • Inputs: Provide like below
@{triggerOutputs()?['body/Title']}.@{triggerOutputs()?['body/Lastname']}
How to auto populate column based on another column sharepoint list in Power Automate

3. Now we initialize a variable, where we will store their email address, for this click on the +New step -> select Initialize variable action. Then provide the below information:

  • Name: Provide the variable name
  • Type: Select the type as string
  • Value: Provide the value like below:
@{outputs('Compose')}@tsinfo.com
How to auto populate column based on another column sharepoint list using Power Automate

4. We will get the items from the SharePoint list, whose email address contains the firstname.lastname, of the current employee.

For this, click on +New step -> select ‘Get items action. Then provide the below information:

  • Site address: Provide the SharePoint site address
  • List name: Provide the list name
  • Filter query: Provide the query like below:
substringof('@{outputs('Compose')}',OrganizationEmail)
auto populate column based on another column sharepoint list using Power Automate

5. Next, we will initialize another variable which we will use as a counter, for this, click on +New step -> select Initialize variable action. Then provide the below information:

  • Name: Provide the variable name
  • Type: Select the type as Integer
  • Value: Provide the value as 0
sharepoint list auto populate column based on another field in Power Automate

6. Now we will check the organization’s email, for this click on +New step -> select Condition action. Then provide the below information:

  • Choose a value: Select the Orgemail variable from dynamic content.
  • Operator: Select the operator as is equal to
  • Choose a value: Select the Organizational Email -Get items, from dynamic content. This will automatically apply to each action.
sharepoint list auto populate column based on another field using Power Automate

7. Now if the condition becomes true, that means the email exists in the list. So, in the If yes part we will increment the counter by 1 and set the email with the counter.

First, in the If Yes part of the condition, click on Add an action -> select Increment variable action. Then, provide the below informations.

  • Name: Select the name as Counter.
  • Value: Provide the value as 1.
sharepoint list auto populate column based on another field Power Automate

Next, we will set the organization email; for this, click on Add an action -> select Set variable action. Then provide the below information:

  • Name: Select the variable name.
  • Value: provide the value like below.
sharepoint list auto populate column based on another field Microsoft Power Automate

8. Now, if the condition is false then the email does not exist in the list, so we can use the email. So we can directly update the email in the SharePoint list. For this, click on +New step -> select Update site action.

Then provide the below information:

  • Site address: Provide the SharePoint site address.
  • List name: Provide the list name
  • Id: Select the id from dynamic content
  • Organization email: Select Orgemail from dynamic content.
sharepoint list autogenerate columns based on another field Microsoft Power Automate

9. Now run the flow manually and create an item in the SharePoint list to make the flow trigger.

auto populate sharepoint list columns based on value in one column Power automate

Now you can see the flow ran successfully in Power Automate.

auto populate sharepoint list columns based on value in one column in Power automate

The Organization email is autogenerated with the Organization email field in SharePoint.

How to auto populate sharepoint list columns based on value in one column in Power automate

This is how to auto populate SharePoint list columns based on the value in one column using Power Automate.

Conclusion

In this Power Automate tutorial, we saw how to auto populate SharePoint list columns based on the value in one column using Power Automate.

You may also like the following tutorials:

  • >