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.

Featured Replies

example:

 

Tables:

Works

workidpk

workerid

 

WorkItems

_workidfk

data

 

If I filter the sync of the Works table (using the exclude field) to be the works of only the workerid associated with the device how do I get Easysync to sync the related workitems records only ?

 

Do I have to store the workerid in the workitems table and filter it accordingly with the exclude field or is there a more efficient way of dealing with that ? Can I link a workitems occurrence to the ES_Works occurrence ?

 

Thanks 

You have some options, but what will work best for you will depend on your application.

 

One option is to setup the Workitems::ES_Exclude field so that it is a calculation based on the ES_Exclude value of the parent record (in the Works table). That way, if the parent is getting synced, the children would sync as well. You just need to be sure that if the ES_UTC_Time value of the parent is updated, the children's values get changed as well - and vice versa - which is tricky.

 

Another option is to set the value of ES_Exclude via a script, which would be run prior to the sync. I would avoid this if at all possible, because in a multi-user scenario, you would need to consider record locks, etc.

 

-- Tim

  • Author

Thanks for the reply.

 

So if I understand correctly, I basically have to filter each tables I want to sync and I can't use the relation to filter children tables ?

 

So , in the OP example I would have:

 

Tables:

Works

workidpk

workeraccount

ES_Exclude (workeraccount<> Get(accountname))

 

WorkItems

_workidfk

data

ES_Exclude (works::workeraccount <> Get(accountname))

 

With this example I don't think I would have to toy with the UTC Time because both tables basically have the same filter....right ?

 

Now I'm wondering what will be the impact on the performance of this method because the Exclude field is an unstored calc.

 

I would just make the calc for WorkItems::ES_Exclude = Works::ES_Exclude.

 

Yes, it's an unstored calc, so performance might be an issue if you're dealing with larger tables. The other option is to script all of this, but as I mentioned earlier, that presents other issues.

 

-- 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.