cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

"Submitting" all the records in a Gallery Control back to the datasource

I have a super simple SharePoint List acting as a 'shopping list' as a sample to prove out some ideas.

 

I have it set to display the item name and if it has been purchased as shown below.

 

What I am trying to do now is have a button that takes all the records showing here and submit them back to the SharePoint list with the new values for the 'Purchased' field.

 

All the ways I know to do this tend to be for single records only and the samples of 'ForAll' seemed not to pertain and I couldnt make that work.

 

Any ideas?

 

 

2018-02-05_12-10-51.gif

Brian Kennemer
Projectified Consulting
www.projectified.com
brian.kennemer@projectified.com
3 REPLIES 3
Highlighted
Super User
Super User

Re: "Submitting" all the records in a Gallery Control back to the datasource

@BrianKennemer

 

Is the shopping list being displayed in a gallery in the powerapp? 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: "Submitting" all the records in a Gallery Control back to the datasource

Yes.

Brian Kennemer
Projectified Consulting
www.projectified.com
brian.kennemer@projectified.com
Highlighted
Super User
Super User

Re: "Submitting" all the records in a Gallery Control back to the datasource

@BrianKennemer

 

Try something like this

 

ForAll(Gallery.AllItems,Patch(SharepointListName,First(Filter(SharepointListName,Item=ItemlabelnameinGallery.Text)),{Purchased:ToggleName.Value}))

 Let me know if you have any questions.


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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