Help

Create tasks from templates table via button automatically

Solved
Jump to Solution
4493 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Jeff_A
5 - Automation Enthusiast
5 - Automation Enthusiast

I apologize if I missed this out there, but I tried searching for a similar answer but couldn’t find one that matched exactly or I could learn enough from. Unfortunately my knowledge of script language is borderline zero.

High-level explanation:

I have a multi-stage project process that I am starting to build in Airtable that I am curious if am automation is possible, where a button can automatically create tasks from templates as you work through a project.

Details:

Currently my process has 2 main components, the Submission/Review process and the Launch process, with a task table for each process linked respectively.

The tables are laid out like this:

  • Submission/Review
    • Captures new requests from a form and has data fields for review steps
    • Fields related to this automation:
      • Vendor; single line text (primary field)
      • Stage; single choice
      • Assigned to; collaborator
      • Stage tasks created; multi-select with same options as Stage
  • Submission/Review Tasks
    • Houses the standard tasks for each stage of the process
    • Fields:
      • Task; single line text
      • Subtask(s); long text
      • Assigned to; collaborator
      • Status; single choice
      • Submission/Review; linked Field to link task to project
  • Launch Process
    • Once an item is approved during the the Submission/Review process, a record here is started for a sub-team to process
    • Field related to this automation:
      • Vendor; single line text (primary field)
      • Stage; single choice
      • Assigned to; collaborator
      • Stage tasks created; multi-select with same options as Stage
  • Launch Process Tasks
    • Houses the standard tasks for each stage of the Launch Process
    • Fields:
      • Task; single line text
      • Subtask(s); long text w/rich text
      • Assigned to; collaborator
      • Status; single choice
      • Launch Process; linked Field to link task to project
  • Task Template
    • Templated tasks for the entire flow, see breakdown below
    • Fields:
      • Task; single line text
      • Subtask(s); long text w/rich text
      • Associated Process; single choice (Submission/Review or Launch Process)
      • Associated Stage; multi-select that has all stages from both Process tables
      • Active; checkbox

My ideal scenario is that there is a button field, so it shows in each record, titled Create Tasks. I am hoping that button does the following:

  • The button is clicked and initializes a script for the record/row the button is associated with
  • Validates the current stage value against the {Stage tasks created}, to see if the standard stage tasks have already has created before.
    • This is to prevent duplicate tasks being created in a stage
      • If stage is already present show message in dashboard “Tasks already created. No action taken” and end script
  • If stage is not present, look at the task templates table and find all records that match the process (see below bullet) and stage (from record Stage field)
    • Is it possible to have a variable that automatically detects what table the record is in and determines the process? I.E. record is in table Launch Process > process = Launch?
  • Once all tasks are created, show message in dashboard “ Standard tasks created successfully”

I tried using the create multiple records script from Airtable, but I couldn’t figure out how to make it work in the way I am hoping for and without having to force users to select the record in the script dashboard.

I don’t mind spending the hours needed to learn script to do it but I wanted to see if my idea was even feasible in the first place

1 Solution

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

Hi Jeff, I think you don’t need to use scripts either. Check this base out

How it works:

  1. We create a new record in the Projects table, with the assumption that each project’s name will be unique, and select the Process Type value
  2. An automation runs that looks for all records in the Task Templates table that have the same Process Type and then links them to the record from the previous step
    • Its trigger is when the Name and Process Type fields are not empty
  3. We have a field called Text for Pasting that creates unique comma separated values
  4. We click “Create Tasks”
  5. Another automation runs that will take the text from Text for Pasting and put it into field that links to Tasks, creating those records
    • Its trigger is when the Text for Pasting and Name fields are not empty, and the Create Tasks field is checked

template task sets

With this logic, you should be able to customize it to send tasks to the different tables fairly easily

Let me know if you could use help setting this up!

See Solution in Thread

3 Replies 3
TheTimeSavingCo
18 - Pluto
18 - Pluto

Hi Jeff, I think you don’t need to use scripts either. Check this base out

How it works:

  1. We create a new record in the Projects table, with the assumption that each project’s name will be unique, and select the Process Type value
  2. An automation runs that looks for all records in the Task Templates table that have the same Process Type and then links them to the record from the previous step
    • Its trigger is when the Name and Process Type fields are not empty
  3. We have a field called Text for Pasting that creates unique comma separated values
  4. We click “Create Tasks”
  5. Another automation runs that will take the text from Text for Pasting and put it into field that links to Tasks, creating those records
    • Its trigger is when the Text for Pasting and Name fields are not empty, and the Create Tasks field is checked

template task sets

With this logic, you should be able to customize it to send tasks to the different tables fairly easily

Let me know if you could use help setting this up!

Mark_Werner
5 - Automation Enthusiast
5 - Automation Enthusiast

@Adam_TheTimeSavingCo please share the formula you used to create the unique list from the linked Task names

Update:
I used: SUBSTITUTE({Linked Tasks} & ’ (’ & {Project Name}&‘)’, ‘,’,’ (’ & {Project Name} & ‘)’& ‘,’)

Hey Mark, here’s the formula:

IF(
  {Task Templates} != "",
  {Name} & 
  " - " &
  SUBSTITUTE(
    {Task Templates},
    ",",
    "," & {Name} & " - "
  )
)

For future reference, you can duplicate the base to see all the formulas used!