- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2022 09:39 AM
I want to further customize the duration field in the Service Center "Portal" as well as the NOW Platform back-end field.
Out of the box, the duration variable and field type has four columns, Day, Hours, Minutes and Seconds.
I discovered how to remove the Days column in this article: "Duration Field Display" using the max_unit=hours attribute.
https://community.servicenow.com/community?id=community_question&sys_id=a92ee7eddb57abc02e8c2183ca96...
Looks good so far. Here's what I got so far.
Business owner wants me to remove minute and seconds. The article doesn't explain how to remove those columns.
This article explains how to set max_unit, but doesn't explain how to remove the preceding columns.
How do I configure the duration field variable to only show Hours?
Variable:
Field Dictionary:
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2022 10:18 AM
Hi
Found something in the post, but this is not really a good idea, since it will require DOM manipulation which is not recommended. you can only set max_unit and not minimum unit.
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2022 10:18 AM
Hi
Found something in the post, but this is not really a good idea, since it will require DOM manipulation which is not recommended. you can only set max_unit and not minimum unit.
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar