Restricting spaces to be reservable on certain weekdays
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 01:03 PM - edited 11-30-2023 01:04 PM
Is there a way to define that a space is only reservable on specific weekdays? For example, if a space is set as available on Monday and Wednesday, it will not show as available the rest of the week.
I know there is an option to create block location records, but is there a way to restrict it indefinitely?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 06:43 PM
HI @SC_gt ,
I trust you are doing great.
You can create Business rule with script something like this :
(function executeRule(current, previous /*null when async*/) {
var reservationDay = new GlideDateTime(current.reservation_date);
var dayOfWeek = reservationDay.getDayOfWeekUTC();
// Monday is 1 and Wednesday is 3 in GlideDateTime
if (dayOfWeek !== 1 && dayOfWeek !== 3) {
var errorMessage = "This space can only be reserved on Monday and Wednesday.";
current.setAbortAction(true);
gs.addErrorMessage(errorMessage);
}
})(current, previous);
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 10:16 PM
Thanks Amit. This looks good, but I would like the space to not be shown to the user on days it is not available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 06:57 AM
We are running into the same situation where our leadership team wants groups to only be able to reserve specific spaces on specific days of the week.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2025 05:58 PM
We have a similar requirement, certain desks are required for certain users due to OH&S. On the days those users are not in we want those desks to be available to book.
Did anyone find a solution to this that doesn't require scripting? Surely there is some configuration ServiceNow have provided that accomplishes it. No?