Page 1 of 1

Pull Child record and the associated Parent record

PostPosted: Tue Nov 04, 2014 12:01 pm
by RamVkrish
Hello,
I have a question regarding syncing user specific data.
my Table structure

Contacts
ID
First Name
Last Name

Territory
Territory ID
Contact ID
User ID
Territory & Contacts will have many to many relationship ie A territory /Contact Combo can be assigned to many Contacts.
how do i configure gozync to pull down territory data from the server which are assigned just to my name(rv600495) , I need to get the related contacts too. Ie When i do a pull from server i should be getting the records in territory which have my user ID(rv600495) and the Contacts which are associated with the records ie Contact ID 1,2


ID First Name Last Name
1*******Joe*******Doe
2*******Jane*******Doe
3*******Test*******Contact

Territory ID Contact ID User ID
1*******2*******rv600495
1*******2*******mxt46578w
2*******1*******Rv600495
1*******1*******fdf550634

Any help will be deeply appreciated
thanks
Ram

Re: Pull Child record and the associated Parent record

PostPosted: Tue Nov 04, 2014 12:12 pm
by jeffalmquist
Hi Ram. We have tips for how to do this kind of thing here:
http://www.seedcode.com/pmwiki/index.ph ... gFoundSets

...and here:
http://www.seedcode.com/pmwiki/index.ph ... countNames

HTH -Jeff

Re: Pull Child record and the associated Parent record

PostPosted: Wed Nov 05, 2014 1:49 am
by RamVkrish
Thanks for the response Jeff,but my requirements are slightly different .
the examples i see help in setting filter criteria @ the parent level and pull the corresponding child,but i need to set the criteria @ child level and pull only the related parent.Would that be possible too ?

Ram

Re: Pull Child record and the associated Parent record

PostPosted: Wed Nov 05, 2014 10:30 am
by jeffalmquist
Couple of things you could try. You might just be able to reverse the logic in your sync configuration in GoZyncHosted (click the Requires column for the "parent", and select its primary key). Or you could just sync the tables independently (no related syncing), and set up filtering as described in that article I sent before. HTH -Jeff