You must have administrator rights to access this feature.
This feature requires a Cartegraph OMS license.
This example automation will display an error message if you try to complete a task if the cost of the other logs is too high.
- Click >Automation Manager.
- Click on Create an Automation.
- In the Search for Trigger field, enter before task calculation.
- Select the trigger titled Verify or perform a calculation before a task is saved.
Next we will extend the trigger:
- Click on the trigger Before task is saved to activate it.
- In the If field, select Status.
- In the Select Operator field, select Is Not.
- In the last field, select Completed.
Next we will set properties on some blocks in our automation.
- Drag the Aggregate block from the left panel to the Actions section.
- In the Properties panel on the right side of the screen, change the title to Cost of Task Other Log.
- In the Aggregate field, select Sum.
- In the Recordset field, select Task Other Log.
- In the Filter field, select Parent Task.
- In the Select Operator field, select Is.
We want to compare the Task ID to the trigger record, so we'll link to it. Click and select .
- Select Task ID Trigger Record in the corresponding field.
- Select the cost field to sum.
An aggregate block always returns a number. We will specify what should happen if the number is greater than 1,000.
- Drag the Condition block to the Actions section of the screen; put it under the Cost of Task Other Log block.
- In the Properties panel, change the title to Cost Over $1000.
- In the If field, select Cost of Task Other Log.
- In the Select Operator field, select Is Greater Than (>).
- In the next field, enter 1000.
Next, we will set up our error message.
- Drag the Error Message block to the Actions section and nest it under the Cost Over $1000 Condition block.
- In the Title field in the Properties panel, enter Other Log cost is over $1,000.
- In the Message field, enter, The task cannot be completed because the Other Log cost is over $1,000.
We have nearly finished our automation; to finalize it, we will give it a distinctive name, activate it, and save it.
- Click in the existing name near the top of the screen and enter Prevent tasks from being completed if Other Log cost is over 1000.
- Activate the automation by sliding the switch to the on position.
- Click Save.
NOTE: It's important to Activate and Save to make an automation run. If you have an incomplete automation that you don't want to run yet, you can save the incomplete automation without activating. Later, when you finish it, you should activate it and save it.