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 Apps / Updating Sharepoint mu...
Power Apps
Answered

Updating Sharepoint multi person field with multi person inputs from PowerApps?

(0) ShareShare
ReportReport
Posted on by 42

TLDR: I have a multi-pick combo box on a PowerApps form which allows users to select multiple people as "stakeholders" for a document. Need to take that input and update the "Stakeholders" field for the pertinent Sharepoint file. Problem is that Flow gives various errors when I try to do this using "Update File Properties."

Situation:
Company we hired didn't deliver a document control solution we need. I'm not on our IT team but somehow ended up making the document control system and several flows to handle item-level permissions and approvals. Document Control is set up as a Sharepoint library with each file having required metadata fields. Now I'm trying to build a form so users can upload their own files and input the required metadata themselves.

It's possible I'm making this more difficult than necessary so let me know if I'm missing an obvious solution.

Via the PowerApps form users:

  1. Upload the file. When a button is clicked that file is then uploaded into the Sharepoint document control library.
  2. Specify metadata.

The metadata is then sent to a Flow which uses Update File Properties to update the appropriate metadata fields. All of the metadata updates fine except for Stakeholders. Stakeholders can be 0, 1, or more than 1 person. All stakeholders are selected via a single combobox on the form ("Combobox__Stakeholders").

Combobox__Stakeholders has Items set as:

 

 

Office365Users.SearchUser({searchTerm: ComboBox__Stakeholders.SearchText, top:10}) 

 

 


I don't know how Flow needs Stakeholders formatted so that they can be accepted in a multi-person field.  ANY help at all would be great.  I've tried MANY solutions some of which I remember enough to outline below.

 

Failed solutions:
I've tried sending over Stakeholders' emails as a semicolon deliminated string via:

 

 

Set(var__Metadata_update_results, 'Test:29f.3(PA)-UpdatemetadatafromBasic_form1'.Run(var__FileID, TextInput__Title.Text, Concat(ComboBox__Owner.SelectedItems, Mail, ";"), Concat(ComboBox__Approver.SelectedItems, Mail, ";"), Text(LookUp('Department List', Title=ComboBox__Department.Selected.Name, ID), "[$-en-US]#"), Text(LookUp('Document Type', Title=ComboBox__Document_Type.Selected.Name, ID), "[$-en-US]#"), Substitute(TextInput__Keywords.Text, Char(10), ";"), Concat(ComboBox__Stakeholders.SelectedItems, Mail, ";")).flowcomplete)

 

 

 

But the detail inputs array:

Stakeholder claims.jpg

sees that string as 1 user and thus rejects it since it can't find the concatenated use.  I was hoping it'd work because I was able to add multiple keywords/tags using that method.

 

I tried splitting the string of emails into an array then formatting to look like a normal array of claims and submitting it to Update File Properties using the "input entire array" format:

Claims snapshot.jpg

But this resulted in a "Bad gateway" error.

 

I think my lack of experience is making something relatively simple be extremely difficult.

If there's a way to directly edit metadata in a library with version history (both major & minor) enabled, then that would be even better since then I wouldn't have to keep tinkering with PowerApps and Flow.

 

Please let me know what other information you need to help me out.  Thank you!

Categories:
  • Verified answer
    OmegaCaesar Profile Picture
    42 on at

    I figured out how to do this.

     

    The Input Entire Array within Update File Properties accepts a properly formatted table and can figure out the rest from there.  The formatting is simply:

     

     

    [
    {
    "Claims": "email_1@domain.com"
    },
    {
    "Claims": "email_2@domain.com"
    },
    ...
    {
    "Claims": "email_N@domain.com"
    }
    ]

     

     

    Annoyingly, Flow will let you manually type in a string formatted as an array but won't let you just enter a variable which is a string.  A string was easy to create in PowerApps and pass to Flow but then Flow wouldn't let me put it in the Stakeholders field.

    The challenge therefore became to make an array which the Input Entire Array section would accept.

     

    I did that by:

    1. Put all Stakeholders' emails into a collection.  That creates an array which is perfect for my purposes except it's formatted to say "Mail" instead of "Claims".
    2. Fix the Mail vs. Claims issue by renaming the Collection column from Mail to Claims.
    3. However, Flow doesn't like to just accept Collections so you need to pass it via JSON.

      Code for steps 1-3:

     

     

    ClearCollect(var__Collection__Stakeholders, ComboBox__Screen_Metadata__Stakeholders.SelectedItems.Mail);
    ClearCollect(var__Collection__Stakeholders_Renamed, RenameColumns(var__Collection__Stakeholders, "Mail", "Claims"));
    Set(var__JSON__Collection_Stakeholders_Renamed, JSON(var__Collection__Stakeholders_Renamed, IndentFour))​

     

    Within Flow use Parse JSON and the output "Body" will be exactly formatted as Update File Properties requires.

  • OmegaCaesar Profile Picture
    42 on at

    Update: Within Flow I later had to take a file's multi-person field ("Stakeholders1") and make a second file's multi-person field ("Stakeholders2") exactly match the first file's multi-person group.  Just putting Stakeholder1 claims into the Update File Properties for file2 didn't work.  What I did was:

    1. Create a new blank array variable called "Stakeholders_Array"
    2. Take the Body of Stakeholders1 and put that into an Apply to each.
    3. Within Apply to Each use Append to Array to append a FORMATTED version of the Email.

    Stakeholder claims solution.png

    That formats everything as:

    [
     {
     "Claims": "Email1"
     },
     {
     "Claims": "Email2"
     }
    ...
    ]

    Doing it other ways led to Power Automate putting a \ before the quotation marks which made Update File Properties unable to use it.

     

    But now Stakeholders_Array can be input directly Update File Properties in "input entire array" mode.

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 Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard