We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to create Time field in Record Producer

manthenamah
Tera Contributor

How to create Time field in Record Producer

3 REPLIES 3

Dr Atul G- LNG
Tera Patron

Hi @manthenamah 

 

The Record Producer is just an interface used to ensure the data is captured correctly in the backend. Time Worked are available OOTB.

What is your use case for this requirement?

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG

****************************************************************************************************************

Ankur Bawiskar
Tera Patron

@manthenamah 

there is no out of the box variable type to capture Time

but you can use variable of type Custom and add widget to it and then handle

check below and enhance

Time picker variable type in catalog item 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Tanushree Maiti
Tera Patron

Hi @manthenamah 

 

ServiceNow does not have a native Time-only variable type,

You can follow this alternative step-by-step approach to validate a 24-hour time format (HH:MM)

 

1: Create the Variable

  • Open your Record Producer in the Service Catalog.
  • Under the Variables related list, click New.
  • Set the Type to Single Line Text and name the field
  • Enter your Question (e.g., "Enter the time (HH:MM)").

2: Add Regex Validation

  • Switch to the Type Specifications tab on the variable form.
  • In the Validation regex field, create or select a Regex that enforces the HH:MM format.

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti