Using an update-only table, using form, error on save "key field is required"

I'm using an update-only table, where the user selects the record to be updated. When I attempt to save, a "key value is required" error message is returned. 

Other values I can LOOKUP when the record is selected. I can't add a LOOKUP formula to a key field. Setting an initial value doesn't help either. 

How do I grab the required key field when the record is selected, whilst keeping it hidden from the user? 

0 12 239
12 REPLIES 12

Welcome to the community!

Please read this:  What is a Key? | AppSheet Help Center 

Perhaps a screen shot will better explain. I'm attempting to update a record. The record is selected by name, via a dropdown

I think my problem lies with the Initial Value (of the Key), but as step one is selecting the record, there is no "initial value". Thoughts? 

tomdengle_1-1651005418130.png

 

 

There's no such thing as an "update-only table" in which rows don't already have key column values. I suspect you have described your setup inaccurately.

The only changes allowed are updates:

tomdengle_1-1651006910894.png

Every row does have a unique Key established.

tomdengle_2-1651007060959.png

When I attempt to save, I get the error. 

How does the user get to the form view?

The preview currently starts at the "blank" form. From there, they select a record, add some information, then save it - that's where the error occurs. 

 

tomdengle_1-1651066540622.png

 

Yeah, that's not going to work. They need to select an existing record first, then open that in a form to edit it.

You cannot put the user in a blank form, allow them to enter data, and use that entered data to load and edit an existing row in that same form. AppSheet just doesn't work that way..

 

The first thing the user does within the form is select the record. They are not "entering data" until they've selected a record to update. 

I believe the issue is: when they select the record, the ID is not associated with the selection. I can lookup other data; I cannot lookup the key. 

I tried making the name the key record,  but it Erred at sync.

Maybe they are not going to a detail view of the record you want to edit


@tomdengle wrote:

The first thing the user does within the form is select the record. They are not "entering data" until they've selected a record to update. 


Not going to work, period, full stop. You're doing it wrong.

Please show all the configurations of your ID column. Thanks.

 

I switched the Account Name to Key, but it Erred at sync. The ID def: 

tomdengle_5-1651053630879.pngtomdengle_6-1651053644743.pngtomdengle_7-1651053657521.pngtomdengle_8-1651053671226.png

 

 

 

 

 

 

 

 

 

 

 

 

 

Top Labels in this Space