How to add a field with Days:Hours:Minutes format

Sathwik1
Tera Expert

I need to add a field on a table..with format "Days:Hours:Minutes" it needs to fill as per the format...how to do it? can anyone suggest me

1 ACCEPTED SOLUTION

Hi,

updated below should work

function onLoad(){

var fieldName = 'u_downtime';
document.getElementById('ni.' + g_form.getTableName() + '.' + fieldName+ 'dur_sec').style.display = 'none';

}

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

11 REPLIES 11

Hi,

it worked for me

please share complete script

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Isolate script : False

Table : Problem

Type :On Load

function onLoad(){
var fieldName = 'u_downtime';
var id = 'ni.' + g_form.getTableName() + '.' + fieldName+ 'dur_sec';
document.getElementById('').style.display = 'none';
	//alert(id);
}

Hi,

updated below should work

function onLoad(){

var fieldName = 'u_downtime';
document.getElementById('ni.' + g_form.getTableName() + '.' + fieldName+ 'dur_sec').style.display = 'none';

}

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Wahh...perfect

@Ankur Bawiskar can you please suggest something to learn these basics, I will learn it

@Sathwik 

you need to have basic html, css idea

Then inspect the page and that element. get the html element id and then apply the style

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader