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 :
Power Automate - Building Flows
Answered

How to update a department field from a people field in a list?

(0) ShareShare
ReportReport
Posted on by 351

I have a SharePoint list with a people field and a department field. I would like the department field to get automatically checked to make sure that person is still in that department. Based on my research this cannot be done with calculated fields but only dynamically via Power Automate.

I am guessing it would be a scheduled flow (eg. that runs daily) but beyond that I'm not quite sure how to get the departments of everyone in the person field and then update the department field. I do believe we use active directory if that helps.

What would be the best way to approach this?

I have the same question (0)
  • Verified answer
    Rhiassuring Profile Picture
    8,690 Moderator on at
    Re: How to update a department field from a people field in a list?

    Hi there, 


    Sure - we can do that. First, can you confirm that your Department entries into your field are displayed exactly the same as your Departments in AAD? We will be checking against AAD to identify the accuracy, presumably! 

    I've created a list for myself to demo on:

    Rhiassuring_0-1649915484244.png

    My department in AAD is "Consulting", so our goal is to get an update on the first entry, and a skip on the second. I am also making the assumption that you will only have one entry per person - if there are several entries per person, then, there might be a more efficient way to do this 🙂 


    Step 1 - Create a scheduled recurring flow for once a day (or weekly or whatever suits you.) 
    Step 2 - Add a "Get Items" action and point it at your list.
    Step 3 - Add a condition: On the left hand "Choose a value" side, add "PersonField Department" (in my case, it's called AssignedTo Department". On the right side, click and select your "Department" field.  ⚠️ Your condition will now be within an "Apply to each" and that's exactly what we want!

    Step 4 - On the "Yes" side, we do nothing - the departments are right! I'm adding a Compose in mine as a note, because ... well, I like to.  On the "No" side, we are just going to update the current item with the "Assigned To Department" in the "Department" field.

    All in all, it looks like this:

    Rhiassuring_1-1649916014188.png

     

    After running it, my updated list looks like this:

     

    Rhiassuring_2-1649916072605.png

     

     

    And the one that ran on the item with "Consulting" already as the Department (correctly), shows this in the run:

     

    Rhiassuring_3-1649916109300.png

     

    Cheers,

     

    Rhia

     

     

     

     

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 544 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 482 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 287

Last 30 days Overall leaderboard