Skip to main content
Cartegraph Campus

Automation Example: Update Record

You must have administrator rights to access this feature.

This feature requires a Cartegraph OMS license.

In this automation, we will complete a work order when all of its associated tasks are completed.

  1. Click  >Automation Manager.
  2. Click Create Automation.
  3. In the Search for Trigger field, enter after task edited.
  4. Select Create or edit records after a task is edited.
  5. Click After a task is edited.
  6. In Select Field, select Work Order.
  7. In the Select Operator field, select Is Not Empty (Is Not Null)
  8. Click  .
  9. In Select Field, select Status.
  10. In the Select Operator field, select Is.
  11. In the last box, select Completed.

Next we will set up an aggregate to determine if there are any open tasks for the work order in our trigger.

  1. Drag the Aggregate block to the Actions section.
  2. In the Properties panel, change its title to, Are there any open tasks for the same work order?
  3. In the Aggregate field, select Count.
  4. In the Recordset field, select Task.
  5. In Select Field, select Work Order.
  6. In the Select Operator field, select Is.
  7. Next to the last field, click  and then   .
  8. In the corresponding field, select Work Order Triggered Record.
  9. Click  .
  10. In Select Field, select Status.
  11. In the Select Operator field, select Is Not.
  12. In the last field, select Completed.
  13. Click  .
  14. In Select Field, select Status.
  15. In the Select Operator field, select Is Not.
  16. In the last field box, select Canceled.

Now we will set the conditions for what to do if there are no open tasks.

  1. Drag the Condition block to the Actions section. Do not nest it.
  2. In the Properties panel, change the Title to If there are no open tasks.
  3. In Select Field, select Are there any open tasks for the same work order?
  4. In the Select Operator field, select Is (=).
  5. In the last box, enter 0.

Now that the conditions are set, we will have the automation update the record to completed for the trigger record.

  1. Drag the Update Record block to the Actions section and nest it under the condition block titled If there are no open tasks.
  2. In the Properties panel, change the title to Set work order status to closed.
  3. In the Record field, select Work Order Trigger Record.
  4. In the Add Field field, select Status.
  5. In the Status field, select Completed.

Our automation is nearly complete, but we must rename it, activate it, and save it.

  1. In the automation name near the top of the screen, change the name of the automation to Complete a work order when all of its associated tasks are completed.
  2. Activate the automation by setting the toggle to the on position.
  3. Click Save on the right side of the screen.

NOTE: Automations must be activated and saved in order to run. This allows you to save an incomplete automation that isn't ready to run. Later, when you complete the automation, you should activate it and save it.

  • Was this article helpful?