Skip to main content
Cartegraph Campus

Automation Example: Display Error Message if Attempting to Create a Task on a Retired Asset

You must have administrator rights to access this feature.

This feature may not be available in every package. Not sure if you have this feature or you want to learn more about it? Send us a message at

This example automation will display an error message if they try to create a task on an asset that is retired.

  1. Click >Automation Manager.
  2. Click on Create an Automation.
  3. In the Search for Trigger field, enter Before task.
  4. Select the trigger titled Verify or perform a calculation before a task is saved.

Next we will extend the trigger.

  1. Click on the trigger Before a task is saved.
  2. In Select Field, select Activity.
  3. In the Select Operator field, select Is Not.
  4. In the last field, select Retire.

Next we will set properties on some blocks in our automation.

  1. Drag the Aggregate block to the Actions section.
  2. In the properties panel (on the right side of the screen), change the title to Is the asset retired?
  3. In the Aggregate field, select Count.
  4. In the Recordset field, select Task.

Next we will set the filter conditions to see if the Asset ID is the same asset type and same ID as the trigger record.

  1. In Select Field, select Asset ID.
  2. In the Select Operator field, select Is.
  3. We want to compare the Asset ID to the trigger record, so we'll link to it. Click automation_example%3A_calculate_quantity_on_a_record_iDefault.pngand click iLink_sm.png.
  4. Select Asset ID Trigger Record in the corresponding field.
  5. Click .
  6. In Select Field, select Asset Type.
  7. In the Select Operator field, select Is.
  8. For the Asset Type, we'll use the link again, Click automation_example%3A_calculate_quantity_on_a_record_iDefault.pngand click iLink_sm.png again.
  9. In the Search field, select Asset Type Trigger Record.
  10. To set an additional filter, click .
  11. In Select Field, select Activity.
  12. In the Select Operator field, select Is.
  13. In the last field, select Retire.

An aggregate block always returns a number. If it's zero, no error message is needed. We'll specify what should happen if the number is greater than zero.

  1. Drag the Condition block to the Actions section; put it under the Is the asset retired? block.
  2. In the Properties panel, change the title to If greater than 0.
  3. In the Select Field box, select Is the asset retired?, which is the name of the previous block.
  4. In the Select Operator box, select Is Greater Than (>).
  5. In the last field, enter 0.

Next we will set up our error message.

  1. Drag the Error Message block to the Actions section and nest it under the If greater than 0 block.
  2. In the Properties panel, change the title to Cannot create tasks for retired assets
  3. In the Message field, enter The asset you’re attempting to create a task for is retired; you cannot create tasks for retired assets.

We have nearly finished our automation; to finalize it, we'll give it a distinctive name, activate it, and save it.

  1. Click in the existing name near the top of the screen and enter, Prevent tasks from being created against retired assets.
  2. Activate the automation by turning on the switch.
  3. Click Save.

An automation will not run unless you Activate and Save. This allows you to save a partially completed automation without activating it in order to complete it later; when you do complete it, be sure to both Activate and Save.