Time Picker type of variable

Rachna S
Tera Guru

Hi All,

We are looking for a way to allow users to pick time only. So we basically want a 'Time' type of variable (not date/time) on one of our catalog forms. I know there is OOB variable type as such. But is there a workaround for the same or something ?

Thanks,

1 ACCEPTED SOLUTION

Hi,

UI pages will work only on native and not on portal.

for portal you will have to use widget and include that in UI macro variable and the widget field of the variable

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Aman Singh_
Kilo Sage

Hi,

 

Currently it does not exit but you can refer to the threads,

https://community.servicenow.com/community?id=community_question&sys_id=100a0369db5cdbc01dcaf3231f96...

https://community.servicenow.com/community?id=community_question&sys_id=be337d91dbe7bf04fff8a345ca96...

 

Please mark Correct✅/helpful???? if applicable, thanks!!

Aman

Aman Singh_
Kilo Sage

Thanks for marking the response as helpful, please mark appropriate response as correct so that the question will appear as resolved for others who may have a similar question in the future.

If not, please let us know if you need some more assistance.

 

Thanks,

AMAN

Ankur Bawiskar
Tera Patron
Tera Patron

@Rachna S 

I have shared solution with using UI page variable 4 years ago

Refer this link

Time variable on Catalog request form

another link

Service catalog variable time type - using UI macro

OR Another approach

you can use OOB Duration variable and hide the Days part using DOM in native but that is not recommended.

find_real_file.png

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

I tried to use the UI page approach. The code works if you test using 'Try it' button on the UI page itself. However, when I link the UI to a variable, it does not work. It shows nothing on the form. Can you please advise why would that be ?

Thanks