4 Replies Latest reply on Apr 26, 2012 10:44 AM by leolijs

    importing and exporting layouts

    leolijs

      Title

      importing and exporting layouts

      Post

      Hi,

      need help about how to import an layout made with another file with the same field names ?.

      In the old filemaker 5 I have do it well.

      Regard's

        • 1. Re: importing and exporting layouts
          philmodjunk

          What version of FileMaker are you using when you need to do this? (Last sentence is not clear in your first post.)

          Do you have FileMaker Advanced? (Not actually necessary, but can be very helpful in checking things after bringing the layout into your file.)

          • 2. Re: importing and exporting layouts
            leolijs

            Hi Phil, thanks for your answer.

            I am using filemaker 12 Advanced, the case is how  to import layout from another database. I want to use a kind of Templates for use in diferents filemaker files.

            Also have a lot of helpfully layouts made in filemaker pro 5 and 7 from time ago.

            In older version you have a choice to export or copy structure, in this version 12 canot find anywere how to exports or copy stuctures.

            Hope you can understand, my english is not so good, my mother lenguage is spanish and dutch.

            • 3. Re: importing and exporting layouts
              philmodjunk

              Older versions of Filemaker will need to be converted to FileMaker 12 format first. Then you can copy and paste a layout from one .Fmp12 file to another, but you have to pay attention to more than just table names here.

              Before you copy and paste open layout setup in both the source layout and the target layout and note the name shown in "Show Records from" this text must be letter for letter the same in both layouts before you start. The text in this drop down matches a table occurrence "box" in Manage | database | relationships. You may need to temporarily rename one of these table occurrences to get them to match. Then the fields need to have identical names--this can be done by copy and pasting a table from one file to the other or by importing a table with the new table option.

              Then there are two more details. 1) Any fields that refer to a value list will not copy and paste correctly if the target table does not have the same value list with exactly the same name set up first. Thus, you'll need to reproduce all such value lists before you copy and paste. 2) any buttons or script triggers that perform a script will not work after pasting unless you first import those scripts into your file or create new scripts of exactly the same names. Since scripts can refer to layouts and layout objects, it may look like you are caught in dilemma where you can either import working copies of yoru scripts or copy and paste a layout with working buttons but not both.

              There's a way around that dilemma:

              1) Enter layout mode on your source layout. Use ctrl-a to select all layout objects.

              2) Go to your target layout, enter layout mode and paste. You don't care what the layout looks like at this point. You just need all the objects to be present on the layout.

              3) Import any scripts performed by buttons and script triggers on your layout. Since you have your layout in place, references to objects on it won't break your script. (You will need to analyze your scripts for any references to other items not present in your target file.

              4) Now go to your target layout and delete all the objects from it. Return to your source layout and note the layout parts that are present. Use the inspector's position tab to note the height of each part. (Click the units on this tab until you get pts. Click the label of a part to see it's height.)

              5) return to your target layout and create any missing layout parts--replicating their settings as needed. You can click a part label and then edit the height box in the inspector to set the part's height to precisely the same height as found in the source layout.

              6) go to the source layout and once again, copy all layout objects. Before leaving the layout note, the top and left numbers in the inspector.

              7) Go to your target layout and paste. While all pasted objects are still selected, check the top and left setting and edit them to match the values you saw on the source layout.

              While doing this kind of major design change on a layout, it's very helpful to generate periodic database design reports and do a text search for the words "unknown" and "missing" to look for things that did not get correctly imported into your target file.

              • 4. Re: importing and exporting layouts
                leolijs

                Hi Phil,

                Thanks for your help, now I have solved my problem.

                Leo