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

Compare CDS Entity Last Modified Date with SaveData Creation Date

I am trying to implement some offline functionaluty and all of my searching has not yielded answers so I thought I would see if anyone here can help.

 

We have a 75K+ data source (a CDS Entity) that I am able to bring into a collection on a mobile device. When connected - I have all the functionaluty to pass data from this collection to CDS with no problem.  The problem arises with some offline capabiliuty I need to incorporate into the device.

 

I need to be able to:

  1. take the collection and save it to a cahced copy on the device (SaveData function).
  2. When the user access the app again - I would like the app to look at the CDS entity last modifued date and compare it to the local cahced copy saved date.
  3. The app will then notify the user if there is newer data availalbe online (CDS entity) and provide the oprion to download the data again or use the local cached copy

I do not see any clear way of comparing CDS Entiry create/modify dates and SaveData copy create dates.

1 REPLY 1
Community Support Team
Community Support Team

Re: Compare CDS Entity Last Modified Date with SaveData Creation Date

Hi,

 

Here is my throughts.

When App is connected, use the sort or sortbycolumns function to sort the CDS entity by the Modified date, then get the first or the last record, which should depend on hte sort, then use it to compare the saved date offline.

The offline saved date should be better kept in a global variable, as the modified date saved in the collection won't be updated automatically when the data saved offline.

 

Regards,

Michael

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

Helpful resources

Announcements
thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,840)