Lost Data

My data is stored in a Google spreadsheet. I set a "key" with a unique code that must be input by the user. I have made sure that this code is not the same for each user. When inputting data, the user must upload a file. The problem is, the data inputted by the user does not appear in the spreadsheet, but when I search for the uploaded file, the file is saved in the drive folder. This does not happen to all inputted data, but only to some random data. Please help.

Solved Solved
0 3 111
1 ACCEPTED SOLUTION

 

Hi there,

Iโ€™d recommend not using a user-entered value as the rowโ€™s key. Instead, set the key columnโ€™s Initial value to UNIQUEID() and make it non-editable. This ensures each record has a unique, stable ID that wonโ€™t accidentally get reused or modified.

You can still have the user enter a unique code (like an access code or ID), but itโ€™s better to store that in a separate columnโ€”not as the actual row key.

Also, just as a best practice (and how Google handles it too), itโ€™s not ideal to store files or images directly in the database. AppSheet is designed to store those files in Drive (or wherever your storage is), and only save the file link in the table. This keeps your app lighter and syncing faster.

That said, if files are uploading but the row isnโ€™t saving to the sheet, check if any fields in the form have conditional validations (Required_If, Valid_If) that might be blocking the saveโ€”sometimes the form wonโ€™t save the row if a required field isnโ€™t properly filled, even if the file uploads successfully.

View solution in original post

3 REPLIES 3

 

Hi there,

Iโ€™d recommend not using a user-entered value as the rowโ€™s key. Instead, set the key columnโ€™s Initial value to UNIQUEID() and make it non-editable. This ensures each record has a unique, stable ID that wonโ€™t accidentally get reused or modified.

You can still have the user enter a unique code (like an access code or ID), but itโ€™s better to store that in a separate columnโ€”not as the actual row key.

Also, just as a best practice (and how Google handles it too), itโ€™s not ideal to store files or images directly in the database. AppSheet is designed to store those files in Drive (or wherever your storage is), and only save the file link in the table. This keeps your app lighter and syncing faster.

That said, if files are uploading but the row isnโ€™t saving to the sheet, check if any fields in the form have conditional validations (Required_If, Valid_If) that might be blocking the saveโ€”sometimes the form wonโ€™t save the row if a required field isnโ€™t properly filled, even if the file uploads successfully.

yes, I stored the files on Drive. Thank you for your reply, I'll try the solution. 

Perfect. Also, consider that often, two users enter data almost simultaneously, and if the data is read in the same way by both, the synchronization speed will likely cause both to have the same numbering, since the data didn't impact the database at the exact moment you needed it to. The best solution is UNIQUEID() as the initial value. Furthermore, the number of possible combinations with an 8-digit UNIQUEID() is overwhelming. Look here in one of the comments: 16,796,163,257,856 records.

Regards.

Top Labels in this Space