cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Community Champion
Community Champion

Useful Features of PowerApps (12) - AutoSaving of Batch Data

Hi

 

After inspired by Brian Dang and with his ideas, as well as discussion with Taufik & Wife (at Jakarta), I had successfully written an Autosaving of Batch Data (when I flew back from Jakarta back to Malaysia with Malaysia Air Systems (MH), MAS, which really inspired me). They also encouraged sharing even though I think this is too simple for many users here.

 

The main reason of this idea:

- Patch/Save data at a time is Time-Consuming especially at low band-width countries like Malaysia and Indonesia

- Users had been pampered by the saving speed with local server (intranet) and excel.

- Other reason...maybe.

 

I wish this maybe a simple yet maybe, useful samples for those having similar internet connection environment like me.

Other users in high speed internet countries, can just IGNORE this idea.

 

Hope this helps.

 

Method: Use 2 Collections, 1 Timer, and with some iteration I learnt in during Project Siena.Method: Use 2 Collections, 1 Timer, and with some iteration I learnt in during Project Siena.

 

hpkeong
1 REPLY 1
Community Champion
Community Champion

The usefulness of Timer.OnEnd is demonstrated in this solution. Well done.

 

It took some time, but I implemented this Patch-timer into all of my apps that needed to save. Here's a bonus: you can make the Timer.OnEnd check to see if an entry is already in the table, in which case it will UpdateIf instead of Patching.

 

If(Oper="+",

If(iter>CountRows(collection),
UpdateContext({iter: iter+1});

If(Last(FirstN(collection,iter))!column in datasource.column,
UpdateIf(datasource,Last(FirstN(collection,iter)),
{column: newdata}),

Patch(datasource,Defaults(datasource),
{column: newdata}))),

UpdateContext({Oper="-"}))

Oper is the on/off switch

iter is the row number in the collection

datasource is the table you are saving to

column is the target data

newdata is the new information you want to save in the column

Microsoft Employee
@8bitclassroom

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,114)