Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Start the Timer(time_worked) field when the state changes

poorva1
Giga Guru

Hi all,

 

I want to start the Time field field when the state changes to In progress and want to pause it when it changes to on hold.

How to achieve this? 

I have made glide.ui.timer.started  - false, to stop it from starting automatically. 

poorva1_0-1762486420299.png

 

Thanks,

Poorva

 

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @poorva1 

The purpose of this field is not to track the time between states — for that, you should use SLA and metrics, which provide that information.

This field is meant to show the total time a user spends on a form. So, it’s better to use it as intended rather than creating unnecessary technical debt, mate.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

poorva1
Giga Guru

Hi @Dr Atul G- LNG and @Brian Lancaster ,

Thanks for your inputs. 

We are looking to implement time card capability for the records and we need only the time when the agent actually starts working on the task (state changes to In progress and hence the requirement to start the timer on state change).

So that when the agent saves the record the time gets auto saved into their time sheets. 

 

Hi @poorva1 

 

If time sheet is the use case then it is not the right way to do. Imagine a agent works 20tickets in a days how you going to add that in time sheet.

 

https://youtu.be/UyrMksUtskk?si=lq_PWUCikjB_LTeD

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************