5 Replies Latest reply on Aug 7, 2012 6:12 AM by GuyStevens

    Copying Layouts



      Copying Layouts


      Hi All

      I am new to FM and am just playing about to see if it can do what I need.

      I cannot find an answer to this in the help - can layouts be copied from one file to another?

      If I had mulitple files of the same format and wanted to use the same layout on all how would I go about this?


      Thanks in advance

        • 1. Re: Copying Layouts

          Easiest thing to do is to go to "File" - "Manage" - "Layouts"

          Select the layout you want to copy and hit "Diplucate" on the bottom of the window.

          Then Select the new layout and click "Edit" and point the new layout to another table.

          Then it's just a matter of pointing the fields on your layout to the felds in the new table.

          • 2. Re: Copying Layouts



            Thanks for that

            When I go to this option and where it says show records from - there is a drop down list here but all my files are not showing there.

            So my new file that I want to point this layout to is not there?


            • 3. Re: Copying Layouts

              The drop down will list table occurrences--the boxes found in Manage | Database | Relationships that represent tables and which are linked to each other in relationships.

              You'll need to decide whether it matters if the new layout is in the same file as the original layout or must be located in the file where the table is defined.

              If it is OK to include the layout in the same file as the original layout so long as it refers to the correct table from the other file, you can go to Manage |Database | relationships and add a table occurrence that uses an external flie reference that refers to the table in the other file. Then, the table occurrence thus created will appear in the "show records from" drop down.

              If the layout must be located in the other file, you will need to create a new, blank layout in the target file, return to the source file--the file where the layout already exists, find the layout, enter layout mode and thend select and copy all layout objects to the clipboard. You can then switch to the blank layout in the target file and paste to paste all layout objects to the layout.

              With either method, you will still have a fair amount of work ahead of you. Unless the table occurrence specified in Show Records from refers to a table occurrence of the exact same name and the fields on the layout match to fields in that table that have the exact same field names, you will need to select each field object in turn while in layout mode and "reconnect" them to the correct table occurrence and field. Portals likewise will need to be updated to refer to the correct related table occurrence.

              Value lists and buttons that perform scripts will likewise be broken unless a script or value list of exactly the same name already exists in the target file. (Not as much of a problem if you keep both layouts in the same file.) And be aware that scripts performed from the first layout may or may not work correctly when the copied button performs them from the new layout based on a different table.

              • 4. Re: Copying Layouts


                I would have thought it would be easier to copy that that!

                Its a simple layout so might be easier to just recreate it

                Tthx for your help

                • 5. Re: Copying Layouts

                  You might be able to enter layout mode, select everything and just copy that ad past it into a new layout in layout mode.

                  Maybe even in another file.

                  The only things you won't have that way are the background colors of the layout parts. And their size.