AppBuilder 5+ Question about interval timing

I have a VivoActive HR and I'd like my SUP application to show time working and time resting.  I see the examples for each formula, but how does it work?

I've put the following formula in the profile 4 for other and set the configuration for auto.  The right label appears, but there are two problems.  Nothing shows in the data and when I pause the SUP app the screen switches to save data screen so I cant see my rest time.

elapsedtime - max(elapsedtime); timer - max(if (prev(timer) eq null, timer, null)) plus 1

Do I need to put in conditional statements for the two cases?  Or is this just not possible with this app?

Thanks,

Eric

  • I don't have a VAHR, but with most Garmins, if you press Back when the app is paused, it returns to the data screens. Hopefully VAHR works the same way.

    You do need to use a conditional statement, as "X ; Y" will always display "Y". The semicolon operator is really only useful if the part on the left has "side-effects" (like recording, alerts or setting a variable).

    Try:

    if (elapsedtime - max(elapsedtime) gt 0, elapsedtime - max(elapsedtime), timer - max(if (prev(timer) eq null, timer, null)) plus 1)

    As noted in the examples page, all of this stuff works because functions like max() and prev() only consider data when the timer is running.