Set a time field to a NULL value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello experts!
I have a requirement to set a time field to NULL by default instead of our system default of "12:00:00 AM " (this is our instance's system default format).
The business need is to be able to distinguish when the time field is actually meant to be set to 12 am vs when it is 'NULL' or untouched.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Sara Lee2
- Use a GlideTime field if you only need to store a time of day (without a date). This avoids the ambiguity that can occur with GlideDateTime, where an "empty" value and a default date/time can be confused.
- Remove the default value from the dictionary so that new records leave the field truly NULL until a user explicitly sets a value.
- Right-click the label of your time field on the form and select Configure Dictionary.
- Navigate to the Default Value tab.
- Ensure the Default value field is completely empty (do not type space, null, or None).
- Click Update
- Use a UI Policy (or Client Script, if needed) to control when the field is shown, hidden, mandatory, or editable based on your business logic. This helps distinguish between an untouched field (NULL) and a user intentionally selecting 12:00:00 AM (00:00:00).
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
is it a duration field? or data/time field?
share screenshots of form and how it's showing currently and how you want it?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I don't think your requirement is feasible
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader