Need a method to add only time type field in a form

fisfreak
Kilo Contributor

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

find_real_file.png

find_real_file.png

Here, I do not want the calendar but i want only the time part.

Is this possible to implement ??

Thanks

9 REPLIES 9

Chay2
Mega Guru

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.


fisfreak
Kilo Contributor

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


Hi Krishna,


The second approach is having standard values in the drop down. if you have 2 fields like "Start Time" and "End Time" both can be drop down fields and you will be able to handle validations in client scripts.


.Untitled.png


Brad Tilton
ServiceNow Employee
ServiceNow Employee

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.