Pulling parent/child records from host

Help, Tips, and Tricks for deploying GoZync: our "sync" engine for FileMaker Go.
Posts: 35
Joined: Tue Nov 25, 2008 11:49 am
PostPosted: Sun Apr 15, 2012 5:17 pm
Because your documentation is very good, integrating GoZync into my app has been pretty straightforward, however there is one issue that I can't resolve.

I'm pulling down three contacts. Each contact has two phones that are in a related phones table. I can see that after the pull data from host script is run, the variable $data has the correct contact and phone data. When stepping through the scripts, the Set GoZyncContact fields ($data) creates the three contact records, but when the phone records are created in Set GoZyncPhones, they cause a blank record in contacts to be created. The result is that I have the correct number of phone records, but there are 9 contact records (the 3 for the actual contacts and 6 blanks for the six phone records that are created).

In the demo file in the GoZyncConnnector Invoices and InvoiceLineItems are connected directly to GoZync, but in the Mobile file they have a parent/child linkage in which only GoZyncInvoices are connected to GoZync. I have three parts tables that have parent/child relations. They are GoZyncing correctly, but they only go one way, like the invoices/line items in the demo.

I'm probably missing something obvious, but I'm also wondering if it wouldn't be helpful if the demo were constructed so there were parent/child tables making the full loop, like I'm trying to do with contacts & phones.

I hope this makes sense and is sufficient information for you to explain the solution to the extra contact records I'm getting.

Thanks,
Will
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Sun Apr 15, 2012 11:04 pm
Hi Will,

Congrats on getting things wired up so quickly.

If the contact's phones are also in a related table in the mobile file, then you need to do two things...

1. In your mobile file you'll need an table occurrence for ContactPhones (named GoZyncContactPhones) related to GoZync just like GoZyncContacts is related to GoZync. This relationship should have "Allow creation of records..." ON for the Phones side of the relationship.

2. Then, in mobile's script "Table Map" you'll have a branch for phones that will call a new "Set Phone Fields" script in your mobile file.

It sounds like you're missing this branch and creating the phone records in Contacts instead.

Hope that helps,

John
John Sindelar
SeedCode
Posts: 35
Joined: Tue Nov 25, 2008 11:49 am
PostPosted: Mon Apr 16, 2012 7:28 am
I had GoZyncPhones in the mobile file linked to GoZyncContacts like I did in the GoZyncConnector. When I linked it to GoZync directly everything worked coming down to the mobile. I tried this last night but probably forgot to click the "Add new records from this relationship..." button which caused it to fail.

Return to GoZync

Who is online

Users browsing this forum: No registered users and 3 guests

(855) SEEDCODE
[email protected]
Follow us: