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 / Update a series of rec...
Power Apps
Unanswered

Update a series of records, and use those records to further update other records

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm trying to patch an unknown amount of records in a sharepoint list, based on the items check marked in a gallery.  

 

The single sharepoint list is a series of records that contains Employee Requests.    I'm trying to let the Approver, using a gallery to review requests, batch approve requests by check marking which items in the gallery are approved.

 

The rub is: after updating the records based on which had been checkmarked, I would like to use those records, find all the other requests from each of those employees that were just approved, and update all their other records. 

 

I've been trying to do a ForAll()/Patch(), but am getting weird errors....and I feel like I'm trying to force ForAll() to be a for loop.  Is there a way I can use Patch()/Filter()?  While the batch of records to approve is unknown, it is unlikely that I will encounter delegation issues.

 

Jhenrie_0-1649418058405.png

 

I appreciate any help.  I think I'm pretty rough at shaping tables of information.

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Yes, do not use the ForAll as a for/loop.  ForAll is a table creating function.

     

    In general, your formula should be the following:

    Patch(yourDataSource,
     ForAll(Filter(yourGallery.AllItems, yourCheckBox.Value),
     {ID: ID,
     Column1: Column1Control.Text,
     ...etc...
     }
     )
    )
     

     

    Now, I am not sure what you want to do with the other parts of your post.  However, it should be known that the above Patch function will return a table of all the records that are patched.  Perhaps that is helpful in what you are then trying to attempt.

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I think it was a previous post of yours that helped me realize the distinction of what ForAll() was really doing.  So thank you @RandyHayes 

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

    @Anonymous 

    No problem!  Let me know if there are more questions on it.

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

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard