Keys the most unnerving thing ever

Vi_Tu
New Member

I keep trying to give AppSheet a try but OMG i just want to throw my computer out the window. And mind you not I have been doing development for 16 years using php and nodejs.

OK here is my dilemma. I am using a MySql database to hold my table.

Table 1: Equipment
Fields: id (auto increment) / name / model / serial_number / status

Table 2: Equipment_Service
Fields: id (auto increment) / equipment_id / description / service_comment / status

I added both in my appsheet and set up the tables. The system added _RowNumber to each table. I than related the two via the equipmnet_id.

When you try to create a new equipment the equipment_id shows as required and cant be set to blank. Also you can not unself the key option as you will get “key needs to be set”, i than set up the _RowNumber as key but that still did not work.

I than set up the formula to UniqueID() only to get the error “cannot use an app formula”

So what is the point of a key if you cant set it to be automatically unique???

0 5 206
  • UX
5 REPLIES 5

For your key column on your table , push uniqueid() expression into initial value, rather than AppFormula.

[_rowNumber] column is not recommended to use as Key/ID in general, even though AppSheet automatically select it as key, but we need to change arbitrary to other suitable column for key.

wow thank you so much. i have honestly searched for this all over google.

Just to add to @tsuji_koichi’s guidance, please use the AppSheet support page to search for AppSheet help artilces and sample apps. There are many helpful articles therein written specifically with AppSheet platform in mind.

https://www.appsheet.com/Support

Please search by keywords such as “key” in this case in the above link and you will get the relevant articles.

For example, the following artilce describes concepts on keys as applicable for AppSheet

Steve
Platinum 4
Platinum 4

The database and AppSheet table (primary) key columns should be the same. The database MUST NOT be assigning the key value; AppSheet MUST assign the key value.

See also:

My comment to you is “indeed” to avoid any problems betweem AppSheet and SQL.

Appsheet is the one to assigne the key value, not SQL to avoid any possible conflict.

Top Labels in this Space