cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Water
Regular Visitor

Save LocalCache on application exit

Hello all,

 

I am currently using the Offline capabilities of PowerApps to create new items in a SharePoint List. It looks very promising. I am following this : https://powerapps.microsoft.com/en-us/blog/build-offline-apps-with-new-powerapps-capabilities/

 

However, there is a problem. If I have 3 pending uploads, and I exit the app, they are gone the next time I open the app. I was hoping if I could somehow keep it on a persistent state until it is sure that they have been uploaded to the SharePoint list.

 

Is there a way to save the localcache on app exit?

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi Water,

 

If you have only 1 pending upload, can you see the data the next time you open the app in offline mode?

 

From the blog we know that in offline mode, we can load data from a local cache using LoadData function, then when we change to online mode, we will be able to upload the data to data source.

 

Best regards, 

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yamao-msft
Community Support
Community Support

Hi Water,

 

If you have only 1 pending upload, can you see the data the next time you open the app in offline mode?

 

From the blog we know that in offline mode, we can load data from a local cache using LoadData function, then when we change to online mode, we will be able to upload the data to data source.

 

Best regards, 

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Mabel,

 

Thanks for that. I have missed the initial LoadData on the OnVisible of the screen.

 

Now it is loading the pending uploads even after I exit and reopen the app. Works perfectly. 

 

I also solved why it is always Pending Upload : 1 . On TimerEnd, it was saving the txtTitle textbox after it clears. I removed the savedata and now properly showing the number of pending uploads.

 

Thanks!

 

EDIT:

 

As a follow up question, is there a time duration / expiry of the LocalCache? Or exists indefinitely until it gets posted?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,959)