Jump to content

Best practice for retrieving the last sync timestamp


This topic is 2727 days old. Please don't post here. Open a new topic instead.

Recommended Posts

What is the best practice for retrieving the last sync timestamp?  I want GO users to be aware of how much time has elapsed since their last sync as a reminder to sync often.  I know the timestamp lives on the MirrorSync table, but I would have to make a new occurrence of the MirrorSync table and relate it to all the tables that have layouts that contain the timestamp which seems awkward.  

If I can get a timestamp of the last sync in a global field, I can run it through a custom function that outputs the time ago in words (e.g. 3 hours ago, or 5 minutes ago, etc.), and put it on my interfaces.

Edited by Scotty Nordlund
Link to comment
Share on other sites

Hi Scotty,

I don't think you will need to make a new occurrence of the MirrorSync table. Rather, you could create a new layout based on the MirrorSync table. In your script, you would perform a find on the field "type" where it equals "client". Set a variable to the value of the "lastSuccessfulTimeStamp" field and then navigate to the layout that you want to store this information in and store the value of the variable in a field. Once you have it stored you can use that information to compare to the current timestamp and if the difference is past a certain threshold, remind your user to sync. There may be a more streamlined way to do this but that is how I would approach it.

Link to comment
Share on other sites

This topic is 2727 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.