Hello, I’m creating a time stamping system, where users through their actions (buttons), stamp what time they finished a particular task. However, I’ve been having trouble with this since when I regenerate Appsheet, it always sets the initial value of timestamps to NOW(), which messes with my database (in-app database of appsheet), and I have to remove every single initial value of all the timestamp columns I have in the system, over and over.
I would like to avoid this behavior, so when I regenerate, the initial value stays blank.
I’m using the Appsheet database. This behavior is consistent, even when I’m not changing anything. I remove the initial value of NOW(), save, then it gets removed. I regenerate, even without changing anything, and then NOW() is once again in the initial value. It gets very frustating since it affects the database in appsheet too, and I have to manually remove those initial values all over again.
@iTazB I have not used AppSheet Databases much but I am not aware of an ability to set default values. If there is some way to specify a default on the Appsheet database side, then removing that should be enough.
We do not have this issue with sheets or other databases. We can remove the default insertion of NOW() when the table is first added to the app and future regenerations do NOT bring back the Initial Value formulas.
@thenamesclyde If there is still (could have changed) no way to specify a default on the AppSheet Database side, then I would contact AppSheet Support to make them aware of this issue. It is probably some flaw specific to AppSheet Databases.
AppSheet Database is full of bugs. I strongly recommend against it. Use Google Sheets instead. AppSheet was originally designed to use Google Sheets. AppSheet Database was added much later by Google by bolting an unrelated project on to AppSheet.
Is Required? enabled for those columns? If so, the AppSheet Database integration may be trying to “helpfully” ensure the columns get the required value. Make sure Required? is disabled or set it to an expression, and make sure the column in the database does not require a value (or allows a NULL value).
Since you want the values set by user interaction (buttons), consider disabling Show? for these columns. You could also set Editable? to the expression, FALSE, which prevents user editing but allows changes by the app itself (e.g., by actions/buttons). This would allow you to display the values without inadvertently giving the user the opportunity to edit them.
Ironically, what Taz said fixed the problem, irregeradless if they were an AI or not. I also contacted with Appsheet support yesterday, and got the exact same response. To anyone with a future problem like this, I’ll just copy paste what Taz said and Appsheet support said to me.
Taz
”Hey,
Hope you’re keeping well.
AppSheet automatically assigns NOW() as the initial value for new Timestamp columns during schema regeneration when it detects a datetime-type field without an explicit default defined in the source table. This behavior is documented in AppSheet column type defaults and occurs because the platform infers that a Timestamp should capture creation time unless overridden. To prevent this reset, define a blank default directly in your data source (for example, ensure the column has no default expression in Google Sheets or SQL) and then explicitly set the Initial Value in AppSheet to "” or remove it before saving. Once the column definition is saved, mark the schema as fixed by disabling “Regenerate structure automatically” in Data > Tables > Source Settings, which stops AppSheet from overwriting custom metadata on future regenerations.
Thanks and regards,
Taz”
Appsheet Support
”Thank you for contacting AppSheet Support.
We understand you want the Initial Value of the Datetime column to remain blank after you remove the NOW() expression. This issue appears only when using the AppSheet database.
This behavior occurs due to AppSheet’s internal logic for ensuring data completeness and synchronization, specifically when using the AppSheet database as the data source.
We would suggest you use an empty string (double quote) in the Initial Value property of the Datetime column Action: In the column definition for the Datetime column, set the Initial Value to "" (two double quotes).
This explicitly tells AppSheet to treat the field as a blank string during form creation, which will prevent the platform from automatically substituting a default value, even after regenerating the column structure. Please refer to the screenshot attached”
Maybe AppSheet Support is experimenting with auto-responding to community posts with an AI bot. It’s a good idea, but they should have someone qualified review the posts before they go live.