Way to tell whether record has synched?

Is there any way to filter out synched from non-synched data? eg. One view shows all records that were successfully synched and the other shows those that have not been (yet).

0 11 418
11 REPLIES 11

Steve
Platinum 4
Platinum 4

Not trivially. If you attach a modify DateTime (e.g, a ChangeTimestamp column) to each row and track the last sync time, you could compare the two.

Hmmโ€ฆ messy.

@Jethro whatโ€™s the problem?

I agree its a bit messy. Its just that our users are collecting thousands of records a month and primarily once they have collected and synched the record, they wont need it anymore. Maybe a Today() filter would work better in this case while they are in the field so it looks neat each day and i figure out a way to deal with the issue in the backend database (eg. a nighttime scheduled shift of all synched data to another table) so that when they start the next day, their synched data isnt visible.

Hi Steve, thanks,

How do I refer to โ€œlast synch timeโ€ in an expression? Is it possible?

Create a virtual column with an app formula of NOW(). That column value will contains the time of the last sync. For maximum efficiency, best to add the virtual column to a table with only one (or very, very few) rows. For instance, if you have a table named AppSettings with only a single row containing app-wide settings, you could name this column SyncWhen and refer to it in expressions as ANY(AppSettings[SyncWhen]). A row in an arbitrary table that has a ChangeTimestamp column named ChangeWhen could be presumed synced if [ChangeWhen] <= ANY(AppSettings[SyncWhen]).

Actually this value will constantly update as you use the app.


It seems like you need a way to reduce the data in your users app: why not use a security filter?

date([Creation_Timestamp]) = today()

This way only the records that have โ€œtodayโ€™sโ€ date are shown.

Thanks, but will this truly reduce the data in their app or just hide the data that is still on their phone (eg. photos etc.) Would there be a safe way to have them manually delete all their pictures after their last synch for example.

Btw yes, trying to save phone resources + performance by lightening data on the phone from time to time.

Using a security filter will theoretically remove row data from the device. Slice filters only hide data while keeping it on the device.

Not in my experience. VCs with NOW() are updated only when syncs occur, as all other VCs.

@Steve This is really good to know!!! Thanks!!

I guess I was projecting the fact that any normal app formula in a virtual column recalculates itself as you use the app, not just when you sync, onto the NOW() formula inside a virtual column.

For instance:

select(order_details[ChildID], [Parent_Link] = [_thisrow].[ParentID])

inside a virtual column will update constantly (wellโ€ฆ not technically CONSTANTLY, but relatively constant).

Top Labels in this Space