Page 1 of 1

Second sync deletes records from one TO...

PostPosted: Wed Oct 16, 2013 8:16 am
by brian.curran
Hi,
I'm using the "Zync It - Public API - ( TOName ) { Action ; RecordID }" script to sync TOs using the following script parameter:

"TOName = Address¶AlarmCo¶Arc¶Employees¶Incidents¶JoinPeopleSite¶KeyDetails¶KeyHolding¶KeyHubs¶KeySeals¶MobilePatrols¶People¶Police¶Site¶StaticGuarding¶VoidPropertyInspections ; Action = Pull"

This works perfectly with a 'cloned' Mobile file and a 'Reset' gzMobile. However, if I run the sync again, all records in the "Incidents" TO are deleted.

Looking through the zync log, the section for Incidents is identical to all the others except it states Deleting 4494 records from gzm_Incidents"

Any suggestions on how to stop this from happening?

Thanks
Brian.

Re: Second sync deletes records from one TO...

PostPosted: Wed Oct 16, 2013 9:37 am
by jeffalmquist
There's either something wrong with how one of the "Incidents" TOs is configured on the Relationships Graph in GoZyncMobile, or you have some special filtering set up in the "Filter Records to Zync" script, or possibly the primary key field in the Incidents table in the hosted file isn't correctly populated for existing records. Double-check those things and if you still have trouble, send me your files and I'll have a look. Send them to [email protected] and include any full-access passwords I'll need.

Re: Second sync deletes records from one TO...

PostPosted: Wed Oct 16, 2013 10:45 am
by brian.curran
Thanks Jeff, I've checked the first two suggestions and they look ok to me. I also had a quick look at your third suggestion but am unsure of what I'm supposed to be looking for.

The files and password are on their way across to you...

Brian.

Re: Second sync deletes records from one TO...

PostPosted: Thu Oct 17, 2013 10:55 am
by jeffalmquist
Thanks for sending your files. I think I found your problem. The "gzm_Incidents" branch in your GTRR script is using the wrong relationship (see screen shot). Fix that and try synching again.

Re: Second sync deletes records from one TO...

PostPosted: Thu Oct 17, 2013 12:32 pm
by brian.curran
Excellent, many thanks Jeff...