Forum Discussion

JasonJohnson2's avatar
JasonJohnson2
Qrew Cadet
6 years ago

Automation Help with templates

I have 3 tables - Projects, Tasks, Sites
Projects is a parent of Tasks and Sites
Sites is a parent of Tasks

You create a project and then a template list of tasks and can choose to assign them to all sites. 
I have an automation that when a site is created it will replicate the template tasks and assigning them to the sites. That is if the task is part of the template tasks.

I have a need to make it so if you are in the project and create a new task you can assign the task to be part of the template group of tasks and it will go and add copy the tasks to all the existing sites. I prefer to use an automation because I did before.

The worst part is that about 6 months ago I did this and it worked but now I am no longer at the same place and the work can't be accessed for that reason. Any ideas?
  • I was working on another automation that required me to think a different path and that helped me see the key and now I have it resolved. Below is an overview. And yes if you have 10 tasks that you check the Automations will add all 10 to the Sites. 

    It requires 3 Automations  -

    Automation 1 -
    Trigger - Task table - Field Add to all Installs is modified to checked
    Action - Project table -Related Project had Field  'Everyone Needs this Task' is updated with the Task record #

    Automation 2 - 
    Trigger - Project table - Field  Everyone Needs this Task is modified
    Action - Sites table - sites related to project has the Field 'I need this task number added to me' with the  'Everyone Needs this Task' from the related Project 

    Automation 3 - 
    Trigger - Site table - Field 'I need this task number added to me'  is modified
    Action - Copy record from the Task table to the task table with record# equal to Site table - Field 'I need this task number added to me'. Just remember to copy the Schedule Record ID# to the Related Site in the Task table
  • Deleting the task is much simpler and requires only one change and a single automation.
    Change - Create in the Task table a field 'I am U-571 destroy me!' and when you create new tasks in Automation 3 above populate that with the Record ID# of the template record.

    Deletion Automation
    Trigger - Task table - Field Add to all Installs is modified to UNCHECKED
    Action - Delete records where the field 'I am U-571 destroy me!' is equal to the triggers Record ID#