That happens if you are in the Find mode. I’ve not seen it in the Browse mode.
You can see it happen by going into the Find mode and using "command-;” (semi-colon) to enter the current time. It looks fine until you click out of the field. Then it adds the extra tenths of a second to the find criteria.
That's exactly what I was thinking earlier, when I mentioned "mode." I WILL check again, but this occurs in browse mode (the routine creates a new log entry record and populates the duration of an action).
I can think of no circumstances under which the following subroutine would not work.
It does go to the proper layout, create a new record and populate the Duration_tm field with a value, just not a valid time.
Go to Layout [ “ACTIONLOG” (ACTIONLOG) ]
Enter Browse Mode
Set Field [ ACTIONLOG::Duration_tm; get(CurrentTime)
Go to Layout [ original layout ]
I've even tried bizarre coersion, such as:
Set Variable [ $logtime; Value: get(CurrentTime) ]
Set Field [ ACTIONLOG::Duration_tm; Time( Int( hour( $logtime ) ); Int( Minute( $logtime ) ); Int( Seconds( $logtime ) ) )
Why don’t you have the field auto-enter a time upon creation?
Malcolm: Yes, that would make sense if I wanted the creation time in that field. There actually is another field in that table that auto-enters the creation timestamp. What really goes in the Duration_tm field is the result of a calculation comparing two times and finding the difference. The example above uses a simpler formula, get(CurrentTime), to illustrate that even then, the incorrect value populates in the time field -- just to prove (at leat to myself) that it is not a matter of a bad calculation. Thx.