Need a method to add only time type field in a form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2017 06:12 AM
Hi All,
Since we do not have time type field to add in a form in service now, I need a method which can give me time in this format (hh;mm;ss).
Now if we select Date/time type, then we get this
Here, I do not want the calendar but i want only the time part.
Is this possible to implement ??
Thanks
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2017 06:24 AM
Hi Krishna,
I think currently, there is no OOB time type variable available.
You can create custom UI Macro and call that macro variable type and use the same in Service Catalog.
if you don't want to get into complications of UI macros, create a drop down field showing standard values of time with the required time difference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 02:59 AM
Hi chaithanya,
Can you please be little elaborate on the second approach, bit confusing, how will you create a drop down field showing standard values of time?
variable type i selected for this is "Lookup Select Box".
My requirement is simple :
I need a UI to allow the user to select specific times in hh:mm:ss format.
Thanks,
Krishna P

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 06:16 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2017 06:44 AM
We don't have a time variable or field type in ServiceNow. There are 2 paths that I typically see people take in these cases. The first is what Chaithanya described above where you create a custom ui macro, and the second is where you use a string field with an onchange client script that validates the formatting.