Discussions

 View Only
  • 1.  How Do I Set New Key and Keep All Links and Formulas Working Like Before?

    Posted 04-27-2017 20:02
    I have a Linked Table being Updated from Dropbox every day. When the Table was set up there was a key established that is not always a unique value. Recently we have run into problems because there are duplicates in this key field and the file will not import. We can correct this problem by changing the key to a different field, but it is not feasible to re-establish all relationships and formulas based on the old key field. Is there any way to change the key field but keep all previous data and functionality?


  • 2.  RE: How Do I Set New Key and Keep All Links and Formulas Working Like Before?

    Posted 04-27-2017 20:06
    QuickBase will re-establish linkages for you, you don't need to worry about that. I'd make a copy first of your database and test there.

    Go to the field list of the table where you wish to change the Key Field.

    Check the field you wish to be the new key field and then click "set key". QuickBase will warn you that it will make extensive changes. Don't let that freak you out. Just click Okay.

    Quality check in your test database. I'm confident all will be well.


  • 3.  RE: How Do I Set New Key and Keep All Links and Formulas Working Like Before?

    Posted 04-27-2017 20:46
    Bennett,

    With Sync tables you cannot change the key field after setting it up ( I know its ridiculous that you can't).  You basically have to delete the connection, and re-create the sync.  Your relationships should still be there, but you will have to reconnect the data to the appropriate fields.

    If you have some scripts running you'll have to change the fids too.  

    Its nuts they haven't addressed this issue yet.  for this reason we usually build a script that copies the sync, to a normal QB table, prior to actually connecting it to the database.

    I've had to redo 2 different sync tables because the source data changed, its not fun


  • 4.  RE: How Do I Set New Key and Keep All Links and Formulas Working Like Before?

    Posted 04-28-2017 03:26
    I just had a follow-up thought.  Depending on how your data changed, you might be able to just flush all the records out, and start over with a big sync file, but your "key Field" in the csv file needs to be named the same.  It can have different data in it, but the column header just needs to be the same.