Jump to content
Server Maintenance This Week. ×

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


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

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 3486 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.