AnsweredAssumed Answered

Creating linked primary and foreign keys when importing records.

Question asked by MJMWeb on Jan 26, 2016
Latest reply on Jan 26, 2016 by mikebeargie

I have three tables I need to set up. Parent, Child A, and Child B.


Parent exists to link both tables together so I can get two completely different sets of data to interact with each other. So imagine if this were for a budgeting setup, Child A would be income and Child B would be bills. Each set of data is unique so I wouldn't want to combine them into one table (it'd be possible but inefficient and not best practices).


The income table is easy enough. The user inputs the data, so when they want to add a new income I can create a record in the Parent table and grab the primary key I create there, then create a new record in the income table and add the primary key value to the foreign key. The Billing table is a bit different, because I"m pulling that data from an OBDC connection. So I need to populate the Parent table with a new primary key for each new record the OBDC connection will bring over and make sure the Billing table has the matching foreign key. Not quite sure how to do that part. Any suggestions?