1 Reply Latest reply on Feb 1, 2013 12:13 PM by philmodjunk

    Multiple Layouts Within One Database



      Multiple Layouts Within One Database


           We have a database full of thousands of names of clients... within this database we have multiple layouts that we use dependent upon the company.  Is it possible to lock a layout to a record within the database so that when we are working on another client with a different layout that when we go back to the first client the layout has not changed?  We just upgraded to Filemaker Pro 12 from Filemaker 6. It seems in the past that when we used a layout for a record that we did not have to change back and forth everytime we switched clients.

           Please advise... it's driving us crazy!

           - Mindy

        • 1. Re: Multiple Layouts Within One Database

               This is not something that has changed in FileMaker between v6 and v12, but in FMP 6, you were much more likely to have separate files and separate tables for each company and this would have avoided the problem you have encountered.

               If you have two layouts that both refer to the exact same name in "Show Records From" found in Layout setup..., then they have the same found set, current record and sort order. If you change records on one of the two layouts, the other also changes to the same record.

               There are several different ways around that issue:

               1) You can open two windows and select different layouts in each window. When you have different windows to your database open, they each have founds sets, etc that are independent from the other window.

               2) The text in Show Records From may look like the name of a table in your database, but it's really the name of a Tutorial: What are Table Occurrences? "box" found in Manage | database | Relationships. You can use the duplicate button (two green plus signs) to make a second table occurrence for the same table, but with a different name. If you select the name of one table occurrence for one layout and the name of the other table occurrence for the other layout, they will have independent found sets, current records etc.

               3) This last one could be a bit complex to implement, but may avoid issues with multiple layouts and multiple table occurrences. IF you set up a set of global variables, one for each layout, the OnLayoutExit trigger could be set up on each layout to put the value of the table's primary key field in the global variable you create for that layout. Then a script, performed by the OnLayoutEnter trigger could use that value to return you to the record that was current when you last exited that layout.