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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Replace a name or name...
Power Automate
Answered

Replace a name or names in multi-select person column based on a Filter Query

(0) ShareShare
ReportReport
Posted on by 300

Hi! I need help trying to replace a name or names in a multi-person column that satisfies a filter query.

 

I have 2 SP Lists, ListData2 and ListData2Delegation.

ListData2 have a multi-person column for Signers (similar to approvers).

ListData2Delegation is where approvers log their time away for a period of dates (From and To).

 

My flow checks to see if any of the approvers of an item in main list are away and then I want to replace their names with the assigned backups from delegation List. Is this possible? My filter query works but I don't know how to update the names in multi-person column in ListData2.

 

Here is my flow:

 

jaanihsm_0-1717381814118.png

 

Any help is appreciated! Thank you!

Categories:
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @jaanihsm 

    According to your description, do you mean you want to directly replace the multiple-person  column in SharePoint?

    And you use the Filter query to get the items from your list and you just need to update the item when the length =1.

    So you can refer to this flow:

    vyueyunmsft_0-1717384206384.png

     

    outputs('Get_items')?['body/value']?[0]?['Signers']
    item()?['Claims']

     

    Best Regards,

    Yueyun Zhang

  • jaanihsm Profile Picture
    300 on at

    Hi @v-yueyun-msft. Thank you for your response! Appreciate your help and time! 🙂

     

    Do I add Select after Get Items? I tried this but I get this error...

     

    jaanihsm_0-1717446450799.png

     

    Also, will this work in this scenario? 

    I have 2 Signers, first one is available, second one needs to delegate? 

    How do I get the Signers array where it keeps the first name then replaces the second name with the assigned backup?

     

    Thank youu! 🙂

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi, @jaanihsm 

    This error code means that your expression is wrong in your side.

    vyueyunmsft_0-1717466350913.png

    outputs('Get_items')?['body/value']?[0]?['Signers']
     
    In my test flow ,  What it achieves is to replace all the people in the column.
    For example, the column in List A contains Person A and Person B; Then I'll replace the column in List B with Person A, Person B.
     
    And , i am not surely understand the meaning of "get the Signers array where it keeps the first name then replaces the second name with the assigned backup". Can you give me a screenshot for your two SharePoint list and give me a detailed example for it so that i can help you better!
     

     

    Best Regards,

    Yueyun Zhang

  • jaanihsm Profile Picture
    300 on at

    Thank you so much for the follow-up response @v-yueyun-msft! I really appreciate your time and efforts!

     

    Here is my main list (ListData2) where users create an item for signature/approval.

    Signers is a dynamic multi-select person column.

    Assigned To is a single-select person column and automatically gets the first signer then moves to the next one in the sequence.

    Signatures Collected (default value = 0) column counts the number of actions taken by the approvers. Flow continues to forward the approval until Signatures Collected = number of signers, unless anyone rejects.

     

    jaanihsm_4-1717536058554.png

     

    Here is my second list (ListData2Delegation) where signers/approvers log their time away.

    Delegating To is a single-select person column. 'Created by' will be one of the approvers that assigns a backup for a period of time (From, To).

     

    jaanihsm_3-1717536020801.png

     

    My Approval flow type is Approve/Reject - First to respond because I need the signers to sign in order.

    I need help to update the 'Signers' column through a Filter query from the ListData2Delegation

    where > (Author/Email eq 'Current Signer or Current Assigned To') and (From le 'utcNow()' ) and (To ge 'utcNow()').

    Replace the current 'Signer' (when it's his/her turn) with assigned back up from ListData2Delegation and apply the same to other Signers if applicable.

     

    Here is my approval flow without the delegation part. Not sure how to properly execute it. The screenshot from my first post is a test flow I'm trying.

     

    jaanihsm_2-1717535792958.png

     

    Thanks in advance for sharing your knowledge! Greatly appreciate it!

     

  • jaanihsm Profile Picture
    300 on at

    Is it best to first, take all Signers names and check if any of them have delegates based on the filter query, then replace the names of Signers satisfying the query while maintaining the Signers sequence and then start the flow approval? I'm not sure which way is better or easier. And I'm lost as to how to execute the delegation requirement. Thanks again @v-yueyun-msft !

  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @jaanihsm 

    I create a test flow and this is my test Sahrepoint and the end result in my side:

    vyueyunmsft_0-1717574116437.png

    This is my flow , you can refer to :

    vyueyunmsft_1-1717574149304.png

    (1)The Select and Get items action:

    vyueyunmsft_3-1717574267969.png

    concat( ' Author/EMail eq ''' , item()?['Email'] , '''' )
    join(body('Select'),' or')
    utcNow()
     
    (2)The Select 2 and initialize variable action:
    vyueyunmsft_4-1717574349825.png
    item()?['Author']?['Email']
     
    (3)The Apply to each action:
    vyueyunmsft_5-1717574502171.png
    contains(body('Select_2') , items('Apply_to_each')?['Email'] )
    true
     
    xpath( xml(json(concat('{"root":{"item":',outputs('Get_items')?['body/value'],'}}'))) , concat('/root/item[./Author/Email="' , items('Apply_to_each')?['Email']  , '"]/DelegatingTo/Claims/text()' ))?[0]
     
    items('Apply_to_each')?['Claims']
     
    (4) The Update item action:
    vyueyunmsft_6-1717574570850.png

     

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

     
     

     

     

     

  • jaanihsm Profile Picture
    300 on at

    Hi @v-yueyun-msft! I believe this is what I need! I will test and let you know! Thank you so much for your support! Greatly appreciate it. 🙂

  • jaanihsm Profile Picture
    300 on at

    Hi @v-yueyun-msft! I was able to test it today. Looks great! Working as expected! Genius!

     

    However I have a follow-up question. I also have an 'Assigned To' single-select person column which automatically gets the Signer name who is their turn to sign (based from the Signer order).

     

    How do I update it too? In this case, first Signer was delegated. Please see screenshot.

    I tried something but my outputs are inconsistent. 😞 Thank you so muuuch! 🙌

     

    jaanihsm_0-1717712312053.png

     

     

     

  • jaanihsm Profile Picture
    300 on at

    Hi @v-yueyun-msft! I hope you can help me with this last part on my flow. 🙂 Thank you in advance for your support!

  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @jaanihsm 

    Thanks for your response! If you want to make the first person in [Assigned To] column.

    You can use this expression in the last action:

    vyueyunmsft_0-1718072747477.png

     

    first(variables('Approvers'))?['Claims']
     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 249 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 202

#3
David_MA Profile Picture

David_MA 180 Super User 2026 Season 2

Last 30 days Overall leaderboard