3 Replies Latest reply on Mar 23, 2009 9:10 AM by MikePR_1

    table switching in a layout:

    MikePR_1

      Title

      table switching in a layout:

      Post

      Hello:

       

      FileMaker 10 (and several versions before, but after 6) have the ability to contain several tables in one file. Can I use the same layout (1 and only 1 layout in 1 and only 1 database file) to show records from 1 of multiple tables, (but each table has the exact structure from the other) without using portals?.

       

      The reason is I'm using several FileMaker Pro V6.04 databases to keep track of actions and dates. The main database is the active one, but once a record reach a milestone and the information is recorded, I manually transfer the record to what is called an inactive, closed or archive database (each one is a different database) so that my files doesn't get bloated.

       

      What I want to know is, if it's possible to use only one layout to show the records of different tables (no portals) by, let's say, selecting an option in a pull down (Active, Inactive, Closed, Archive) and triggering a script to change to the table with that name.

       

      Thanks guys, great work.

        • 1. Re: table switching in a layout:
          philmodjunk
            

          You probably can, but I can't see any easy way to do it.

           

          Given how you can duplicate a layout with just a few mouse clicks and then specify the other tables in each successive duplicate, it may be far simplier to maintain parallel layout designs. The trade-off, of course, is that this requires you to make identical edits to this set of layouts any time you want to make a change to your layout design.

           

          You're other option, now that youv'e upgraded, is to merge your data into a single table. I'm evaluating a similar situation, where we've historically, exported invoices to an archive file at the end of the day and then purged them from the database files where they originated. Now, that hardware and software is so much more capable than previously, it becomes a good question as to whether it still makes sense to keep this structure.

           

          Editorial comment:  Much as I prefer Filemaker over MS Access for most tasks, this looks like a case where the ability to specify a form or report's record source by programatically manipulating a string expression that can include different tables gives MS Access a definite edge in this one small area--not that I'm suggesting MikePR switch database software! :smileywink:

          • 2. Re: table switching in a layout:
            FentonJones
              

            I was going to say No, but then I though of an "abstraction" technique, by Bruce Robertson. Which is an "array" table, which has as many records as you need. It has an "index" field, 1 to n. Its other fields are calculation fields, using GetNthRecord (relationship::field; index). 

             

            In your case you could add a "toggle" field (global).

            Case (

            toggle = 2; GetNthRecord (relationship2::field; index);

            GetNthRecord (relationship1::field; index)

            )

             

            You'd need a calculation for each field. It would likely work, but the speed might (likely) be unacceptable. As you say, you have an archive table because you have a lot of records; hence 2 layouts, each a native view, is really the best solution. You could use a script trigger in 10 to switch layouts from your drop-down, otherwise a button(s). 

            • 3. Re: table switching in a layout:
              MikePR_1
                 Thanks to both Phil and Fenton for your answers. I agree with both that the creation of a layout for each table and a trigger that look at the pull down to take you to the correct one is the best one "For now". I was checking if there was something in 10, that I still haven't found out. Thanks again to both.