Duration field formatted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2017 06:21 AM
It's any way to customize the appearance of glide_duration field type?.
By default it display as label only Days and Hours.
It's any way to display "Minutes" or "Min" as well?.
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2017 07:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2017 11:20 PM
Hi Thomas,
Thank you for response.
However, I have a customer requirement for this behavior :
1. Field is displayed normal (in Hours format)
2. After the completion, the field should be read only
3. The read only field should looks like in picture below
It's any way to display a label or a dummy field or a text box in exactly the same position as duration field? (after make it read only and probably hide).
I can do it with Javascript DOM or jQuery, but I want to avoid this, because the HTML source can be different in future versions of ServiceNow.
Thank you,
Catalin.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2017 06:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2017 07:02 AM
Actually no. The customer wants exactly that type of formatting, which is possible only in string field.
I still looked after a solution to put a simple text box that are not associated with database field .
Until then, the simplest(and easiest) idea is to have another field, custom one, string type, with the same label. (a text box will be enough).
Then I wrote a business rule (on duration field, on change, before update) that format that string field in human format :
Then, I wrote a client script, on load. I check if duration field is not read only, then string field is hidden and duration field is visible. If duration field is read only, then duration field is hidden and string field is visible .
Even implies new fields, this solution does not involve jQuery or DOM, so future update will not affect the functionality.
Thank you and best regards,
Catalin.