Sep 07, 2023 12:59 AM
Hi,
I am trying to add on more function to the existing auto set date script I found on Airtable extension (please see below).
I am hoping to incorporate into the code below that if there is a task that has been marked it should start 20 days before the entered project start date, and another task that is marked 30 days after project start date but it will not have a specific dependant controlling it. Is this possible?
Best regards,
Eve
Sep 07, 2023 01:02 AM
Sep 07, 2023 01:02 AM
Sep 07, 2023 01:03 AM
Sep 07, 2023 07:43 AM
Yikes. Calculating dates is possible with scripting, but it requires a certain level of familiarity with JavaScript and Airtable. I haven’t read the script you posted because it is kinda long and reading code on my phone is hard.
But a couple things come to mind.
The script you posted runs on button press, not automatically. Do you want the script to run as an automation or when a user presses a button?
Are the tasks linked to the project? Is there a single select determining the offset from the project start date? You could have a rollup or lookup field of the project start date, and a formula field that calculates task start date from the project start date and the task offset. If you need this date in an editable field, use an automation to copy it over.
How do these two fixed dates interact with dates for other tasks?
Sep 07, 2023 06:17 PM
Hi @kuovonne
Yes it is long! 😂
I would like the script to run on button press.
Currently trying to set up as a base where we have got template task linked to a template project. The coding that I am trying to customise is for the "Task" table where each task will have an auto set start date input into the extension and its end date calculated by adding the duration to start date. And subsequent task that has a dependency, will have their start date right after the end date of its predecessor. But there are a few task (for example the screenshot below), I want it to start 30 days before the "launch date" entered if that makes sense?