
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 01:02 PM
I'm working on creating a new Catalog Item for requesting a scheduled report. As part of this I need a way for the requester to enter what time of day they want the report to run, but there is not a variable for Time only. There is Date and Date/Time. I did some digging and it looks like people are using Select Box variables and populating them with options for every 30 minutes throughout the day, but I'm looking for someone that allows them to enter a specific time down to the minute.
Does anyone have some suggestions on how I can get this done?
Solved! Go to Solution.
- 5,127 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 01:12 PM
You could single line text field with some examples of the format. Then use a regular expression to validate what they have entered. Example regular expression below for 24 hour clock.
24 Hour clock
/^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
12 Hour clock
/((1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]))/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 01:12 PM
You could single line text field with some examples of the format. Then use a regular expression to validate what they have entered. Example regular expression below for 24 hour clock.
24 Hour clock
/^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/
12 Hour clock
/((1[0-2]|0?[1-9]):([0-5][0-9]) ?([AaPp][Mm]))/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 01:22 PM
Thanks Brian. I had thought of that as well, but I'm really hoping for something where the requester doesn't have to key in a time. I feel like I could run into some issues with people not following the correct format for entering the time. Trying to find a solution that's idiot-proof.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2019 01:31 PM
That is what the regular expression is for. If they don't put in the correct format you wipe out what the have and make them try again. Usually put an alert "The time must be put in the following format xx:xx base on a 24 hour clock"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2019 12:11 PM
Thanks Brian. This ended up being a good solution to what I was hoping to get done.