Creating Timer field

priyankapalaska
Giga Contributor

I want to create a timer field same as Time Worked on Task. but i could not find such variable name under type.

find_real_file.png

Help me to create a timer field. Thanks in Advance.

1 ACCEPTED SOLUTION

anurag92
Kilo Sage

Timer field is invisible in OOB configuration, i.e. no new fields can be created as a timer field. Check Field Classes (sys_glide_object) table to verify that.



But you can make it visible by running a Background script:



var gr = new GlideRecord("sys_glide_object");


gr.addQuery("name", "timer");


gr.query();


if (gr.next()) {


    gs.log("found");


gr.visible = true;


gr.update();


}


View solution in original post

8 REPLIES 8

priyankapalaska
Giga Contributor

how can i code it if i want to start/pause timer automatically depending upon state.?


any updates on this.  We need to do that same thing

Hi Aakash Shah,

 

Can you please help me on the post which I had made

https://community.servicenow.com/community?id=community_question&sys_id=aa6f9ebb1b23d810d2ccea89bd4bcbef