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

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();


}


Thank you Anurag.  


Hi Anurag,

              Thank you for helping me out, I don't know why such beautiful feature is kept hidden in SNOW.

Thanking You

Rachit

 

Ritu11
Tera Contributor

I tried to use same field type on custom table.When I am loading page timer is getting reset to 00:00:00 but not showing the actual time.How to achieve this? Any updates will be helpful.