Troubles with logic on Countdown Timer component

I’m brand new to Adalo, but I see some promise in the platform. Since I’ve found myself 70-80% of the way complete with building an MVP on other platforms before hitting a major product limitation that forced me to lick my wounds and rebuild elsewhere again, I decided to start here with an item I could not get working properly on another platform: a simple countdown timer for workouts.

I followed the video (Adalo Mini-App series: CountDown Timer Pause and Continue - YouTube) and comment threads offered up by @Victor several times, but keep getting stuck. I’ve tried to build this timer with and without the added complexity of additional “sometimes visible” status windows.

At this point I’ve been able to get the timer to start running, but my efforts to try and get it formatted in minutes have failed, and there seems to be no rhyme or reason to the amount of time that starts counting down in the timer. Random numbers seem to drop in each time I try to start the timer. I’m sure I’m just missing something here.

It’s likely that part of my problem is a failure to set the default value indicated in his video at around 6:20. This is just my ignorance showing, I’m sure, but I have a simple 2-page app (login page and a test page w/timer), and am not sure where he’s navigating to and what that part of the video is referencing.

Anyhow, here are screenshots of what I’ve set up thus far. Any help you all can offer is much appreciated. Thanks!!





Hello @Ditabo,

It seems you haven’t fully followed the video :slight_smile: Just checked the functionality in my example app - all is working just fine.

What I can see immediately: you are asking a user to input time in minutes (TimerInputField).
But then you are copying this value to Logged-in User → AUXCountDownSeconds. In my video all calculations are done in seconds - so this is your first mistake: you need to multiply TimerInputField by 60 to get value in seconds.

Also: the solution will not work without visibility settings. When user gets on the screen (by the way, don’t forget to initialise values before that, I showed that in the video), the timer component (a) is visible and number of seconds is set to 0.

When user enters the number of seconds and presses “Start”, the whole screen is reloaded (it is not visible to a user, but this is the way how Adalo works). During this, timer re-reads the value from
AUXCountDownSeconds and starts working.

In order to pause it, the only possible way is to hide this timer from the screen. That is the reason boolean property exists. Then, when you “unpause” the timer, it re-reads AUXCountDownSeconds property again (and you should have put correct value there, calculated with formula), and starts working again. Now it counts down from the remaining number of seconds.

Hope this helps. By the way you’ve chosen to implement pretty advanced functionality as a new user :slight_smile:

Best regards, Victor.

Many thanks for your reply Victor. I had no doubt that I was doing something wrong, and will go through everything again.

I was aware that there was the discrepancy between seconds and minutes, and I was going to revisit that once I got the timer actually functioning. I had every intention going back and adding the formula to utilize the multiplication by 60 that you recommended to another commenter on your video once I got everything running. This is why I had “minutes” in the names of some of these items, not seconds.

Understanding what’s going on behind the scenes with the reload of the screen definitely helps. Thanks for that.

I know that “initializing values” was missing for me, which is why I reached out for support here. I watched the section on initializing values multiple times in your video, but I don’t know where you’re going in the app to do this. It looks like you’re clicking on a different page that I simply don’t have in my app.

I understand that I’m implementing some more advanced functionality out of the gate, but there’s rhyme to my reason here.

I KNOW Adalo will work for me from an aesthetics and layout standpoint. That should be relatively easy for me to set up at this point, so I feel I need to do what I can to avoid building an app 70 or 80% of the way there on a platform (again) only to find out that I have to scrap everything because the platform is not capable of doing what I needed to do.

Thanks again for your patience and explanations.

Hi @Ditabo,

About values initialisation: you need to do it before you get to the timer screen. E.g. your timer is located on the screen called “Page”. You have some button / icon, which leads to this screen from another one (e.g. Home). Before a “Link” action on that button, put “update Logged-in User” action with all init values.

Best,
Victor.

1 Like

Ah, okay. That makes sense. So the initialized value settings you’re talking about would be applied to the button on the previous page?

I guess I just missed that needing to be a prerequisite, as it was mentioned near the very end of the video. Thank you for clarifying.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.