cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marney
Helper II
Helper II

Patch SP List with Gallery Users

Hi dear people!

Hoping to get some help 🙂

I have a gallery that is being populated with users from a combobox.

I've set the OnChange of the combobox to add users to a collection:

Collect(collectUsers, {Email:ppCombo.Selected.Mail})

 

My Gall is connected to the Collection: (Items=collectUsers).

I would like to patch the collection of users to a Person column in SP (column is called Member).

For example, I'm using ForAll:

ForAll(collectUsers, Patch('WalkTheWorld Team Members', Defaults('WalkTheWorld Team Members'), {Title:wtwform_1.LastSubmit.Title, MID:wtwform_1.LastSubmit.ID,

Member:....

(Ignore the wtwform bit above).

Its that last bit I need help with please....what do I need to enter after "Member" so that all the users in the collection are patched back to the SP List (separate line items).

 

Thank you in advance 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Adrian_Celis
Super User
Super User

Hi @marney 

You are doing good so far. you just need to patch your Person type column named Member. The code to patch a person column can be quite long.
Try this:

ForAll(collectUsers, Patch('WalkTheWorld Team Members', Defaults('WalkTheWorld Team Members'), {

Title:wtwform_1.LastSubmit.Title, 
MID:wtwform_1.LastSubmit.ID,
Member:{  
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
             Claims: "i:0#.f|membership|" & Email,  
             Email: Email,
             Picture: "",  
             JobTitle: "",  
             Department: "",  
             DisplayName: ""
        }
}
));

 

View solution in original post

2 REPLIES 2
Adrian_Celis
Super User
Super User

Hi @marney 

You are doing good so far. you just need to patch your Person type column named Member. The code to patch a person column can be quite long.
Try this:

ForAll(collectUsers, Patch('WalkTheWorld Team Members', Defaults('WalkTheWorld Team Members'), {

Title:wtwform_1.LastSubmit.Title, 
MID:wtwform_1.LastSubmit.ID,
Member:{  
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
             Claims: "i:0#.f|membership|" & Email,  
             Email: Email,
             Picture: "",  
             JobTitle: "",  
             Department: "",  
             DisplayName: ""
        }
}
));

 

marney
Helper II
Helper II

Ah Adrian...a thousand blessings to you! Thank you very much indeed, works perfectly 🙂

Thanks again mate,

Marney

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,047)