A key problem

Greetings, aesthetically pleasant fellow of the homo sapiens-sapiens evolutionary branch,
i am presently in a kerfuffle with keys:
I have a sheet and i made an application using that appsheet tool. The system is asking a key column from me, i hereby propose the number of the row column wich the system seem not too keen to accept because it can be misplaced oif whatever.
Thus i propose my barcode column wich, being a coded line concatenating brand - color ID - model, is indeed unique. But i am refused to use it on the pretext that a column containing an algorithm isnโ€™t eligible.
Also tryed with uniqueID() but it is also refused.

What can i do?

Solved Solved
0 2 185
1 ACCEPTED SOLUTION

If you ever find yourself in such a position, here is what i came up with after some researches:

Rule N 1: You cannot setup a column with a spreadsheet formula as a key column.
Rule n 2: You cannot setup a column with a app formula as a key column

So just respect the rules and put your formula (whatever it is) in the Column -> Edit -> Auto Compute -> Initial Value field.
The initial value of your column is now the formula you wanted, and the system accept it.

View solution in original post

2 REPLIES 2

If you ever find yourself in such a position, here is what i came up with after some researches:

Rule N 1: You cannot setup a column with a spreadsheet formula as a key column.
Rule n 2: You cannot setup a column with a app formula as a key column

So just respect the rules and put your formula (whatever it is) in the Column -> Edit -> Auto Compute -> Initial Value field.
The initial value of your column is now the formula you wanted, and the system accept it.

The reason being AppSheet wants to be sure the key value is static. A spreadsheet formula will be recalculated at least every time the app is synced. An app formula in a virtual column is recalculated at every sync. An app formula in a normal column is recalculated every time the row is modified. Any time a column value is recalculated, it could change. Keys arenโ€™t allowed to change.

Top Labels in this Space