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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patching ComboBox Item...
Power Apps
Answered

Patching ComboBox Items to Multi-Select People Picker Column in SharePoint

(0) ShareShare
ReportReport
Posted on by 32

Hello All,

 

I am working on making a submission screen so that our Project Managers can record the participants of their weekly toolbox talks.

 

I have tried several formulas to try and patch the selected items (users) to my SharePoint list, but have been unable to successfully. I have only been able to patch the first selected user or, in some cases, none at all. 

 

This is my current placeholder formula until I can find the right one:

 

Patch('Toolbox Talks Submissions',
Defaults('Toolbox Talks Submissions'),
{
Toolbox_x0020_Talk:{
Id: Gallery10.Selected.ID,
Value: Gallery10.Selected.TalkTitle
},
Participants: Gallery7_2.AllItems,
Usefulness: {Value: Radio1_21.Selected.Value}
}
)

 

I have also tried this formula to patch the participants:

 

ForAll(ComboBox1_1.SelectedItems,
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|" & Mail,
Department:"",
DisplayName: DisplayName,
Email: Mail,
JobTitle:"",
Picture:""
})

 

This also did not work.

 

Is there a way to patch multiple selected people to a multi-select people picker column in SharePoint?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Creechyy 

    First, what is the Items property of Combobox1_1 ?

    Next, in one formula you are trying to patch the column with AllItems from a Gallery - is that intentional?  I am not sure where your Gallery fits into this.

  • Creechyy Profile Picture
    32 on at

    The Items property of ComboBox1_1 is this:

     

    Filter(Office365Users.SearchUser({searchTerm:"",top:35}),Department="Job Site")

     

    And yes the Gallery is there to display the people that have been selected. In that formula, I placed it there as a holder. 

  • Creechyy Profile Picture
    32 on at

    This is what the screen currently looks like:

     

    InkedInkedInkedscreenshot-us.create.powerapps.com-2021.06.14-10_38_25_LI.jpg

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Creechyy 

    I would consider changing the Items property to:

        Filter(Office365Users.SearchUserV2({searchTerm:"",top:35}).value, Department="Job Site")

    As the SearchUser action has been deprecated.

     

    For your Patch formula, it should be the following:

    Patch('Toolbox Talks Submissions',
     Defaults('Toolbox Talks Submissions'),
     {
     Toolbox_x0020_Talk: {Id: Gallery10.Selected.ID, Value: Gallery10.Selected.TalkTitle},
     Participants: 
     ForAll(ComboBox1_1.SelectedItems,
     {Claims:"i:0#.f|membership|" & Lower(Mail),
     Department:"",
     DisplayName: DisplayName,
     Email: Mail,
     JobTitle:"",
     Picture:""
     }
     ),
     Usefulness: {Value: Radio1_21.Selected.Value
     }
    )

    Assuming that Toolbox Talk is a Lookup column and Usefulness is a Choice column and, of course, that your Participants column is a multi-select person column.

  • Creechyy Profile Picture
    32 on at

    I just got an error message:

    Screenshot (3).png

     

    The record also did not patch to SharePoint whatsoever.

     

    I have seen other users that have patched from a temporary collection. I have not used collections that much, but would this be a better solution?

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Creechyy 

    No, a collection is of no use in this case, you already have the information you need in your controls, there is no sense in duplicating it again.

    Your issue in that formula is with the user from your combobox.  It is telling you that the user does not exist in SharePoint.

    Can you narrow down to a particular selected user?  If you select only one user in the combobox and then submit, if you get the error, can you look in the user profiles of your SharePoint admin to see if there is in fact that user or not?

  • Creechyy Profile Picture
    32 on at

    It works and you were right! I had a few users added to the admin center that had yet to fully log into their account. It works with those who have. Great solution!! Thank you for all your help.

  • EP-29071004-0 Profile Picture
    on at

    Hi @RandyHayes ,

    i implemented your suggestion in my app but couldnet make it work

    when patched im getting an error:  

    Perez_0-1656490011160.png

    itried to collect the combo box content to use the collection in the patch and i doiiscovered that the collection is empty, the rows are collected but its empty, no data.

    my items formula is: Office365Users.SearchUserV2({searchTerm:ComboAI_Owner.SearchText,top:10}).value

    my  patch formula is:

    Patch('Action Items',
    LookUp('Action Items',
    ID=ThisItem.ID),
    {
    Title:TextInput2.Text,
    Status:{
    '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Value: DD_Approved_1.SelectedText.Value,
    ID:ThisItem.ID},
    Open_x0020_Date:ThisItem.Open_x0020_Date,
    /* RiskID:{
    '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Value: ThisItem.RiskID,
    ID:ThisItem.ID},*/
    Due_x0020_Date:DueDate2_2.SelectedDate,
    AI_x0020_description:txtAI_Description.Text,
    Notifications:Checkbox1.Value,
    Assigned_x0020_to:ForAll(ComboAI_Owner.SelectedItems,
    {Claims:"i:0#.f|membership|" & Mail,
    Department:"",
    DisplayName:"",
    Email: "",
    JobTitle:"",
    Picture:""
    })
    }
    )

    if any additional data required, i will be happy to provide

    will appreciate your response.

    Eyal

     

     

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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard