Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Creating several time slots ⌚

Topic Labels: Scripting extentions
Solved
Jump to Solution
569 2
cancel
Showing results for 
Search instead for 
Did you mean: 

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

script

:slightly_smiling_face:

1 Solution

Accepted Solutions

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).

Karlstens_1-1670196371513.png

Simply run the script to create 3 records.

Karlstens_0-1670195711817.png

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.

See Solution in Thread

2 Replies 2

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).

Karlstens_1-1670196371513.png

Simply run the script to create 3 records.

Karlstens_0-1670195711817.png

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

Capture.JPG

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