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 / Saving a collection of...
Power Apps
Answered

Saving a collection of Person objects back to SharePoint

(0) ShareShare
ReportReport
Posted on by 5

I have a PowerApps solution designed to capture user feedback.  It is very similiar to the App in a Day example, only instead of selecting computers, you select people. 

 

Screen 1:

Contains multiple people objects loaded from a sharePoint list Person column.   
They display and are selectable. 

Once selected they are added to a local collection named FeedbackList.

 

Screen 2:

Cotnains a gallery with the persons picture (as a reminder of your selections). 
I populate the gallery by setting the items property to FeedbackList.

 

My Problem:

Getting FeedbackList to populate the control so it can be saved back into the SharePoint multi-person column.

 

Other Items of Note:

When I added the form and datasource to my screen the muli-person column displays as a dropdown.

How do I get the FeedbackList collection of people to populate the dropdown so that it can be saved?

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

    Hi @bee-slo ,

    Do you want to set a collection with multiple people value as a multiple person field's default selected value?

    If so, I've made a similar test for your reference:

    In my test, the list name is survey, the multiple person field name is peo.

    1)insert a combo box to choose multiple people, insert a button to save the selected people data as a collection.

    set the combo box's Items:

    Choices(survey.peo)

    the button's OnSelect:

    ClearCollect(FeedbackList,ComboBox1.SelectedItems)

    The collection looks like this:

    3305.PNG

     

    2)Insert a  form to create new item in the sharepoint list.

    Unlock the multiple person field, set the combo box's DefaultSelectedItems:

    FeedbackList

    Then the combo box will display the people in the collection by default.

    3306.PNG

     

     

    Best regards,

  • bee-slo Profile Picture
    5 on at

    Sorry, have not figured out this picutre thing yet. Here is a better explanation. I am loading data from this SharePoint list. It includes a person column.

    SS_1.png

     

     

    This list is loaded into a selection screen where you can select mutiple persons.

    SS2.png

     

     

    Here is what the collection looks like after a person or persons is selected and you move to the feedback screen. I am only interested in saving the contents of the EEADObject Person column in the collection.

    SS3.png

     

     

     

     

     

    Here is the destination SharePoint list. The FeedbackFor column is of type Person with multiples allowed.  I cannot figure out how to iterate through the FeedBackList and create objects that can be assigned and saved to the FeedBackFor column.  

    SS4.png

     

     

    This is the Feedback screen. When I add an Edit Form to my Power App the FeedBackFor column is created as a Combo box in view mode. I think all I need to do is load the Person column from the FeedBackList? Once on the Feedback screen is presented, users cannot add or remove from the dropdown as it will be hidden. I just need to save who they selected to the list.

    SS5.png

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

    Hi @bee-slo ,

    Do you want to iterate through the FeedBackList to get all the selected person value and make them as one combo box's defaultselecteditems to update a person field?

    I've made a similar test for your reference:

    1)iterate through the FeedBackList to get all the selected person value

    you could insert a button and set the button's OnSelect:   (create another collection with all the selected person value)

    ClearCollect(selecteduser,{user:""});
    Clear(selecteduser);
    ForAll(FeedbackList,Collect(selecteduser,peo))

    342.PNG

     

    343.PNG

     

    //the new collection named selecteduser, peo is my multiple person field in FeedbackList collection

    On your side, you could try this:

    ClearCollect(selecteduser,{user:""});
    Clear(selecteduser);
    ForAll(FeedbackList,Collect(selecteduser,EEADObject))

    2)set the combo box's defaultselecteditems to all these selected people:

    set the combo box's DefaultSelectedItems:

    selecteduser

    // the new collection name

    344.PNG

     

     

    I think this issue's key problem is how to get nested table value, here's a similar issue that may help you a lot:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-access-nested-table-values/td-p/313821

     

     

    Best regards,

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 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard