November 3, 20169 yr 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 November 3, 20169 yr by Scotty Nordlund
November 3, 20169 yr 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.
Create an account or sign in to comment