In this example, we will combine tasks from a preventative maintenance plan into one work order.
Due to the complicated nature of this automation, Cartegraph recommends creating a test version and running it repeatedly and tweaking it until you are confident it works correctly.
- Click >Automation Manager.
- Click Create Automation.
- In the Search for Trigger field, select Create or edit records after a task is created.
- You can modify this by only triggering certain departments or activity types.
- Using an aggregate block, we need to compare the plan name on the work order and the plan on the task. Click the (s).
- Use the Condition block to compare the number generated from the aggregate block to see if any work orders exist. If the number of work orders is 0, then create the work order using the Create Record block. Further, to notify staff by email when the work order was created, we will add that in the Condition block as well.
- Use the Loop Records block to access the new or existing work order so we can add that work order number to the task. This uses the same filter as the previous condition block.
- Within that filter, we need another Loop records block to access the task, so we will use a Set Fields block to add the work order to the task. The Save Record block saves the change.
The automation is tested, saved, activated, and made live. It should look like this: