cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BlackRos
Level: Powered On

SaveData e LoadData - online scenario

Hello,
I would like to ask the following thing. On onStart I launch a Flow that fills a UPid variable, which contains a set of values. In an online scenario, again on onStart, I would like to use SaveData (UPid, "MyUPfile") immediately after Flow, to then read the file, if it exists with LoadData, without using Flow but the cache file at the next access. How could it be done? Is there also the possibility that the file has only daily validity? Thanks for help
1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: SaveData e LoadData - online scenario

Hi @BlackRos 

 

You can use LoadData and SaveData to store the upid value (along with this you could also store the date at which data was entered - we will use this to check daily validity)

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/offline-apps

 

On App OnStart first check if value exists in the cached data 

If yes, check the time of the cached content and compare it with todays date 

If greater than 1 day or cahce is empty - call ur flow

If not- use value from cache

 

For calculating date difference

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-dateadd-datediff

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

 

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: SaveData e LoadData - online scenario

Hi @BlackRos 

 

You can use LoadData and SaveData to store the upid value (along with this you could also store the date at which data was entered - we will use this to check daily validity)

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/offline-apps

 

On App OnStart first check if value exists in the cached data 

If yes, check the time of the cached content and compare it with todays date 

If greater than 1 day or cahce is empty - call ur flow

If not- use value from cache

 

For calculating date difference

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-dateadd-datediff

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

 

View solution in original post

BlackRos
Level: Powered On

Re: SaveData e LoadData - online scenario

Hi,

our problem is that i want to get data also when the device is online for performance issue, not only when we are offline. Is it possible?

Regards

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,700)