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

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

Recommended Posts

Posted

I have my database setup right now consisting of 3 tables: Autohire, Notice, and Main. My overall goal is to have my layout relating to Main be my main page consisting of a portal and a few buttons. The buttons I can worry about later, right now my current goal is to get the portal working.

In the portal I want it to display information from Autohire. Autohire consists of different information. The two items I'm only really concerned about display in the portal are the fields recordnumber (which is a number field that enters an auto-enter serial number), and title (which is a text field so that a user can enter in a title of a job position).

In the Main table I have put in those two same fields as are in Autohire. The relationship right now is set for recordnumber(Autohire)=recordnumber(Main) AND title(Autohire)=title(Main). When a create a new record, though, using the Autohire layout, nothing shows up in the portal I've create on the Main layout.

I hope I've explained it well enough, I'm still kind of a rookie when it comes to FileMaker.

Ben

Posted

The relationship should be from the Main table (what is it? Main doesn't tell us much), to the Autohire table, based on the Main ID,* with [x] Allow creation of related records, on the Autohire side. The Title should NOT be in Main, nor in the relationship.

In the blank row of the portal, type into the Autohire::Title field, to create the related record.

*In both tables; as an auto-enter primary key in Main, as a foreign key in Autohire. It would NOT be an auto-enter field in Autohire; a foreign key is almost never an auto-enter field.

You should not use the phrase "record number" when talking about an "ID" field; in FileMaker "Record Number" is just the current position of a record in the sequence of the found set records; visible in the Status Area, also accessible via the Get (RecordNumber) function.

Posted

I did as you suggested. I can type into the title field on a blank row in the portal, and it creates a new record in the Autohire layout. The problem I'm having now is that when a new blank record is created while in the Autohire layout, it doesn't appear in the portal. What steps can I take to get that to work?

Posted

If you create a record in the Autohire layout (table), then how is it going to know which Main record it is supposed to have a relationship with? You would have to manually enter the ID of the Main record into a local field in Autohire (that's why it's called a "foreign" key).

Which is one reason it's often better to enter related records in a portal on the parent record rather then enter them in a child record.

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