Can't link tables containing existing imported data.

Discussion of the version of HanDBase that runs on the iPhone and iPod touch devices. This includes the synchronization conduits as well.

Can't link tables containing existing imported data.

Postby Fredastra » Sun Mar 10, 2013 3:44 pm

I have 2 existing tables: Customers and Jobs. A customer can have many jobs.

I'm trying to link the two tables so I can easily view all the jobs for a customer, but nothing I do will work. The customers look like they have no jobs.

I've successfully imported the CSV files containing existing data for the 2 tables. The 2 tables are fully imported.

The customer table has an "id" column and the jobs table has a "customer_id" column. So I've set the "id" column to be a "Parent in a Parent/Child" linked column, which points to the jobs table and customer_id column. I've set the "customer_id" column to be a "Child in a Parent/Child" linked column which points to the customers "id" column.

But no matter what I do, there are no jobs for any of the customers; I just get an empty list. I've triple checked all the settings and everything looks ok to me. I can add new jobs to each customer, but the existing data isn't recognized.

After adding some jobs to a customer I re-exported the csv file using the Connect web server interface. The primary and foreign keys don't match up.

Is there something obvious I'm not doing to make this work?

Any help is appreciated!

Thanks
Chris
Fredastra
 
Posts: 3
Joined: Sat Feb 16, 2013 2:51 pm

Re: Can't link tables containing existing imported data.

Postby dhaupert » Mon Mar 11, 2013 10:19 am

Hi Chris,

Thanks for your post. The Link and Linked pair are not the right field types for this setup- they are designed to create and manage a unique ID key and do so in a unique format that is unique across multiple devices and platforms. There is another way of setting up parent child relationships when you already have IDs set up on your own-using the relationship field. Here are some documents on our support page that outline the differences and how to use the relationship field type:

http://ddhsoftware.com/knowledgebase.html?read=221
http://ddhsoftware.com/knowledgebase.html?read=259
http://ddhsoftware.com/knowledgebase.html?read=195

Let me know if you still need assistance with this!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: Can't link tables containing existing imported data.

Postby chrisr » Mon Mar 11, 2013 11:35 am

Ok thanks for that.

I took a quick look at the Relationship field type, but I got the impression that I could only look at the first or the last associated record.
chrisr
 
Posts: 1
Joined: Mon Mar 11, 2013 11:33 am

Re: Can't link tables containing existing imported data.

Postby Fredastra » Tue Mar 12, 2013 6:47 pm

Many Thanks for the info, the 'Relationship' field type is now working great. I Imported 10,500 'Customer' records with 32,500 related 'Job' records and works really well !

Have got some problems with imported dates so I may post the problem later if i cant sort it myself.

:D :D

Chris's Dad
Fredastra
 
Posts: 3
Joined: Sat Feb 16, 2013 2:51 pm


Return to HanDBase for iPhone and iPod touch

Who is online

Users browsing this forum: No registered users and 1 guest

cron