Both layouts show the records from the same table (Time Cards), so when you switch from one layout to the other, the active record remains the same.
Because the button is specific for each record line, it makes the record active.
Someone else I know who is knowledgeable in FileMaker just told me the same thing. As I am coming from the Access/SQL world I was expecting there to be an EXPLCIT passing of a parameter from one layout to the other so the second layout would know which record to show. I assumed each layout had its own recordset with their own "cursor" into those recordsets. And the second layout would need to know where to positon its cursor. Obviously that was a false assumption. The table itself has a "cursor" (aka active record pointer) and all layouts would share that.
That begs a question then. Is it possible to have two layouts, both using the same table, visible at one time? And if so, would changing the active record in one automatically change the active record in the other? Not sure WHY this would ever be done or even a good thing, just curious. Still trying to wrap my head around how FileMaker works. Some of the concepts are so foreign to us Acces/SQL heads.
1 of 1 people found this helpful
It is important to understand the distinction between 'table', base table and table occuramce (TO).
Base table is the table as defined with fileds in Manage Databse.
A base table can have mulitple representations , Table Occurances (TO, or TOC to avoid interpretation conflicts)
It is the layots based on different TOC, of the same Base Table, that can have different found sets.
Thinking in terms of 'table' blurs the concept of found set, one tends to automatically think of all records. Table Occurances, to which layouts are assigned, can have the same Base Table, but different found sets at any given time,
So the question begged, requires more accurate rephrasing: Is it possible to have two layouts, based on teh same Table Occurance, visible at one time?
A: yes, use Windo New WIndow to see
Q: And if so, would changing the active record in one automatically change the active record in the other?
A: no, it will raise a warning saying this record can not be modied as it is being modified in a different window.
So in the case of the Timecard example, each of the two layouts is pointing to the same base table right? Where are these TOC's specified? I get the concept of foundsets, they equate to a recordset in Access/SQL. And I could pass those recordsets from one form to another. But I don't see where these TOC's are defined in FileMaker. I don't see how the two layouts are sharing a common TOC because the edit layout interface only lets me indicate the base table to associate with the layout.
Thanks again, I am getting there I think.
To make it simple:
In the same window: layouts that display records from the same table have the same records set.
In different windows: layouts that display records from the same table could have different records set.
So the TOC is instantiated when a layout is opened, it is not something that is "defined" by the developer. This TOC has an underlying foundset of records based on any filtering that the layout might do. If the layout executes a script that does a "GotoLayout" and the target layout uses the same base table, the new layout inherits the TOC from the first layout.
When a new Base Table is created, a TOC for that table is automatically craeted in the Relationship Graph [RG] ( File . Mange > Database... > Relationships tab
As a deveoper, in the RG you can craete mutiple TOC i.e iteratied references/representations of the Base Table. Layouts are assigned to a TOC.
<< So the TOC is instantiated when a layout is opened, it is not something that is "defined" by the developer.>>
re the opened bit yes; the deveoper however defines a lyout to a particular TOC; on a layouy, in layout mode, Layouts > Layout Setup : General tab - layout name, SHOW RECORDS FROM
<<This TOC has an underlying foundset of records based on any filtering that the layout might do.>>
< If the layout executes a script that does a "GotoLayout" and the target layout uses the same base table, the new layout inherits the TOC from the first layout.>>
No. layouts that have the same BT, can be defined to different TOC. It is the TOC that carries the found set, and the layout is defined to a TOC ( ie an instance of the Base Table).
Try it. Create 2 TOC in the RG from the same BT. Create 2 layouts , each defined ( show records from) to a different one of the 2 TOC
open 2 windows and have one display one layout( lay_a ; TOC_a) and the other window the second layout ( lay-B ; TOC_b )
create records in either
show all records on one layout (TOC_a) , find a subset on the other layout (TOC_b)