_RowNumber keeps resetting to be the primary ...

_RowNumber keeps resetting to be the primary key.

I have a field using UniqueID() … what am i missing, what does it default back to row number when i save?

thanks! matt

0 13 1,155
13 REPLIES 13

Google Sheets is source of data.

I did move the key field over, but regenerated.

AppSheet will accept other fields as key field, just not the one i need.

@Matthew_Brown Are there any warnings in info / Errors?

Wait! So it’s fixed now?

Steve - yes, it is fixed.

I thought I updated this thread earlier saying I figured it out.

Looking back, it did not save. I was wondering why you were so helpful post mortem !

Apologies…here is what happened and how it was fixed:

  1. Used excel function to generate unique id’s within excel google doc 2) the app pulled that formula in from google docs, and popped in in the spreadsheet formula box (behind the field i wanted to be the key) 3) I set it to key, and clicked save, but it kept putting it back to _RowNumber 4) I deleted the formula from SpreadSheet formula box and hit save - still didn’t work 5) went back to google docs, copied and pasted the unique values using “value only” to the correct field 6) went back to app, deleted the formula again (it kept pulling it in), set to key, set the initial value to UniqueID() so new records added from the app are unique, and clicked save 7) it worked then…

bottom line - SpreadSheet formula and Key would not coexist…

again, sorry for the run around, thought I had updated it.

@Matthew_Brown Great to hear it’s fixed! Well done!

No - It just automatically set it back to _RowNumber

@Matthew_Brown When you say the column is using uniqueid(), how exactly is it using it? Is it in a formula? In the App formula? In the Initial value? Somewhere else?

Initial value. Hidden.

The underlying Google doc had a formula in it that generated a random key.

I wanted app sheet to handle this, not the Google doc.

The formula got in the dark because I had to generate initial values for some of the data I was converting over.

@Matthew_Brown “the formula got in the dark”?

Uh! Speech to text with southern accent. The formula was in the app bc I placed it in the google doc (not dark) to generate the initial unique values.

@Matthew_Brown If you edit the KEY column configuration, is there anything in the Spreadsheet formula box?

No, nothing there anymore.

Deleted and it worked.

But it wouldn’t accept the field as a unique key when it had the spreadsheet formula box populated.

@Matthew_Brown What is the KEY column type?

Top Labels in this Space