2 Replies Latest reply on Apr 24, 2012 3:44 PM by AToprak

    Changing table name causing problems in layouts

    AToprak

      Title

      Changing table name causing problems in layouts

      Post

      Hello All:

       

      Just created two tables in an existing DB. Did not like the initial names and renamed the tables. When I create a new layout, choosing fields from the newly-named table:

      • The layout reports that the fields are referring to a non-existent table, and shows as if I chose fields from a table with the first name,
      • Editing the layout to pick the fields from the proper table:
        • Does not show the table with the new name.
        • The "current table" does refer to the correct table, however, there are no fields show underneath this table.

       

      I think FMP is confused, so am I.

       

      How do I rectify this situation?

       

      Thanks.

        • 1. Re: Changing table name causing problems in layouts
          philmodjunk

          There are tables and there are table occurrences.

          When you create a new table. FileMaker automatically creates a new table occurrence and a new layout--both with exactly the same name as your table. Table occurrences are the "boxes" located in Manage | Database | Relationships. When you go to the layout of the same name and open up Layout setup, there's a drop down list named "show records from". It appears to list the table on which your layout is based, but it really lists the table occurrence of the same name.

          When you go to Manage | Database | tables and rename a table, the corresponding table occurrence's name does not change--it continues to have the original table name. Every "table" drop down in filemaker except for the one in Manage | Database | Fields is actually a list of table occurrence names as you are selecting a table occurrence, rather than a table.

          Go back to manage | Database | relationships and find the table occurrence with the same name as what you had originally used to name this table. Hover the mouse over the top left corner and you'll see a tool tip pop up with the name of the data source table, which should be the new name you have given your table. Double click this box and you'll get a dialog where you can rename the table occurrence to match your table name. The layout will still have your original table name at this point, but "Show records from" will now list the new name. You can use layout setup or manage | Layouts to edit the name of your layout to match the new table name if you wish.

          Table occurrences, BTW, are used to make it possible to create multiple relationships between the same two tables. FileMaker gives you one to start, but you can use controls in Manage | Database | Relationships to produce additional occurrences of an existing table--each with a unique table occurrence name, but all referring to the same data source table.

          See this tutorial to learn more if you are interested: Tutorial: What are Table Occurrences?