GoZync2

Splitting Records

How and When to Split Records in Field Mapping

You have a a very simple mobile file with only one or two tables (something a database designer would call a fairly "flat" file), while your served solution may us many tables to represent the same data (it may be more "relational"). Go Zync provides a method for splitting the data from one table into many tables. Though this is most often done on the served side, you can split tables coming down onto the device as well.

For an example of how this works, check out the "Set Invoice Fields" script in a clean copy of GoZyncConnector. The scenario here is that our mobile file keeps the invoiced contact and their address IN the invoice table, while our sample served solution (Invoices.fp7) has a separate customer table. So you'll find a piece of GoZyncConnector's "Set Invoice Fields" script where we leave the invoice, create a customer record, and return to use the newly created customer ID in our invoice. This happens between the comment "Splitting Tables..." and "...End Splitting Tables".

Notice that we can create additional "Set XXXX Fields" scripts, for entities that don't exist in our mobile file: the Data Dictionary form our mobile file didn't mention a customers table, because the mobile file didn't have one, but we can still create a "Set Customer Fields" script in GoZyncConnector and split the invoice data into an invoice record and a related customer record.

(855) SEEDCODE
[email protected]
Follow us: