Actually, your check box can be a button that runs a script that both sets the time in the time field and also sets the needed value in the check box field, but I can think of a simpler method:
Define your start time field to have this auto-enter calculation:
If ( Filtervalues ( checkboxField ; "Start" ) = "start" ; Get ( currentTime ) ; self )
This assumes one field with the checkbox values Start and Stop. If you used two separate fields with single value check boxes, the expression is even simpler:
If ( StartCheckboxfield = "start" ; Get ( CurrentTime ) )
I can get the simpler way to work but not the one with the 2 value in the one field. Not sure what I'm doing wrong.
Found the problem. FilterValues is one of the functions that appends a return on the end of the value returned. Also, if you clear the do not replace existing values check box, this won't work. Leave that value selected.(When you click "stop" this field will also record the current time yet again if the do not replace option is cleared.)
Use this calculation:
If ( Filtervalues ( checkboxField ; "Start" ) = "start¶" ; Get ( currentTime ) ; self )
or you can use:
If ( Not IsEmpty ( FilterValues ( CheckboxField ; "start" ) ) ; Get ( CurrentTimeStamp ) ; self )
I thought the paragraph thing might have something to do with it and I tried to do a separate calculation field with
Substitute ( checkboxfield; "¶" ; " " ) and it didn't work but was probably the "do not relpace existing values" box unchecked. The new calc worked like a charm.
Thanks so much!
Substitute ( Filtervalues ( checkboxField ; "Start" ); "¶" ; "" ) = "start"
would have worked.