- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2020 11:38 PM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 01:25 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 01:00 AM
Hi,
it worked for me
please share complete script
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 01:04 AM
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);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 01:25 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 02:42 AM
Wahh...perfect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2020 05:04 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader