Write, Bureaucrats, Administrators
4,332
edits
mNo edit summary |
mNo edit summary |
||
Line 199: | Line 199: | ||
# We set the value of the field Mileage from the previous record as the default value for the field StartMileage. | # We set the value of the field Mileage from the previous record as the default value for the field StartMileage. | ||
===== | ===== Beginning the next day ===== | ||
If you want the date/time field when creating a record, set the beginning of the next day, it can make the following script. For the script, you must connect the JavaScript-library moment.js [http://momentjs.com/ moment.js] | |||
<source lang="javascript" line> | <source lang="javascript" line> | ||
var m = moment().add(1,'d') | var m = moment().add(1,'d') | ||
Line 207: | Line 207: | ||
entryDefault().set("Date" , m.toDate().getTime()) | entryDefault().set("Date" , m.toDate().getTime()) | ||
</source> | </source> | ||
# | |||
# | # With the moment () function library moment.js obtain the current time and add 1 day. | ||
# | # Set time of 8 hours and 0 minutes. | ||
# Write a default value for the field Date. | |||
The script must be set for action Creating a record and phase Opening a form. | |||
==Работа с файлами== | ==Работа с файлами== |