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

Hi all,

 

I have a hosted database with department, order and order_items tables which are synced to mobile devices.
We have three departments, each department has a mobile device for order picking.

Orders are always owned by exactly one of those departments, order_items are related to orders, orders are related to departments, nothing fancy.

 

Due to time and my limited knowledge I started last year by syncing all records to all three devices and restrict the records the users can actually see.

This makes the process slow, it's getting slower over time and confuses people when they see that records are being synced when they themselves didn't change anything. I would really like to sync only the records related to the departments.

 

I read through the sync scripts and found I should add the department ID to the calculation in line 14 of 'pull payload' on the client. I can then pick up the deptID as parameter in 'prepare payload for client'.

Next I think I should modify the sql code in line 111 where $dyn_sql gets filled, something along the line of 'select x from y where z AND $deptID = fk_deptID'

 

I would value your opinions on wether or not you think i'm on the right track here and perhaps can someone point me to a place where i can find the right syntax? sql is not easy as it is and filemaker seems to need a lot of extra characters.

 

Thanks for your time, have a good day.

 

Bert

Yes, you are on the right track. If the records carry a department ID and you have some way of identifying users and linking them with department IDs you can do that. 

The general strategy is to put as little as possible onto the mobile device and transfer only what is required. You can control direction too, with push and pull prefixes on your table names. For instance, you orders and order_items should be PUSH only, unless you have some reason for everybody to see orders made by others.

For assistance with SQL, Search online for FileMaker and executeSQL resources. SeedCode produced a nice helper tool and Beverley Voth wrote a manual that's available from the FileMaker Hacks site.

 

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.