Jump to content
Server Maintenance This Week. ×

Automatic creation of related records not working


charper

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

Recommended Posts

I've used this feature a half dozen times before and now all of the sudden its not working.

I have two files we'll call Parent and Child. The Parent file has a fields called Customer ID. The Child file has a field called Cust ID. Both are of type TEXT. In the Master file I have a relationship defined between Customer ID in the Master file and Cust ID in the Child file. I have the "Allow creation of related records" option turned on for this relationship.

Problem: When type Ctrl N to create a new record in the Master file and then I enter data into the Customer ID field for this new record, no new record gets created in the Child file. Why the heck not? This is exactly how Filemaker Help describes how to use this feature. What am I doing wrong here? Please, somebody help.

Link to comment
Share on other sites

quote:

Originally posted by charper:

I've used this feature a half dozen times before and now all of the sudden its not working.

I have two files we'll call Parent and Child. The Parent file has a fields called Customer ID. The Child file has a field called Cust ID. Both are of type TEXT. In the Master file I have a relationship defined between Customer ID in the Master file and Cust ID in the Child file. I have the "Allow creation of related records" option turned on for this relationship.

Problem: When type Ctrl N to create a new record in the Master file and then I enter data into the Customer ID field for this new record, no new record gets created in the Child file. Why the heck not? This is exactly how Filemaker Help describes how to use this feature. What am I doing wrong here? Please, somebody help.


Probably because you're not setting the child's CustID. If the CustID is on a layout and you enter a value into it (and the value corresponds to the Customer ID in the current file) you will create a record in the child file that is related to the current record in the parent file, assuming that there is no record in the Child file with that ID already. If there is, then you will simply cause a connection between the two existing records.

Chuck

Link to comment
Share on other sites

Thanks for the reply, but I still don't get it. If had a Child record in which I could set the Cust ID field, I wouldn't need the automatic record creation feature in the first place - the record would already exist!! Your answer seems circular. Maybe I'm missunderstanding you. Could you elaborate further?

Link to comment
Share on other sites

Thanks for the reply, but I still don't get it. If had a Child record in which I could set the Cust ID field, I wouldn't need the automatic record creation feature in the first place - the record would already exist!! Your answer seems circular. Maybe I'm missunderstanding you. Could you elaborate further?

Link to comment
Share on other sites

quote:

Originally posted by charper:

Thanks for the reply, but I still don't get it. If had a Child record in which I could set the Cust ID field, I wouldn't need the automatic record creation feature in the first place - the record would already exist!! Your answer seems circular. Maybe I'm missunderstanding you. Could you elaborate further?


You don't have to have the child record existing to have the related field appear on the layout.

Try this test, and I think you'll see what I mean.

Create a file called Parent and give it one field: ParentID. Give it an auto enter serial number of 1 with an increment of 1 (the default values).

Create a file called Child and give it two fields: ChildID and ParentID. Give ChildID the same auto enter serial number settings.

Create a relationship from Parent to Child with ParentID=::ParentID and call it Child|ParentID

In the Parent file place related field Child|ParentID::ParentID on the layout.

Now, in the Parent file, click into the RELATED field of Child|ParentID::ParentID, and enter the number that was auto entered in the local field ParentID.

As you do this, you might want to arrange your windows so that you can see both databases.

Let's say that ParentID in Parents was given an autoenter value of 1. So you enter a 1 into the related ParentID field. When you do this, a new record will be created in the Child file. Most likely it's ChildID field will be 2 and the ParentID field will be 1.

Chuck

Link to comment
Share on other sites

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