cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TB05
Resolver I
Resolver I

Patch a SharePoint list from a collection that is made up of TABLE

Hi,

I have a bunch of employee records in a SharePoint list which I wanted to group and display via the user.  I have a nested gallery to show all the records related to that user (see image).  

I would like to select the user and update the records.  To do so, I select a checkbox and it adds the user to a collection, called collectTOBEAPPROVED.  the collection contains the TABLES.  How do I update the SharePoint list with the collection of users?

I think I need to use the ungroup before I can update the SP list.  

 

TB05_0-1652189585912.png

This is my gallery ITEMS:

GroupBy(Filter(BonusInputDEV, lblSelectedPayPeriodID_6.Text = PayPeriodID), "Title" ,"AppDATA")

 

Checkbox ONCHECK: Collect(collectTOBEAPPROVED, ThisItem)

 

I would like to put a check in the box and then update all the records with Status:"Approved".

But where the records are in a table, I'm unclear how to proceed with the patch to the Sharepoint list called UserDATA

I look forward to hearing from you.

1 ACCEPTED SOLUTION

Accepted Solutions
TB05
Resolver I
Resolver I

I figured it out by ungrouping the list and adding to another collection.  And then updating the SharePoint with the new collection.

learCollect(collectTOBEAPPROVED2, Ungroup(collectTOBEAPPROVED, "AppDATA"));
ForAll(RenameColumns(collectTOBEAPPROVED2, "ID","EID1"),Patch(BonusInputDEV, LookUp(BonusInputDEV, ID = EID1), {Status:{Value: "Approved"}}));

View solution in original post

1 REPLY 1
TB05
Resolver I
Resolver I

I figured it out by ungrouping the list and adding to another collection.  And then updating the SharePoint with the new collection.

learCollect(collectTOBEAPPROVED2, Ungroup(collectTOBEAPPROVED, "AppDATA"));
ForAll(RenameColumns(collectTOBEAPPROVED2, "ID","EID1"),Patch(BonusInputDEV, LookUp(BonusInputDEV, ID = EID1), {Status:{Value: "Approved"}}));

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,308)