Jump to content

relational database help (many to one??)


archives8

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

Recommended Posts

OK

Im building a my first database in filemaker for a new project at work. Basically we are doing preservation work with audio recordings. The datbase is broken into four different tables (files). Two of these files are the original item file and a service copy file. There can be multiple original items on service copys.

the main entry file is the original item file, and i would like to be able to edit service copy information from it. Right now I have a service copy view with a service id that links to the service file in my original item file. I can pull up the records in the service file, but i dont seem to be able to create new records. I should clarify, I can enter new information into the linked field (service_id), but when i try to enter information into any of the other fields (which arn't defined in the relationship) i get an error message saying the relationship is not valid. I can alter records that were entered directly in the service file, but i really need to be able to create brand new file within my master (original item) file.

Do i just need to declare a relationship for each of the fields in my service file? This will end up being qute a few relationships.

thanks ahead for any advice, and i hope this wasn't overly confusing.

-D

Link to comment
Share on other sites

D:

There could be a number of things wrong here. First, you don't need to declare a relationship for each field, just the one key field, which you seem to have done. I'm wondering if the fields you're trying to enter into are actually part of the relationship... Other than that, it's difficult to tell from your post just what the problem is.

As far as creating new records, there is a check box "Allow Creation of Related Records" (or something like that) in the Define Relationships dialog.

If possible, upload an empty copy of the databases to this forum, so we can see exactly what's going on.

-Stanley

Link to comment
Share on other sites

ok Im going to attach a .zip file with the two related .fp5 files.

You can start by opening the item.fp5 file. I would like to be able to create a new record in this file, and then click on the "service" button, and create new records there that will go into the service file.

right now i can open and edit records in the service file that I created in the service file itself. But whenever I try to enter information into any of the fields besides the link field, I get an error window stating the relationship is not valid. I have the option for create new records in related file checked in the define relationships dialog.

thanks,

-D

problem_file.zip

Link to comment
Share on other sites

Hi,

Yes, your relationship definitely isn't valid, as your right key is a calculation in the Service file.

A single One to One relationship could be build by having the Item ID related to the SourceField, but this won't let you create the Many to One relationship anyway.

You'd need a Join file to make it work (I know of other way !), that would have both the ItemID and the ServiceID.

Make a little search on the forum about Join Files or Line Items.

Link to comment
Share on other sites

cool thanks,

I know how to do join files, my database design cops are rusty at best. I'm new to filemaker (which is weird to me, i have a sql background), so I'm never sure whether my problem is with my ignorance of the software, or just a pure conceptual flaw.

thanks (back to work)

-Donald

Link to comment
Share on other sites

This topic is 7368 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.