"I'm looking to implement a time display functionality in OutSystems. I want to start displaying the time on the screen when a user clicks on 'Punch In' and pause the display when they click on 'Punch Out'. I'm thinking of using timers and variables, but I'm not sure about the specifics of how to implement this. Can anyone provide guidance or a sample implementation for achieving this in OutSystems?"
Hi Prem
As I understood your scenario you want to start the time on the click or punch in and stop the time when you click on punch out. For that I would like to suggest you to use this forge component and use it's functionality.
Link -https://www.outsystems.com/forge/component-overview/13395/js-stopwatch
Or take help from this example, use the js and css to implement into your application
https://www.geeksforgeeks.org/how-to-create-stopwatch-using-html-css-and-javascript/amp/
Hope this helps
Thanks
Prince
Hey
Prince Aadil Khan Panwar,
Thanks a lot for your suggestions regarding the time tracking implementation. I integrated the Forge component into my project as you recommended and made some customizations. However, I've encountered an issue when attempting to start the stopwatch.
Upon clicking the punch-in button, an error pops up stating that "start is not defined," despite having defined that function in the scripts. I've double-checked the function name, its scope, and ensured the script containing the "start" function is properly loaded before its call.
I'm attaching the relevant code snippets for your reference. I was wondering if you could provide some insight or guidance on resolving this issue? Your help would be greatly appreciated!
Thank you,
Prem
you forgot to add the script to your screen this way
check its working
sample
please mark my reply as solution if you find it appropriate..
"Hey, wanted to drop a note to say a big thank you for your assistance! The solution is up and running smoothly now . Much appreciated!"
thanks to you for appreciating my efforts.