Nov 09, 2022 09:39 PM
Hi!
I would like to write a script that automatically creates time slots one week in advance.
These time slots are every Tuesday and Wednesday from 9am to 2pm (6 time slots/day).
For now, I type them manually but there is certainly a better way… Let me know what you think
:slightly_smiling_face:
Solved! Go to Solution.
Dec 04, 2022 03:26 PM
Hey @Soly
Here's a script I wrote for you with this mornings coffee, for use with the Scripting Extension.
It demonstrates how to create a "records" object of 3 appointments, that will then stamp into your table. There's a bit to learn with how to use Date Objects within JavaScript - they will take some time to get used to - and my example might not be the most efficient way of filling Date and Time fields (although it works as I'd hoped).
Simply run the script to create 3 records.
This could further be placed into an Automation, and executed on a set period to create records each evening, or once a week, whatever/whenever you need really.
Dec 04, 2022 03:26 PM
Hey @Soly
Here's a script I wrote for you with this mornings coffee, for use with the Scripting Extension.
It demonstrates how to create a "records" object of 3 appointments, that will then stamp into your table. There's a bit to learn with how to use Date Objects within JavaScript - they will take some time to get used to - and my example might not be the most efficient way of filling Date and Time fields (although it works as I'd hoped).
Simply run the script to create 3 records.
This could further be placed into an Automation, and executed on a set period to create records each evening, or once a week, whatever/whenever you need really.
Dec 04, 2022 11:55 PM
Hey @Karlstens ,
That's a wonderful gift. It works as expected! 🙂
✅You're right, I have just enrolled in a course to learn JavaScript, so I can write my own scripts soon.
That's inspiring that you're able to write them on the spot like this.☕
For now, I can tweak your script to add more time slots or extend them, following the pattern you provided.👍
Thank you so much!💐