Reputation:
Is there any configuration option available in Appmaker to Store Today's date as Default in a column record in Appmaker data source?
The current configuration directly provided an option to select date only, no option to write a script which can return me Today's date.
Upvotes: 3
Views: 901
Reputation: 6347
Unfortunately, App Maker doesn't provide such setting at this time, but there are at least two ways how you can do it:
CREATE TABLE foo (
`creation_time` DATETIME DEFAULT CURRENT_TIMESTAMP,
`modification_time` DATETIME ON UPDATE CURRENT_TIMESTAMP
)
onBeforeCreate
model eventrecord.CreatedOn = new Date();
Upvotes: 3