cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
hpkeong
Level 10

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.

 

Screenshot (123).pngMethod: Use 2 Collections, 1 Timer, and with some iteration I learnt in during Project Siena.

 

hpkeong
1 REPLY 1
mr-dang
Level 10

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

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 175 members 6,206 guests
Recent signins:
Please welcome our newest community members: