Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

My FileMake Pro 5 User's Guide says on page 2-5 "If you're working with related files, you can add records to the related file as you enter data in a record in the master file." "You can only add related records from the master file if the relationship is defined to allow the creation of related records". If I have a master file of names

related to another file with names, addresses, phone numbers etc. and the relationship is defined to allow creation of related records,

and the name in the master file is related to the name in the other file, and the master file looks up address, phone number etc. in the other file, should adding a name to the master file and filling in data in the address, phone number etc.in the master file, add this data to the other file? If so, it doesn't work for me. If not, what is supposed to be able to be done here?

Dave

Posted

Related records get added when there is a relationship, the ability to add related records is on, there is no current related record (or you are adding one through a portal) and you are trying to set data in the related record (which does not exist yet).

For instance, if I have a relationship called Names and I attempt to set a field in the related database when no valid related record yet exists, either by typing into a related field on the layout or by using Set Field in a script, since there is no related record for the data I am trying to set, a record will be created and the data will be set.

This is also possible when you have a one-to-many relationship and you view related records in the many file through a portal. The portal will have one blank row which doesn't have any data. If data is entered into this blank row, a new related record will be created and a blank row will be added to the portal to allow for creation of the next record.

So, if you're just creating a local record, but aren't trying to set any related data, no related record will be created. If the relationship is based on the Name field, you can do one of two things: You can place the related Name field on the layout and copy and paste the Name information from the current record into the related field or (equivelantly) you can use the Set Field script step to do this:

Set Field [ Relationship::Name, Name ]

Chuck

[This message has been edited by Chuck (edited January 15, 2001).]

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