cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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
Super User II
Super User II

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?

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.

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

Anonymous
Not applicable

Thanks for your help with this thread @Drrickryp!

 

@Anonymous

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (38,593)