5 Replies Latest reply on Jun 4, 2017 11:15 PM by tmlutas

    Importing Layouts

    StewartRitter

      Title

      Importing Layouts

      Post

      Is there a way to import a layout from one filemaker file to another?

      Thanks.

        • 1. Re: Importing Layouts
          philmodjunk

          You can copy and paste all layout elements from a layout in your source file to a layout in your target file.

          But you have to pay attention to a number of important details to get the layout to work in the target file:

          Any layout refers to a table occurrence by name in Layout Setup | "Show Records From". The table occurrence selected for the layout in your target file must exactly match the name of the table occurrence specified for the layout in the source file. If you do not, any fields on your layout will show "table missing" or some such message instead of data and you have to update them one by one in layout mode by double clicking them. Sometimes you can open manage | database | relationships, find the table occurrence box and double click it to open up a dialog where you can rename it so you have matching TO names. You can change the name back if needed, after you get your layout pasted.

          Once you have TO's of exactly the same name, use layout setup in your target layout to select this TO in Show Records From.

          The above mentioned table occurrence refers to a table in your database. Each field on your layout will automatically display data from a field in your target file, IF the TableOccurrence and Field names match exactly. If the table in your source file is named "Date" and it's named "Exp_Date" in the target file's table, you'll get the a similar error message as before and you'll have to double click the fields and "point" them at the field you want in your target file's tables.

          Any buttons that perform scripts in the layout objects that you paste will also not work unless a script already exists of exactly the same name in the target file. You may need to import or rename some scripts in the target file before you copy/paste. But, there's a catch if you need to import a script. The script may in turn refer to objects on your new layout. If so, importing the script before you have your layout breaks the script. This produces an apparent catch 22 where you either have to fix broken scripts or update broken buttons. There's a way to avoid that, however. Paste your layout first, import the scripts, delete all your pasted layout objects and then paste them again.

          Any value lists in your layout need to be set up in your target file with exactly the same names before you paste your layout and before you import any scripts that might refer to a value list by name.

          In layout mode, you can click the units to the right of the size/position boxes on the inspector's position tab until you get pixels (points in FMP 12). Then you can click each layout part label and note the height of each. You can then select layout part labels on your target layout and edit their heights to match. Any additional layout parts such as sub summary layout parts will have to be manually added and sized at this time as well.

          Finally, when you select all the layout objects for pasting, note the top and left values on the inspector's position tab. If you are using FMP 12, you must group your selected objects before you can see these values. Then, when you paste into the target layout, leave the pasted objects selected and edit the top and left boxes to exactly the same values in order to precisely and correctly place them on your new layout.

          3 of 3 people found this helpful
          • 2. Re: Importing Layouts
            synergy46

            Good reply.  Very clear.

            Question:  "Is there a way to BULK copy/move layouts from the source to the target; as there is with Import scripts?

            • 3. Re: Importing Layouts
              steveromig

              Good reply.  Very clear.

              Question:  "Is there a way to BULK copy/move layouts from the source to the target; as there is with Import scripts?

               

              Other than the copy / paste method already discussed AND saving a file as a clone as using the clone for development, there is no additional way(s) of moving a layout from FileA to FileB.

               

              Steve Romig

              FileMaker, Inc.

              • 4. Re: Importing Layouts
                synergy46

                Thanks for the confirmation.

                FYI it is real pleasure to just click off the scripts to import.

                It is a real pain to create each layout and  copy and paste from the source to the new target file.

                1 of 1 people found this helpful
                • 5. Re: Importing Layouts
                  tmlutas

                  Applescript would seem to be a possible solution. There's an app called base elements that might do most of the heavy lifting for you, though depending on what you're doing this for, this solution may be overkill. There's a 30 day free trial. BaseElements | The database for your database

                  1 of 1 people found this helpful