4 Replies Latest reply on May 16, 2013 7:04 AM by philmodjunk

    Primary Key not working?

    JohhnyHilly

      Title

      Primary Key not working?

      Post

           I have built a small standalone database with a few tables. Everything in it is working fine as I want it to. I have literally copied the tables from this database and pasted them into another database (where I actually want it to be) and configured the tables, relationships, calculations etc to be the same.

           In this new database for some reason the primary key is not working properly. If I enter an ID number into the Asset ID field (which is the primary key), the merge field of the primery key does not do anything. It remains as "<<__pkAssetID>>, instead of actually displaying the Asset ID number. I have gone over everything I can think of to make it work but I haven't found the solution. Anyone have any ideas why this is happening?

        • 1. Re: Primary Key not working?
          philmodjunk

               Did you use the Insert menu to insert the merge field?

               Unless your layout is based on an occurrence of the table where __pkAssetID is defined, there should be a table occurrence name in front of the field name.

          • 2. Re: Primary Key not working?
            JohhnyHilly

                 Yes, I used the Insert menu to insert the merge field.

                 The layout is based on the table where __pkAssetID is defined. So like I said, really not sure why it isn't displaying the value. Actually, playing around, if I put a merge field on the layout for any of the fields defined in that table, the same thing happens. The merge field doesn't update to display the field value. 

            • 3. Re: Primary Key not working?
              JohhnyHilly

                   I rebuilt the database from scratch and it works fine. I guess you should avoid bulk copying and pasting.

              • 4. Re: Primary Key not working?
                philmodjunk

                     Bulk copy/pasting works, but you have to pay attention to certain key details--the underlying tables underlying each layout have to have fields of the same type and name and their table occurrence names should be identical.

                     Otherwise you have to "repoint" all field objects and portals, plus you have to re-insert your merge fields.