- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2020 11:47 AM
Hello,
I am trying to find the best way to hide seconds from a duration field that we have. I am using something from another community post I found earlier. I was advised by a member on my team to modify the attributes on the field. How can I do that through an attribute?
This is what I have to currently hide the seconds and it works, but there is a temporarily glimpse at the seconds field while the page is loading:
function onLoad() {
g_form.getElement('ni.pm_project.effortdur_sec').style.display='none';
}
Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2020 12:02 PM
Absolutely highly NOT recommended, for instance refer to the following official article:
https://hi.service-now.com/kb_view.do?sysparm_article=KB0692555
If I have answered your question, please mark my response as correct and helpful.
Thank you very much
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2020 12:17 PM
Exactly, use their suggestion only in case you really need it.
In my view, I would always push back this kind of requirement, but that's my personal view.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2020 06:37 AM
Did this solve your question? Or do we need to follow-up on this?
If I have answered your question, please mark my response as correct and helpful.
Thank you very much
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2020 07:15 AM
Sorry for the delay. I was on PTO. Yes it did solve my problem thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2020 12:13 PM
DOM manipulation will take time to load/work, so that is the temporarily glimpse you are experiencing.
Your script is one option out of two options provided here:
You can do this by two ways:
1. DOM manipulation
2. Changing the system property - Go to System Properties > System > Time Format and knocked off the :ss (seconds) and it will remove the SS part from your field but it will affect all fields of Time format within the system as this is Global change.
DOM manipulation is not recommended. Consider how important the requirement is and if it is needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2020 12:17 PM