1 Reply Latest reply on Mar 4, 2013 10:58 AM by philmodjunk

    Copying a Table and its' Associated Layouts



      Copying a Table and its' Associated Layouts


           Is there a way to copy a table with its' Records and associated Layouts? I have a table with records containing some basic information which I need to copy 26 times and add other info. I am able to copy the table and import the records, but when I copy the layouts the fields are referencing the original table. I’ve tried both duplicating the layout and switching “show records from” to the new table and also creating a blank layout showing records from new table and then pasting in the layout objects. Either way I have to select each field in each layout individually and change it to show info from current table (and switch the calculations in conditional formatting to reference fields in current table). Is there any way to make the layouts automatically show the fields from current table?

           If this can’t be done automatically, is there at least a way to select multiple fields and switch them to all to current table?

        • 1. Re: Copying a Table and its' Associated Layouts

               Why do you need to do this "26 times"? It may be that duplicating the tables and layouts are not something that you need to do and this will save you a great deal of trouble here.

               Here's how to do what you want, but keep in mind that I suspect that this is not needed in your case:

               Enter Layout Mode, select all layout objects and copy them to the clipboard.

               Go to Manage | Database | Relationships and rename the original layout's Tutorial: What are Table Occurrences? to be something different. Then select the new layout's table occurrence and change its name to be exactly the same as the original name for the original layout's table occurrence before you changed it just now.

               Now go to/create the blank layout for the new table and paste your copied layout objects. Because the underlying table occurrence name is now the same as for what was in place when you copied these layout objects, they should all correctly link to the correct fields and table occurrence.

               After you have finished, you can return to mange | database | relationships and rename the table occurrences to the final names that you wish to keep in place for each.

               Note: this requires that you are working with either duplicate tables, duplicate table occurrences, or at least tables where the layouts' fields have exactly the same names in each table.