Capture duration of user spending time on form

Hi,

I’m creating a field survey with about 15-20 set of questions (data points). What I’m trying to achieve here is to record the time duration a field survey data collector (app user) would typically take to capture all data points. What I could think is to capture the start time (when the add button is pressed/form is loaded) and capture the time when form is submitted - and find the time difference between two.

How do I accomplish this on appsheet?

So far what I have tried is - created 3 columns in the Google Sheet, formStart, formEnd, and formDuration.

In the form design, formStart is DateTime with Now() - and I get the form opened time. I still can’t figure a way how to get formEnd.

@Ye_Myat_Aung
[formStart] column shall be a Datetime type and the inital value set to NOW()
[formEnd] column shall be a Datetime type columns with initial value set as blank
[formDuration] column shall be a Duration type column with initial value and AppFormula set as blank

Add an action to this form’s table with Data: set the values of some columns in this table, select [formEnd] column and set the value as NOW(), select the [formDuration] column and set the value as

[formEnd] - [formStart]

Lastly, select this action from the Form Saved property of your form

1 Like

@LeventK

When I try to set [formDuration] value to [formEnd] - [formStart] in the action, I get the following error:

Date arithmetic expression ([formEnd]-[formStart]) has an invalid operator

@Ye_Myat_Aung
Try with this:

([formEnd] - "00:00:00") - ([formStart] - "00:00:00")

@LeventK
So I have two actions:

First one is: recordFormDuration where I set column values of formEnd and formDuration

Second one is: I copy the system action “Add”, and change Do This to “Grouped: Execute a sequence of actions” and selected recordFormDuration in the Action list.

However, the entry for formEnd is still blank and therefore, formDuration is 00:00:00 in my Google Sheet.

Did I miss something here?

@Ye_Myat_Aung
You don’t need a sequence of actions here…Only your recordFormDuration action will be enough. May I ask why do you need the system Add action?

1 Like

Hi @LeventK

You have made my day :slight_smile:

I wish the rest of your day to be awesome!

ps. on the question why I was messing with system Add is because I couldn’t find where Form Saved was before ha ha!

Glad you figured it out @Ye_Myat_Aung, happy to be helped of. I wish you an awesome day too, thanks.

1 Like