Jump to content

Recommended Posts

  • Newbies
Posted

Is there a way to preload just a handful of large tables that need to get all records? Most of the tables are a small set based on work orders and customer history, but some like products table and proposal templates are pushed as all records. Is there a setting or script section that I'm missing on the initial server side sync?

Posted

Hi there Kevon,

Unfortunately there is no supported way to selectively populate certain tables and not others prior to the initial sync; although, the initial sync can accomplish your desired behavior if I understand you correctly. You get the choice of either starting with a clone, or starting with a full copy. The initial sync can be on the server before the file is delivered to the device, or it can run from the device.

Your customization script will result in opposing actions depending on your choices. E.g., if you start with a full copy, the customization will result in the appropriate records being deleted from filtered tables on initial sync. On the other hand if you start with a clone, the customization will result in the addition of appropriate records to filtered tables on initial sync.

It sounds like if you have huge tables that are not filtered and small tables that are filtered, the best approach is likely to start with a full copy rather than a clone, and let the initial sync on the server run the initial sync with the device copy of the file, deleing any records in the smaller tables that should be filtered out. The device will then receive a file that has full copies of the large tables, and filtered copies of the small tables.

 

Let me know if that makes sense, and feel free to ask followup questions, or send us an email at [email protected]

  • Newbies
Posted (edited)

This makes sense, but I believe I found in your documentation that it's possible, just not all automatic. Referring to the below paragraph:

If you are syncing with a separate mobile file that you want to pre-populate, here are the steps to follow:

  • Select the spoke configuration option to use a separate mobile database, instead of a copy of the hub database
  • Import the records you want from the main file into the mobile file. Be sure to uncheck the box that says "Perform auto-enter options while importing". The primary keys, modification timestamps, and creation timestamps need to match between the mobile file and the server file. Make sure that you import most or all the records that the user will have access to during the sync.
    • If you do not import all the records in a table, be sure to modify your MirrorSync customization script to exclude the records that you do not import. If you fail to do this correctly, it will lead to records on the server being deleted during the initial sync (see more details below).
  • After the import, open your separate hosted mobile solution. Go to the MirrorSync layout and click the internal tab, find the record with type 'Server' (create new record if necessary and set type to 'Server'). Modify the sync4 field (you'll need to switch to layout mode to see which one that is), and set it to the timestamp when you ran the import, using the format 'YYYY-MM-DD hh:mm:ss' (in 24 hour time). Most customers do not use the correct timestamp format. Be sure to check that your format matches this.
  • Make sure that your spoke users run a sync before making any database changes. Any new records that they create in the mobile file will be deleted during the initial sync. It's OK for them to add new records normally after the initial sync has successfully completed.
  • It's easy to make a mistake in this process. Don't hesitate to contact 360Works support if you'd like help with this.

 

----

I've written a script that I run from the new clone file on my server. It imports the large tables, then opens the hosted file, navigates to the mirrorsync table, finds the record with type=server, then sets the timestamp in the format you indicate in the documentation. 

This took my initial sync from 17min on the same network from an iPad, to 3.5min remotely from the network ( Im home now haha ) 

Im testing on the mobile file right now, making sure fields are all moving and thoroughly testing. So far so good! 

Absolutely GREAT product, and it's a major upgrade from our 12yr old sync process that we had built! 

12 minutes ago, kevon said:

Select the spoke configuration option to use a separate mobile database, instead of a copy of the hub database

This is the one step that worries me. This is a clone of the HUB. What ramifications might I have if this is NOT a different database and that option wasn't selected in the configuration?

Edited by kevon

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.