Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Multiple users on same copy of mobile file when ES_Exclude is an unstored calc

Featured Replies

Tim and whoever else is involved - thanks for making EasySync available for free.

 

I turned the ES_Exclude field into an unstored calc (per instructions in http://fmeasysync.com/docs-easysync-integration/) so that certain records can be excluded from the sync based on the user's privilege set and account name.

 

However, now if user A logs in on their iPad and syncs, and then user B logs in on that same iPad and syncs, there may be some records whose ES_Exclude values will now be 0, but they won't get picked up if nothing else about that record changed, because the ES_UTC_Time field won't have been updated. (It gets updated when a record is modified, but since we changed the ES_Exclude field into an unstored calc, the changing of its value doesn't trigger ES_UTC_Time to update.)

 

Turning ES_Exclude into an auto-enter calc (instead of an unstored field) won't work, because it's value depends on the account name of the person who's logged in; i.e. it's a session-based value. Two people syncing simultaneously with the hosted file could have two different values in that field.

 

So it seems that if ES_Exclude is an unstored calc, it won't work to have multiple users using the same mobile device. If they do, then the user logging in second might not get all his records. The only way to make it work then is to pull ALL the records again (change $$sync_method from Merge to Replace in EasySync Settings script) whenever the user logging in is different from the last time the mobile file was used. But the problem with that is that doing a full sync takes quite a long time to complete in our situation.

 

Or maybe I'm missing something. Is there some other way to make this work?

Hi there.

 

Good question!

 

I'm greatly over-simplifying this, but here's a possible solution...

 

First, start by keeping track of who the previous user of the file was (maybe store it in a global field), and base the ES_Exclude field on that value (instead of on the "current user").

 

When a user logs in, if they are not the same as the "previous user," do something like this: Immediately do a sync (so that any changes that the previous user had made are pushed to the server).  Then set the "Previous User" field to the account name of the current user. And finally, perform both a wipe / reset (see the "Sync Utilities" script), and do another sync.

 

-- Tim

  • Author

Thanks Tim.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.