Create a time field on a classic Service Portal catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
37m ago
I'm building a catalog item that needs to collect a working-hours range from the requester, for example "8:00 AM to 4:00 PM," plus a time zone. I can't find a way to add a time-only field to the form.
What I've found so far:
- The Date/Time variable type asks for a full date and time. I only want a time of day, and a date makes no sense for this question.
- I don't see a Time variable type in the list when I add a variable.
- The form is used in the classic Service Portal (not Employee Center or the native UI), so I'm limited to what the classic portal supports for catalog variables and client scripts.
What I'm trying to do:
- Let the requester pick a start time and an end time.
- Have the values show up cleanly on the RITM and SCTASK so fulfillers can read them.
- Make the fields required, and only show them when a certain option is selected (I'm planning a UI Policy for that).
Questions:
- Is there a supported way to get a time-only picker in the classic Service Portal on a catalog item?
- If not, what is the best workaround?
Release: Brazil Interface: Classic Service Portal
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
32m ago
Hello Beth,
As of now, ServiceNow doesn't support only Time variable, it only supports Date & Time variables.
If you still want to do it, you can try following customizations as workarounds -
https://www.servicenow.com/community/developer-forum/time-variable-on-catalog-request-form/m-p/14407...
https://www.servicenow.com/community/developer-forum/catalog-item-no-time-only-variable/m-p/2114617
If it's not a deal-breaker, I would still suggest using DATE & TIME field only and inform business to select current day date only or you can set it up as well by default to current date and apply restrictions whenever other date is selected.
Please do mark this HELPFUL if it is useful.
Thanks & Regards,
Himmat