web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : UvXFpSwZcPfSIkGcvMcZMh
Power Automate - Building Flows
Unanswered

How to look up for a Person profile in one Sharepoint list and update it in a Person column of another Sharepoint list when an item is created

Like (0) ShareShare
ReportReport
Posted on 8 Dec 2023 18:33:03 by

Hi all,

I'm new to Power Automate flows building, so apologies if this is a silly question.

I have two Sharepoint list. The first one (list A) contains contracts information (contract number, budget, etc.) and a Person or Group column with the name of the assigned person who is responsible for each contract.

The second list ( list B) will receive requests/tasks to be performed with the contract. The contract number is unique identifier and is showing in both lists. I need list B to pull the person assigned to the contract from list A and populate it in a Person or Group column. 

I tried creating a lookup column and pull the details but it does not work for Person or Group type columns.

I also created a flow in list A that takes the Person and populates the name in a text type column. Then, with a lookup column pulled the name string in list B, but I have trouble creating the reverse flow in list B that should take this text string and turn in into a Person. 

Could you please advise if my goal can be achieved with a flow and how would you design the flow? Is it possible to convert the text string into a Person in list B or you would use a different approach?

I have the same question (0)
  • creativeopinion Profile Picture
    10,480 Super User 2025 Season 2 on 10 Dec 2023 at 03:52:46
    Re: How to look up for a Person profile in one Sharepoint list and update it in a Person column of another Sharepoint list when an item is created

    @tashevsv 

     

    You'll need to switch to the Classic Designer to follow along. 

    creativeopinion_0-1702159082745.png

     

    Tip: Rename your actions to keep your flow organized.

    Manual Trigger

    I'll be using a manual trigger in my flow example—I'd recommend using a manual trigger while you test and build your flow. Replace it with the appropriate trigger once you've finalized the flow. This will help speed up the flow building process. 

    creativeopinion_1-1702159173413.png

     

    Get Tasks

    I don't have a lot of information to go off of based on what you supplied originally. I'm assuming you are going to want to get the items from your task list and populate the Assigned To column with the proper user profile.

     

    Whenever you use a Get Items action, you'll want to use a Filter Query (if possible) to reduce the number of items returned. Additionally, when I'm building a flow... I like to limit the number of items returned to a small number. This helps to speed up your flow run making it a lot more efficient to build your flow. Do what works for you.

     

    In my Filter Query I'm filtering out items where the Assigned To column is empty. You will need to use the internal column name of your Assigned To column (it may be different than mine). If you aren’t sure how to get this, please refer to this section of one of my YT tutorials.

     

    I've limited my top count to 3. 

     

    creativeopinion_5-1702159444156.png

     

    I have 5 items in my SP list, with a lookup columns to another list of Clients.

     

    creativeopinion_1-1702161595140.png

     

     

     

    Return Number of Items

    Whenever I use a Filter Query in a Get Items action, I always like to return the count of items returned in a Compose action. This is helpful when building a flow and can also be used to troubleshoot your flow.

    Insert a Compose action. Click on the expression tab and add an Expression. Use the length() function.

    creativeopinion_9-1702159766673.png

     

    Select the Dynamic content tab and insert the value dynamic content from the Get Items action into the length() function.

    creativeopinion_10-1702159792921.png

     

    creativeopinion_16-1702160498283.png

     

     

    Run a test. Confirm that the number of items returned from the Get Items action is correct before moving on. 

    creativeopinion_17-1702160536541.png

     

    Condition Check

    Again, I'm unsure of your trigger conditions for this flow. You can add a Condition check to your flow to check that there are items returned from the Get Items action before continuing on with your flow. 

     

    Add a Condition action and insert the outputs from the Compose action above into the first value field. Change the operator to is not equal to and set the second value field to zero. 

    creativeopinion_12-1702159945927.png

     

    Get Look Up List

    In the YES branch of the Condition action. Insert the Get Items action. To make this flow more efficient, you'll want to get your look up list once and Filter the list based on the task list. Running the Get Items action more than once on the same list multiple times in a flow is inefficient. 

    creativeopinion_13-1702160112508.png

    Loop through Each Task

    Add an Apply to each action and insert the value dynamic content from the Get Items (Task List) action. This is why it's important to rename your actions, otherwise you may accidentally select the wrong dynamic content. 

    creativeopinion_14-1702160246822.png

    This action will loop through each Task returned from the first Get Items action in your flow. 

     

    Compose Current Item Dynamic Content (Optional)

    This step is optional. However, if you are new to Power Automate I would recommend using Compose actions to help you troubleshoot your flow and to better understand the logic in your flow. 

     

    Add a Compose action. Insert the dynamic content storing the task name. In my case, it's the Title field. If your task name is in a different column in your SP list, please select the appropriate dynamic content. 

    creativeopinion_15-1702160424161.png

    Run a test. Review the outputs of the Compose action. In the Apply to Each action use the navigation buttons to go to the next/prev item returned. The Compose action should output the Task value.

     

    creativeopinion_18-1702160557954.png

     

    I'll add one more Compose action to store the look up ID. This is optional—you can use the dynamic content directly in the next action if you prefer. Because you are referencing a look up column, you want to make sure you are selecting the value to dynamic content to be returned. 

    creativeopinion_5-1702161855761.png

     

     

     

    creativeopinion_0-1702161579698.png

     

    Run a test. Check the output to ensure you are returning a value and not an object. 

    creativeopinion_6-1702161904120.png

    Filter Look Up List Array

    Next add a Filter Array action. We'll use this action to filter the array of items from the second Get Items action (returning the look up list). 

     

    To learn more about how to use the Filter Array action, please refer to this YT Tutorial.

     

    Insert the Value dynamic content from the Get Items action above (in the YES branch—not the first Get Items action in your flow). 

    creativeopinion_20-1702160828827.png

    In the first value field, insert the dynamic content from the column that is storing your unique id. In my case, it's the Client ID column. Leave the operator as is equal to

     

    creativeopinion_3-1702161657584.png

    In the second value field insert the output from the Compose action above. Remember that this Compose action output contains the lookup unique ID for the current item being looped through.

     

    The Filter array will check the values returned from your SP list that contains all the look up values and check the unique identifier column to see if it matches the lookup id that is associated with the current item being looped through.

    creativeopinion_4-1702161672767.png

    Return Filter Array Count

    Just as we did above, we're going to return a count of items from the Filter Array action. If the Filter Array action locates the look up item—it should always return a value of 1 (since the ID is unique).

     

    creativeopinion_23-1702160996843.png

    creativeopinion_25-1702161039305.png

    Run a test.

     

    creativeopinion_7-1702162019639.png

     

    Condition Check (optional)

    As we did previously, add a Condition action and insert the output from the Compose action above into the first value field. Change the operator to is not equal to. Enter 0 into the second value field. 

     

    I can't imagine why the Filter Array action wouldn't return any items... so this condition check is optional. 

    creativeopinion_0-1702165961388.png

     

    Get Assigned To User from Filter Array

    Refer to this section of a YT Tutorial I uploaded on how to get dynamic content from a Filter Array action. 

    Take a look at the outputs from the Filter Array action. We need to get the email address from this Filter Array action. Just as above, we'll store it in a Compose action. 

    creativeopinion_2-1702166224663.png

     

    Add a Compose action to the YES branch of the Condition action. Insert an expression. The Filter Array action will always return an array (even if it's a single item). 

     

    In order to return the email address from the Filter Array action, you'll need to indicate the index number of the item in the array. The first item in an array is [0], the next is [1] and so on... 

     

    Insert a question mark, the item key which is [0] in this case and square brackets with single quotes. 

     

    ?[0]['']

    Inside the single quotes, enter the key for the value you'd like to return. The Email value is nested inside the AssignedTo (in my case) key. Yours might be different. The key for my email value is AssignedTo/Email.

    creativeopinion_0-1702179096812.png

    Place your cursor at the start of the expression and select the Dynamic content tab. Insert the Body output from the Filter Array action to the front of the expression. 

    creativeopinion_2-1702179434932.png

    Run a test. 

    creativeopinion_3-1702179615517.png

    Update Item

    Add an Update Item action. Remember that all actions are currently nested inside the Apply to each action. 

    creativeopinion_4-1702179709054.png

     

    The Apply to each action is looping through each item in the task list. The Update Item action will update the current item being looped through. Ensure that you are selecting the correct ID dynamic content. Because the flow has two Get Items actions—you'll need to select the ID dynamic content from the first Get Items action. 

    creativeopinion_5-1702179890621.png

    In the Assigned To field (your field name might be different). Select Enter custom value.

    creativeopinion_6-1702180169021.png

    Insert the Outputs from Compose action above that contains the email address from the Filter Array action. 

    creativeopinion_7-1702180185495.png

    Run a test.

     

    Check your Task List in SharePoint. 

    creativeopinion_8-1702180290860.png

    For reference, this is the Look Up list. 

    creativeopinion_9-1702180331420.png

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok
     
     

     

     

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 626 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 374 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 284 Most Valuable Professional

Last 30 days Overall leaderboard