Getting upcoming holidays from a schedule

TothTamas
Tera Contributor

Hello all!

I have a schedule called Holidays in cmn_schedule which has my set up Holidays cmn_schedule_span.
They are a mix of non repeating and repeating holidays, some starting from 2020.

I'm making a script that should check this schedule and decide if today is a holiday based on the schedule or not.

Is there an easy way to check for this, or is there a field i haven't found yet that contains the actual upcoming holiday date?
So far I was using the start date time sorted, and filtered compared to todays date, but this is not working with repeated holidays as their start date time is in 2020.

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @TothTamas 

Why not use the child's schedule and fix the holiday,.

 

AGLearnNGrow_0-1741354204486.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

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
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

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

Sadly no.
In short I have a script that should activate or deactivate functions based on if today is a holiday or not.
I would need a field that contains the true start and end dates of holidays as the startdatetime can have dates from years ago.
I could not find any that could give me this, or anything that would calculate an upcoming holiday based on the repeating holidays.

 

Sorry mate , cant help much on this.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

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
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

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