1 Reply Latest reply on Feb 28, 2013 8:23 AM by philmodjunk

    Rename foreign key field?

    EP

      Title

      Rename foreign key field?

      Post

           Combing through my file, I realized that I mis-named a foreign key.  I want to change the name of the foreign key field, however this file has been in use for a few months.  I think it will be okay, since FMP 12 changes the name in the relationships automatically.  Does anyone advise against doing this?

           Thanks

        • 1. Re: Rename foreign key field?
          philmodjunk

               In most cases, there will be no issues with changing the field name. But look out for any indirect references to the field by name that put the field's name in quotes.

               Example: GetField ( "Table::ForeignKey" )

               Since changing the name won't automatically update the name in this quoted string, this funciton call will fail if you don't find and update it after changing the field name.

               ExecuteSQL, GetField, Set Field By Name, and Script Parameters are the most likely culprits to look for if you think there are any in your system for the field in question.