Jump to content

Creating table entries from a layout

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

Recommended Posts

  • Newbies


I'm brand new to FileMaker, but years ago worked extensively in SQL and have dabbled in Access a fair deal. I understand one-to-many relationships fairly well, but I am bamboozled by layouts (are these what people call portals?) in

Let's say I have two tables, PhoneBook and PhoneBill.

PhoneBook has two fields, Caller and Called. Called is specified as unique.

PhoneBill has two fields, Called and Cost.

PhoneBill::Called is linked to PhoneBook::Called. Due to PhoneBook::Called being unique, I (think I) have a many to one relationship. It shows up as such in the relationship diagram.

Now, I have created a layout BillView based around PhoneBill, showing PhoneBill::Called, PhoneBill::Cost and also PhoneBook::Caller. The idea is that you could go through a phone bill and assign called numbers (Called) to their callers (Caller).

Let's say a number has been called for the first time ever, so it doesn't yet appear in PhoneBook. When I Browse BillView, I can see Called and Cost, and PhoneBook::Caller is empty as it should be. I add data to PhoneBook::Caller through BillView, assigning the call to a caller.

Here's where it gets odd for me. The data I add to the related table (PhoneBook::Caller) gets saved SOMEWHERE, BUT NOT IN PhoneBook! No record is created in PhoneBook at all when I add data to PhoneBook::Caller through BillView. I close the database and repoen it, and the data I added through BillView is still there in BillView, but it is not in the tables which underly BillView.

Clearly, I'm not understanding FileMaker.

Firstly, precisely where is the data entered through a "layout" stored, if not in the tables? Is some sort of variable created holding the data. (If so, why on earth?)

And how DO you make a layout create records in an underlying table that is not the primary table?

Apologies for the complaexity of that question. I don't yet know the Filemaker terminology in order to ask it more succinctly. I suspect I should use the word portal more often. Is a portal a view on two or more related tables?


john confused.gif

Link to comment
Share on other sites

Hello John and welcome to this place!

A layout in Filemaker has approximatively the function of a view in Access. By your design, you decide which data is how displayed.

In Filemaker 7 every layout is bound to exactly one table/table occurence. So any fields you place directly on this layout (by choosing "current table" in the field select box) stores and shows data of this table.

If you want to store information for your PhoneBook table and the layout, you are going to enter the data in, belongs to the PhoneBill table, you should use a portal: Portals are a part of the layouts, but not the same. Layout refers to everything you design in layout mode. The portal tool you find in the tool box to the left: It is the right one in the lower most row (the one showing three rows, one white and two grey). Select this and draw a rectangle in the layout. if you leave the mouse, a dialog pops up where you have to choose the table/table occurence form which you want to show data in this portal: Choose PhoneBook and you can select the fields from PhoneBook, you want to show. In the Portal dialog box you also define how many rows the portal will have, if you want a scroll bar etc. After you have clicked OK you will see the portal in layout mode, but only the uppermost row looks like a row; all related fields must be exactly inside the boundaries of this row! If you change to Browse mood, the portal will show all rows and there will be as many filled one as there are related records in PhoneBook. To be able to edit data in a portal, you must have defined the field behaviour to allow entry to the fields. If you want to create new records in PhoneBooks you must select in the Define Relationship box "Allow creation of new records" (on the side of PhoneBooks). Then there will always be an empty last row in the portal: Click inside the fields, enter your new data and a record will automatically created in PhoneBooks (and afterwards there's a new empty row again).

Hope this helps for the beginning!

Link to comment
Share on other sites

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