Calculated Time Not Showing on Phone but Shows Up in App Preview

​Hello,
I have an app which displays the time spent in filling a form as soon as
you enter the very last data on the same form.

When I enter data using App Preview, it works fine as per the attached
image but when I fill the form on Android Mobile phone it is not able to
compute the time difference.

Please, any idea why this is so?

Yaw

Calculated Time Not Showing on Phone.pdf (261 KB)

Yaw,

Is it possible that that form was simply completed in under one minute?

Cheers,
Will

··· On Sun, Jul 30, 2017 at 7:56 AM, YAW ANTWI-ADJEI wrote:

​Hello,
I have an app which displays the time spent in filling a form as soon as
you enter the very last data on the same form.

When I enter data using App Preview, it works fine as per the attached
image but when I fill the form on Android Mobile phone it is not able to
compute the time difference.

Please, any idea why this is so?

Yaw

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Will,
No. I intentionally delayed the filling of the form such that it will give
me something more than 3 minutes.

In fact, I did it more than once and in all cases this was the result.

··· On 31 July 2017 at 12:50, William Pride wrote:

Yaw,

Is it possible that that form was simply completed in under one minute?

Cheers,
Will

On Sun, Jul 30, 2017 at 7:56 AM, YAW ANTWI-ADJEI yawantwiadjei@gmail.com wrote:

​Hello,
I have an app which displays the time spent in filling a form as soon as
you enter the very last data on the same form.

When I enter data using App Preview, it works fine as per the attached
image but when I fill the form on Android Mobile phone it is not able to
compute the time difference.

Please, any idea why this is so?

Yaw

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I see. Could you post the calculations for these various hidden values
(timeIn, timeOut, totalTime, endTime)?

Thanks,
Will

··· On Mon, Jul 31, 2017 at 8:56 AM, YAW ANTWI-ADJEI wrote:

Hi Will,
No. I intentionally delayed the filling of the form such that it will give
me something more than 3 minutes.

In fact, I did it more than once and in all cases this was the result.

On 31 July 2017 at 12:50, William Pride wpride@dimagi.com wrote:

Yaw,

Is it possible that that form was simply completed in under one minute?

Cheers,
Will

On Sun, Jul 30, 2017 at 7:56 AM, YAW ANTWI-ADJEI <yawantwiadjei@gmail.com wrote:

​Hello,
I have an app which displays the time spent in filling a form as soon as
you enter the very last data on the same form.

When I enter data using App Preview, it works fine as per the attached
image but when I fill the form on Android Mobile phone it is not able to
compute the time difference.

Please, any idea why this is so?

Yaw

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi,
Please see attached.
I actually used StartTime, EndTime, TotalTime and DurationMinutes for the
computations.

1.* StartTime*: This is a Hidden Value with Default Value field set to:
double(now())

2.* EndTime*: This is a Hidden Value with Calculate Condition field set to:
double(now())

3.* TotalTime*: This is a Hidden Value with Calculate Condition set to:
EndTime - StartTime

4.* DurationMinutes*: This is a Hidden Value with Calculate Condition set
to: int(((#form/TotalTtime * 24) - int(#form/TotalTtime * 24)) * 60)

My TimeIn and TimeOut were only used to display time. They are all Hidden
Values.
TimeIn has Default Value set as: format-date(now(), '%H:%M') whilst TimeOut
has the Calculate Condition set as: format-date(now(), '%H:%M')

Yaw

Screenshots for Calculated Time.pdf (511 KB)

··· On 31 July 2017 at 12:59, William Pride wrote:

I see. Could you post the calculations for these various hidden values
(timeIn, timeOut, totalTime, endTime)?

Thanks,
Will

On Mon, Jul 31, 2017 at 8:56 AM, YAW ANTWI-ADJEI yawantwiadjei@gmail.com wrote:

Hi Will,
No. I intentionally delayed the filling of the form such that it will
give me something more than 3 minutes.

In fact, I did it more than once and in all cases this was the result.

On 31 July 2017 at 12:50, William Pride wpride@dimagi.com wrote:

Yaw,

Is it possible that that form was simply completed in under one minute?

Cheers,
Will

On Sun, Jul 30, 2017 at 7:56 AM, YAW ANTWI-ADJEI < yawantwiadjei@gmail.com> wrote:

​Hello,
I have an app which displays the time spent in filling a form as soon
as you enter the very last data on the same form.

When I enter data using App Preview, it works fine as per the attached
image but when I fill the form on Android Mobile phone it is not able to
compute the time difference.

Please, any idea why this is so?

Yaw

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Yaw,

Interesting, your form configuration looks good - could you please report a
bug https://confluence.dimagi.com/display/commcarepublic/Bug+Reports so
that our team can take a closer look?

Thanks,
Will

··· On Mon, Jul 31, 2017 at 9:29 AM, YAW ANTWI-ADJEI wrote:

Hi,
Please see attached.
I actually used StartTime, EndTime, TotalTime and DurationMinutes for the
computations.

1.* StartTime*: This is a Hidden Value with Default Value field set to:
double(now())

2.* EndTime*: This is a Hidden Value with Calculate Condition field set
to: double(now())

3.* TotalTime*: This is a Hidden Value with Calculate Condition set to:
EndTime - StartTime

4.* DurationMinutes*: This is a Hidden Value with Calculate Condition set
to: int(((#form/TotalTtime * 24) - int(#form/TotalTtime * 24)) * 60)

My TimeIn and TimeOut were only used to display time. They are all Hidden
Values.
TimeIn has Default Value set as: format-date(now(), '%H:%M') whilst
TimeOut has the Calculate Condition set as: format-date(now(), '%H:%M')

Yaw

On 31 July 2017 at 12:59, William Pride wpride@dimagi.com wrote:

I see. Could you post the calculations for these various hidden values
(timeIn, timeOut, totalTime, endTime)?

Thanks,
Will

On Mon, Jul 31, 2017 at 8:56 AM, YAW ANTWI-ADJEI <yawantwiadjei@gmail.com wrote:

Hi Will,
No. I intentionally delayed the filling of the form such that it will
give me something more than 3 minutes.

In fact, I did it more than once and in all cases this was the result.

On 31 July 2017 at 12:50, William Pride wpride@dimagi.com wrote:

Yaw,

Is it possible that that form was simply completed in under one minute?

Cheers,
Will

On Sun, Jul 30, 2017 at 7:56 AM, YAW ANTWI-ADJEI < yawantwiadjei@gmail.com> wrote:

​Hello,
I have an app which displays the time spent in filling a form as soon
as you enter the very last data on the same form.

When I enter data using App Preview, it works fine as per the attached
image but when I fill the form on Android Mobile phone it is not able to
compute the time difference.

Please, any idea why this is so?

Yaw

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.