Forum Discussion

HemaRajendran1's avatar
HemaRajendran1
Qrew Trainee
4 years ago

Primary Key change

Hi Folks,
Currently, my tables are using a text field as a primary key. I am planning to change it from Text to Record ID#.
Can any of you help with the DO'S and DONT's that I need to follow before doing the change.

Thanks in Advance

4 Replies

  • Firstly, you can always copy your app and do the change there, just to practice and see in advance what it will do.

    You will set the Key field and it will give you two scary warnings and then in a blink it will change the Key field and update all the child records so they stay connected to their original parents.


    Then you will go to each affected relationship to identify a Proxy field for the [Record ID#] field.  For example if the Customer name was the Key field of the Customers table and now you want to go to [Record ID#],  then you go to the Related Customer field, remove the (ref) suffix which QuickBase added, and set the Proxy for [Related Customer] to be Customer name.

    Then go to the form on the child record and make sure that Customer Name is on the form and Related Customer is not.

    Then test the drop down for choosing the customer. (Parent) 



    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
  • Edit: I wrote everything below before read Mark's reply. Mark, I seem to remember it did not re-associate the children when I went from text to numeric (only if I went from numeric to numeric). Perhaps I am misremembering? Mark has way more experience, so you may be able to ignore everything I wrote below!

    ----------------------------------------------

    [Deleted Response]

    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      The children will absolutely 100% stay attached to the parents.

      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      mark.shnier@gmail.com
      ------------------------------
      • MichaelTamoush's avatar
        MichaelTamoush
        Qrew Captain
        Mark,

        It dawned on me the reason I had issues was due to my cross-app relationships. Thanks for setting this all straight!

        ------------------------------
        Mike Tamoush
        ------------------------------