Track time in form

Hi,

I try to track time when form is open. When a user add data and when he update it. So the time spend as to be keep and increase each time. I try to use the column with NOW() in inital value and reset on edit and a other column with action when save the form. 

([end_task]-[NOW_resetonedit])+[_THISROW_BEFORE].[task_duration]

It's not working. Do you have any ideas or other solutions?

Thanks in advance

Simon

1 3 188
3 REPLIES 3

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Lange6 

I would suggest something different:

1) column [timestamp_creation] with initial value NOW(), not editable

2) column [timestamp_update] with initial value NOW(), type ChangeTimeStamp 😎

Aurelien_0-1700835510621.png

You can even focus on one specific column change:

Aurelien_1-1700835537233.png

3) column [duration], type Duration, with expression: [timestamp_update]-[timestamp_creation]

Let us know if that works for you! 

For reference:

Track changes using Change column types - AppSheet Help

 

Hi

thanks for the reply

with this method, the time does not accumulate. I would like the time to accumulate when the form is opened, not capture the time when the form is close than, capture the time when the form is editing. 

I try to have a NOW() value that reset every time you edit the form. With it, I can capture new uptade on open time with de new close time

([end_task]-[NOW_resetonedit])+[_THISROW_BEFORE].[task_duration]

Thanks for the help

Aurelien
Google Developer Expert
Google Developer Expert

@Lange6 wrote:

I would like the time to accumulate when the form is opened, not capture the time when the form is close than, capture the time when the form is editing. 


That's actually impossible.

The workaround I would suggest consists in initializing the record, use a detail view with quick edit option enabled on some columns,  and tracking when the user changes values. This is the only way to track user "real" interaction with the app. 

You could use the ChangeTimestamp suggested earlier to achieve your purpose with this method.

For reference: 

Quick edit columns - AppSheet Help

 

Top Labels in this Space