cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Patch to a new excel worksheet each week

Hi, 

 

I'm looking to patch a set of running results from a browse gallery to a new excel sheet every week. 

 

I've managed to get the patch working to the same sheet but this obviously overides the results in there. I need to record and save results to a different sheet each week. 

 

Is this possible in powerapps? 

 

Any help would be greatly appreciated. 

 

Thanks,

Callum

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Patch to a new excel worksheet each week

Hi @CallumTR90,

CheckboxDemo.PNGIn Excel, assuming your table is named Table1, add a column to the table called Archived and make the type Number.  On your Gallery, add a checkbox control. Set the Text property of the checkbox control to ThisItem.Archived,  Make the OnCheck property of the checkbox:

Patch(Table1,ThisItem,{Archived:1})

. Filter the Gallery by setting its Items property to

Filter(Table1,Archived<>1)

Now, when you check the box, the record will disappear from the gallery.  It will still be saved in the spreadsheet but it will not be displayed in the gallery because of the filter.

You would use an Edit form to enter each new record.  It will be shown in the gallery until you check it off. 

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: Patch to a new excel worksheet each week

Hi @CallumTR90,

You would need to remove the old datasource table and replace it with an identical blank table with the same name and fields. Wouldn’t it be easier to just add a column to archive the old records and filter on that column for records not archived?

Highlighted
Frequent Visitor

Re: Patch to a new excel worksheet each week

Hi @Drrickryp,

Thanks for your response.

Would the archiving be done in excel or PowerApps? If you wouldn’t mind briefly explaing how I’d do this, that would be a massive help.
Highlighted
Super User
Super User

Re: Patch to a new excel worksheet each week

Hi @CallumTR90,

CheckboxDemo.PNGIn Excel, assuming your table is named Table1, add a column to the table called Archived and make the type Number.  On your Gallery, add a checkbox control. Set the Text property of the checkbox control to ThisItem.Archived,  Make the OnCheck property of the checkbox:

Patch(Table1,ThisItem,{Archived:1})

. Filter the Gallery by setting its Items property to

Filter(Table1,Archived<>1)

Now, when you check the box, the record will disappear from the gallery.  It will still be saved in the spreadsheet but it will not be displayed in the gallery because of the filter.

You would use an Edit form to enter each new record.  It will be shown in the gallery until you check it off. 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Patch to a new excel worksheet each week

Thanks for your help with this thread @Drrickryp!

 

@Anonymous

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

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

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,638)