Clock Timer

  

Good day.


I am trying to create an application with a timer that starts when a button is clicked. Is there already and app in forge that works just like what I need or any suggestions how can I create this timer? I only saw the Countdown Clock in forge but it does not work as what I needed.

Thank you.

Hello, Gerardo.

If you need to associate the click of a button to the execution of a Timer, all you need to do is to invoke the Wake Timer action relative to the Timer you need to execute (for example, from a Screen Action). All Timer you create in an eSpace will have one of those actions that you can invoke whenever you need to trigger that timer execution. Then, just set the Destination of a Button widget to that Screen Action and you should achieve the behavior you described.

Best regards!

Rui Garcia wrote:

Hello, Gerardo.

If you need to associate the click of a button to the execution of a Timer, all you need to do is to invoke the Wake Timer action relative to the Timer you need to execute (for example, from a Screen Action). All Timer you create in an eSpace will have one of those actions that you can invoke whenever you need to trigger that timer execution. Then, just set the Destination of a Button widget to that Screen Action and you should achieve the behavior you described.

Best regards!


Thank you for your reply.

Is there already a widget for a timer? I can't see any, and I'm not familiar with the Wake Timer action. 

What I am trying to create is to display a Timer that looks like this (00:00:00) in my application and start it when a button is clicked.

Thank you.

Hi, Gerardo.

I'm sorry but I misunderstood your question. By mentioning the keyword Timer you lead me to believe that you were interesting in OutSystems language element used for scheduled execution that goes by the same name.

Unfortunately, there isn't a widget that fulfills your use case out-of-the-box. However, you can implement it through extensibility. You can search the web for a neat JavaScript solution and then incorporate that in a web block so it can be reused wherever you need it.

If you want, I can create an example so you can base your implementation on it. Just tell me the OutSystems Platform version you are using.

Best regards.

Rui Garcia wrote:

Hi, Gerardo.

I'm sorry but I misunderstood your question. By mentioning the keyword Timer you lead me to believe that you were interesting in OutSystems language element used for scheduled execution that goes by the same name.

Unfortunately, there isn't a widget that fulfills your use case out-of-the-box. However, you can implement it through extensibility. You can search the web for a neat JavaScript solution and then incorporate that in a web block so it can be reused wherever you need it.

If you want, I can create an example so you can base your implementation on it. Just tell me the OutSystems Platform version you are using.

Best regards.

Thank you Sir Rui.

Sorry I did not mention what I need to display earlier. I am currently using version 10.0.200.2. 



Solution

Hi, Gerardo.

Take a look at the attached eSpace (TimerExample.oml). That is an example that you can use as the base of your implementation. I hope it helps.

Best regards.

Solution

Thank you Sir Rui for the example. That's exactly what I need. I will study how it works so I can apply same logic to my app. Thanks again.