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 / Mass Update records fr...
Power Apps
Answered

Mass Update records from grouped gallery

(0) ShareShare
ReportReport
Posted on by 728

Hi

 

I have a gallery which groups records together based on the field in the SP List called Period.  

 

The items are listed as mmm yyyy

 

What I was looking to do, was add a checkbox to the gallery so that when it is checked, it should update all records that match the field Period and update the column called Invoice to say "Yes".

 

This is what the gallery is showing:

 

neill_long_0-1700059181233.png

 

So when i check the box under Oct 2023, it should locate all the records in the SP List where Period matches 'Oct 2023' and update the relevant fields.  But it should not update the records where Period is 'Nov 2023'.

 

Is this possible, and if so, what formula can i use on the OnCheck option?

 

thanks

Categories:
  • Verified answer
    QuentinDURIEZ Profile Picture
    577 Moderator on at

    Hi,

    You can use this code for OnCheck/OnUncheck of your checkbox 

     

    Patch(
    	[DATASOURCE],
    	ForAll(Filter([DATASOURCE], Period = ThisItem.Period ),
    		Patch(
    			ThisRecord,
    			{
    				Invoice : true //Or Yes value
    			
    			}			
    		)	
    	)
    )

    This code will bulk patch all your items where the column Period is equal to your galley item period, you will still need correct this  part of the code for your specific case, but "ThisItem" is important to have the good period context

    Regards,

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard