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.
Solved! Go to Solution.
@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
@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
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?
Hi @LeventK
You have made my day
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.
User | Count |
---|---|
16 | |
10 | |
8 | |
5 | |
5 |