Best answer

Automatically creating a set of date records in Airtable

  • 10 June 2022
  • 2 replies
  • 120 views

Userlevel 3

Hi,

I have begun using Airtable as a scheduler. I am looking for a simple way to automatically create a set of date records in Airtable, ideally via Slack. They would be an x number of time slots every y minutes, from time a to time b, for a specific day. The result would need to look like the attached picture.

Any idea on how I could achieve this ?

Thanks!

icon

Best answer by Troy Tessalone 10 June 2022, 15:37

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +14

Hi @MTLGuy 

Good question.

The logic for this can be a bit tricky especially to defensively code.

 

There are 3 inputs:

  1. Start Date & Time
  2. End Date & Time
  3. Interval (in minutes)

 

Things that have to be defensively coded:

  1. What if the Interval is larger than the delta between the Start/End Date Time
  2. What if the End Date is before the Start Date
  3. What if the interval doesn’t split nicely based on the Start/End Dates & Times
  4. ...and so on

 

Probably would be best to standardize into a form that is filled out.

Could be a simple Airtable Form with 2 Date/Time fields and 1 dropdown for interval. (e.g. 15 mins, 30 mins, etc.)

An Airtable Script can be created to be run automatically via an Airtable Automation triggered by a new form submit.

Userlevel 7
Badge +9

Hiya @MTLGuy! I wanted to swing by and see if Troy’s recommendations helped get this sorted for you? Keep us posted on your success! 🤗