35
Views
5
Comments
Solved
Implementing Punch In/Punch Out Time Display in OutSystems
Question
Application Type
Reactive

"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?" 


Screenshot 2023-12-11 230132.png
2024-05-08 06-29-37
Prince Aadil Khan Panwar
Solution

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

UserImage.jpg
Prem Ganwani

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

Screenshot 2023-12-12 123645.png
HumanResourceManagementSystem.oml
2024-05-08 06-29-37
Prince Aadil Khan Panwar
Solution

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.. 


UserImage.jpg
Prem Ganwani

"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!"

2024-05-08 06-29-37
Prince Aadil Khan Panwar

thanks to you for appreciating my efforts. 

2024-05-08 06-29-37
Prince Aadil Khan Panwar
Solution

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.. 


2024-05-08 06-29-37
Prince Aadil Khan Panwar
Solution

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

UserImage.jpg
Prem Ganwani

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

Screenshot 2023-12-12 123645.png
HumanResourceManagementSystem.oml
2024-05-08 06-29-37
Prince Aadil Khan Panwar
Solution

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.. 


UserImage.jpg
Prem Ganwani

"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!"

2024-05-08 06-29-37
Prince Aadil Khan Panwar

thanks to you for appreciating my efforts. 

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