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! Go to 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.
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.
User | Count |
---|---|
18 | |
10 | |
8 | |
5 | |
5 |