Store month and date value in system property
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 12:38 AM
I would like to store national holidays month and date value in system property so, that I can compare termination last working date field from HR profile.
Can you suggest that how can we store date and month value in system property?
Thanks,
Sireesha.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 12:51 AM
why do you use a work schedule to implement this function instead of using system properties?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 12:52 AM
Hi @jalipatisir
You can achieve this using a schedule entry along with a server-side or client-side script. Create a new schedule that includes public holidays, and then use the script below to check whether a specific date falls within that schedule.
var scheduleId = 'SYS ID OF YOUR SCHEDULE';
var scheduleRecord = new GlideSchedule(scheduleId);
var date = new GlideDateTime();
if (scheduleRecord.isInSchedule(date)) {
gs.info("Holiday");
} else {
gs.info("Working day");
}
Note: Change the script logic as required.
Regards,
Siva