Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Update multiple records in gallery X on change of a toggle in gallery Y

Hello everyone,


I am facing the below problem, and I haven't found a solution yet....


I have 2 galleries:

Gallery X: Contains all the change requests (Gallery: Requests, SP List: Tracker). The requests have a column (request_status), which is by default "open" and with a toggle it can be switched to "closed"


Gallery Y: Contains all the actions needed to be taken around the above change requests (Gallery: Action_Gallery, SP List: Actions). The actions have a column (action_status), which have similar functionality to above


I want to achieve the following: When a person closes a request, I want all the related to the request actions to be closed.


I have tried the below syntax, on the change of the toggle of the 1st gallery, without success...

The request name exists in both SP lists and it's the primary key used to connect everything

ForAll(Actions,Patch(Actions, ID = Requests.Selected.ID,{action_status:"closed"}))
ForAll(Filter(Actions, LookUp(Tracker, ID = Requests.Selected.ID,Request_Name) = Request Name),Patch(Actions, ID = ID, {action_status:"closed"}))


Thank you!!!

Helper I
Helper I

Thank you @Drrickryp , let me review the material and I will come back 😉
I will try to keep the chain alive 😛 

Helper I
Helper I



After lots of trial & error + some extensive research around, I found the solution to my problem 🙂
The syntax which works for me is the below:

ForAll(Action_Gallery.AllItems, UpdateIf(Actions, Action_Name = GalleryX. Selected.Action_Name, {action_status = "closed"})

Essentially, I used the UpdateIf function (vs patch which I couldn't figure out), but I made sure not to use the same source in ForAll & UpdateIf. Instead, I used a combination of SP lists & Galleries.


View solution in original post

Super User II
Super User II




Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,177)