Create a Time Counter

Hi.

I need to create a time counter that goes down and when the time runs out I block the action that the user is performing. Example: 30h:00m - 29h:59m and so on.


Any suggestion?

Thank you.

mvp_badge
MVP

Hi Sara,


You can do this very easily with JavaScript on the OnReady event, to trigger a client action after X amount of seconds. Then on the client action you do your logic.

Take a look at the demo in attachment, where I change the value of a variable to False to disable a button.


Kind Regards,
João

ReactiveSandboxTestButtonDisabledAfterTimer.oml

This is cool. Thank you.

But what I need is something like a clock that shows the countdown.

I did this..


Hi Sara,

As per your requirement. I have created a sample oml and also Url is attached below

for more reference https://stackoverflow.com/questions/20618355/how-to-write-a-countdown-timer-in-javascript

https://ellakkiya-selvadurai23.outsystemscloud.com/Reactivetestapp_Ellak/RunTimer?_ts=637593868929586579

Hope it helps!

Regards,

Ellakkiya.S

ReactivetestappEllak.oml

Hi @sara silva,

Try some forge components , mention in attached image. if this is not work then create a new action for reduce time. For that you have to go through in detail about countdown timer logic 

Timer.JPG

mvp_badge
MVP

Hi Sara,

You can try this forge component, I think this is what you need

https://www.outsystems.com/forge/component-overview/8093/timer-countdown-reactive

Thank you for the help!!

Hi Sara, This might help you...

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Timers/Create_and_Run_Timers

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.