Skip to main content

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



🙂

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.


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.


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!💐


Reply