Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Can you create a field that produces a date/time stamp when a separate field is entered

Avatar

Level 4
 
1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@ReluctantProgrammer yes via script you can. On the exit of the other field just fire the js to set the value of date time field to set to current date/time

 

today = Num2Date(Date(), "MM/DD/YYYY") //returns date in MM/DD/YYYY format

other_field.rawValue = today // populate my_date_field with todays date

.

View solution in original post

6 Replies

Avatar

Correct answer by
Employee Advisor

@ReluctantProgrammer yes via script you can. On the exit of the other field just fire the js to set the value of date time field to set to current date/time

 

today = Num2Date(Date(), "MM/DD/YYYY") //returns date in MM/DD/YYYY format

other_field.rawValue = today // populate my_date_field with todays date

.

Avatar

Level 4

basically creation of a "date/time stamp" to show when the user actually entered remarks in a field.  

Avatar

Level 10

Then the code mentioned above will do the trick.

In case you don't want to overwrite the date once it has been set, wrap it into an if statement. Keep in mind the code is in FormCalc not JavaScript!

if (other_field.isNull) then
    other_field = Num2Date(Date(), "MM/DD/YYYY")
endif