Jump to content

defining relationship between imported file


This topic is 6176 days old. Please don't post here. Open a new topic instead.

Recommended Posts

i am pretty much a novice to filemaker. i have a database with contact info and i'm trying to add donation categories to track how often one person has donated in the past years. i understand that this would probably be defined as a one to many relationship????

i have created a donor table but i'm not sure how to relate it to the contact table. contactid = donorid? also i would like to be able to insert a portal on the contact form so that we can display donor info. i have attempted to do this, but when i try to view the info from the portal, it only displays info from the first line of the portal. it isn't detecting additional lines from the portal. why is this?

one other thing. i have imported a spreadsheet from excel into a new table. in the past, we've used this spreadsheet, to track donations, so it includes the following categories:

date/ fundraiser/ donor fname/ donor lname/ amount

how do i link this to the contact table and donations table? could you help with one or all of my questions, in the most simplest language?

Link to comment
Share on other sites

contactid = donorid is not what you want. You want contactid from the Contact table to match on a field contactid in the donations table. So it would look like ContactTable::contactid = DontationsTable::contactid. As a development standard, developers like to mark the key fields so that they are easy to find and based on whether they are foreign keys or primary keys. So it could further be changed to look like:

ContactTable::pk_contactid = DontationsTable::fk_contactid

Currently your excel is a flat file. There is no related info. One would think to use the name as a key but what about the cases when 2 people have the same name? This is not good design. So instead each contact should have its own primary serial key, and each donations its own primary key as well. Then the donations table should have a field that stores which contact made that donation. This is the benefit or relational structures. If you change a phone number, name, address for a contact, you do not have to change it everywhere. You can just change it in the contact table record and it will still be related to the donation table.

Link to comment
Share on other sites

Thks, I've done this. But now that I have created a primary serial key/ contactid for each entry in the new importd table (excel file), how do i create a relationship between the new imported table (excel file) which displayed past fundraisers and contacts along with the contact table and donor table so that I can begin imputting info? i dont know if i have correctly defined the relationships between the three tables.

Link to comment
Share on other sites

This topic is 6176 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.