Showing results for 
Search instead for 
Did you mean: 
Not applicable

Clearing shopping cart/gallery with a button

I've created a simple order form app. I followed Shane Young's ideas at setting up a shopping cart type app. On one page I call "shopping cart" it displays in a gallery the items they have selected on previous pages. I was able to set up a trash can icon right next to each gallery item that removes them, but I'm looking for two things:


1) A button at bottom of page that will clear all their items in that gallery. I have tried Reset(BrowseGallery2) to no effect.


2) I'd like a way for after they have submitted their order (a button I've created using Shane Young's ideas to populate a Sharepoint list/collection), for it to clear out their gallery and return them to the main page. I got the Navigate down, and even tried Reset(BrowseGallery2) here as well in the OnSelect, but it will navigate away, but not clear anything out.


I'm not sure how to do all this. Plus, I'm not sure how post more details here for y'all to see what I'm talking about.  Thanks for any help you can offer!

Super User
Super User

Hi @Anonymous 

Reset(BrowseGallery2) is clear the selection. We have to Clear(CollectionName) which clears the data from the collection since the gallery data source is collection.

Helpful resources

October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022


Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

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