Hi!
I’m trying to calculate the duration of my yoga sessions. I have four columns for this operation:
- Yoga Start of Enum type with just one value: Start
-Yoga Stop of Enum type with just one value: Stop
-
Virtual time column Yogasana IN with the calculated value: IF([YOGASANA START]=“START”, TIMENOW(), 00:00:00)
-
Virtual time column Yogasana OUT with the calculated value: IF([YOGASANA STOP]=“STOP”, TIMENOW(), 00:00:00)
-
Duration column Yogasana DURATION with calculated value: IF(ISBLANK([YOGASANA OUT]), “000:00:00”, [YOGASANA OUT]-[YOGASANA IN])
The idea is that when I press the START button in the Form view, Yogasana IN is populated with the current time and so is the Yogasana OUT when the STOP button is activated. Upon this, in the field of Yogasana DURATION, there is a difference (OUT-IN) i.e. the duration of the session.
The problem is the following: when the START button is activated, I indeed get the current time (in the field Yogasana IN) but when the STOP button is activated I also get the current time ( in the field Yogasana OUT) but the time in the Yogasana IN get changed as well (although Yogasana IN and Yogasana OUT are not linked with any formula) resulting in the duration of 00:00:00.
What is going on?
Any help or clarification is much appreciated!
PS
OK, I just realized that the formula in Yogasana Duration is causing this, but why I don’t know. When the formula is deleted, the activation of the STOP button doesn’t change the time in the Yogasana IN field but only in the Yogasana OUT field as planned. However, I now have a problem how to calculate the difference between OUT and IN.