How can I sync related records?
You then use the Configuration tab in GoZyncHosted to indicate which tables are related to each other. Starting at the "child" table, click "edit" and then pick the table it's related to. (See the first screenshot below.)
You'll then be asked which field links the child table to the parent. You're being asked for the foreign key field in the child table: in our example, the related table is called "Invoice Data" and contains the invoice line items. It is related to Invoices and there is a field in each invoice line item that holds the primary key (the unique ID) of the invoice that line belongs to. That field is called "InvoiceData::Invoice ID" in our example and if you looked at the relationships in FileMaker it would be linked to the invoice's primary key: "Invoices::ID".
Be sure to click "edit" and fill out the screen above for both sides (hosted and mobile) of the table's row on the Configuration tab of GoZyncHosted.
When you're done you'll see the Configuration tab indent "related" tables below their parents, and indicate how they are related.
Teaching Your Hosted File about the relationships.
The relationship pairs you create in GoZyncHosted need to be reflected in the relationships in your hosted file. So open the Relationships tab of Manage / Databases in your hosted file and link the gzh_... occurrences you find there using the same fields you used to link them in GoZyncHosted.
In the example above your hosted file would have a relationship between "gzh_Invoices" and "gzh_InvoiceData" where
You'll see an example of this in our Worx demo file where WorxHosted has a relationship from gzh_WorkOrders to gzh_WorkOrderItems.
How do I undo a relationship and go back to syncing the table on its own?
Simply click in the "requires" column for that row and then click the "clear & cancel" button in the lower left of the "Requires...". That will undo the "requires" setting; do this on both the hosted and mobile sides of the table's configuration row and it will no longer be indented on the configuration tab and will be synced as its own table (provided you call a script to Zync it, or run "Zync It - Everything".
You don't need to undo the relationships you made in your hosted file: those can stay as they are in case you change your mind and want to go back to syncing the tables relationally.
Related syncing in GoZync only goes one "level" deep. It doesn't support synching of "grandchildren" (the engine would have to be exponentially more complex). In the case of three tables where the third is the grandchild of the first you'll have to choose one of those relationships for related synching and sync the third table independently.
What about related Join Tables or table with more than one foreign key?
The use case around join tables looks like this: imagine you have a table of addresses that is related to (that is a child of) both Companies and Contacts. Once you've wired up Addresses in GoZync mobile you can ask it to "require" either Companies or Contacts, but not both. So how can you set it up so when you sync a company or a contact you always get their addresses?