This UNIQUE KEY is killing me

This should be easy based on the articles out there but I’m running into problems. I’ve purposely added a column in my Google Spreadsheets called RECORDID so I may assign it =UNIQUEID() in the Column editor in the initial value; however, I’m getting all kinds of errors and I can’t figure out why.

It says.
The key column ‘RECORDID’ of table ‘ACTIVITY DATA’ is not a legal key because it contains a Formula. - I’ve removed all formulations and the whole column is blank in google sheets. Do you think RECORDID is included in as part of a named range in my google sheets this is causing the error? Could it be if somewhere on my sheet references the RECORDID this would cause the problem? Again, there is no formulation in the column.

This has prompted the editor to choose RowNUM as my default key which I’m trying to avoid.

I just want to move pass this issue :D.

1 8 1,152
8 REPLIES 8

Steve
Platinum 4
Platinum 4

Just want to confirm Steve’s idea above - if you’ve connected a spreadsheet that has formulas, they’ll remain in your column definitions (what Steve highlighted) even after you remove the formula from the sheet - you’ll need to delete them in the app def as well.

@Peter Thanks guys! Worked. My previous formulation was in there and I removed it thanks to that screen shot by Steve. All of the errors went away except that my data no longer shows in the app when I set the RECORDID as the key. However, if I switch the RowNum and RECORDID as the key my data shows. Is it okay to have TWO unique keys then in a table?
Thanks
Tony!

You need to put some value in the RECORDID column in the source table. Data without key will not be shown in AppSheet.

Okay will try that! Any parameters on what the values could be? UNIQUEID is a combination of random letters and numbers of up to how many characters?

How many rows you have in the data? if it is not many, you can just put like ID1, ID2, ID3, etc. As long as they are unique / no duplicate key.

For the next row New record data, with the Initial value UNIQUEID() already set-up, Appsheet will fill in the text key.

For reference:

Top Labels in this Space