Power Apps Save Combo Box with Office 365 Users to SharePoint List’s Person Data

This is a quick post showing how to save Office 365 Users data from the combo box to a SharePoint list. It shows two combo boxes with Office 365 Users – one allowing only one selection, another allows multiple. The former will save to the SharePoint column with the Person data type, the latter to another column with Person data type with allowing multiple selections.

FROM:

TO:

 

 

Clear(colTeamMembers);
ForAll(
    cmbTeamMembers.SelectedItems,
    Collect(
        colTeamMembers,
        {
            '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Claims:"i:0#.f|membership|" & DisplayName,
            Department:"",
            DisplayName: DisplayName,
            Email: Mail,
            JobTitle:"",
            Picture:""
        }
    )
);
Patch(
    'People Tracker',
    Defaults('People Tracker'),
    {
        Title: "Group A",
        'Primary Contact': {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Claims:"i:0#.f|membership|" & cmbPrimaryContact.Selected.DisplayName,
            Department:"",
            DisplayName: cmbPrimaryContact.Selected.DisplayName,
            Email: cmbPrimaryContact.Selected.Mail,
            JobTitle:"",
            Picture:""
        },
        'Team Members': colTeamMembers
    }
)

1 thought on “Power Apps Save Combo Box with Office 365 Users to SharePoint List’s Person Data”

  1. Thanks it works but when loading hte submitted items from the SharePoint list it requires reselecting of the users. Any idea on how to fix this?

    Thank you!

Leave a Reply to Jan Cancel Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top