Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Simple auto-creation of related records


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

Recommended Posts

  • Newbies
Posted

Hello,

I can't understand why this is so difficult, but hopefully someone can help.

I have two database files (Inventory and Quality Control) with a relationship defined by a unique ID. I import data into Inventory and have ID created automatically (serial number). All I need is to have records created with these same ID values in Quality Control, so that it can display several related field values from Inventory based upon the ID relationship.

I have created the relationship between the two and checked "allow creation in QC" as well as "allow deletion". Creation does not work unless I have a related field in Inventory to Quality Control which I enter data into. Deletion works if I manually create a record in both and delete the record in Inventory. Isn't there a simple way to automatically create records in QC via this relationship without having to enter data initially?

Thanks,

Chris

Posted

Chris:

Welcome to the Forums.

If you create a portal in your parent record (which sounds like your Inventory record) to your QC table, and put the fields you want to populate in there (not the automatically created fields, but the other stuff you would type in) then you should see a blank record, besides any extant related records. Filling in the blank record will create a new related record...

-Stanley

  • Newbies
Posted

That only seems to work if I immediately want to enter data into the field that is within the portal. Is there a way to simply create the record with a matching ID and no other data?

The situation is that one user will be creating the records in the parent (Inventory) file, one record per "part" that we process. Later on, another person will have to enter data into the child (Quality Control) file, and ideally they will not have to create new records for parts that we already have - it would be much easier for the user if they were already there.

Alternatively, I would consider merging these files into one and having separate tables for each current database. This seems like a hassle though, as I don't know of any way to merge them without manually re-creating all the fields and whatnot.

  • Newbies
Posted

Also, I want this to work when I import from excel files. Is there even a way to import into a field in a portal?

Posted

This is a common request, to automatically create "blank" records in a child table. It is usually not necessary, and generally causes more problems than it solves. It doesn't really make data entry easier. Because if you've set up the relationship to "allow creation of related records" the child record will be automatically instantaneously created as soon as you type in any data into a portal (or a related field on its own, if there's only 1 child record each; but that's unusual).

Importing data into a child table (portal) is another question. Importing child data is done by importing into the child table. Portals are just a FileMaker layout device to show and enter data into a related table. The portal's rows (records) are in the child table, which exists on its own also.

When importing into a child table, specify its table occurrence as the target, at the top right in the Import dialog. There is no such thing really as "importing into a portal," because you are on the PARENT layout at that time.

When importing into a child table it is critical that there is a column (field) in the Excel file which can tie the two tables together. Preferably this would be the ParentID field (column). But something else could possibly make a temporary key (such as a consistent name). In that case a script should be run to get the ParentID (and carefully tested afterwards).

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