Skip to main content
Cartegraph Campus

Automation Example: Calculate Quantity on a Record

You must have administrator rights to access this feature.

This feature requires a Cartegraph OMS license.

This example will demonstrate how to calculate quantity by setting the Clearance field of a support based on its height.

  1. Click >Automation Manager.
  2. Click Create Automation.
  3. In the Search for trigger field, enter asset calculation.
  4. Select the trigger, Verify or perform a calculation before an asset is saved.
  5. In the Asset Type field, select Support.
  6. Extend the trigger.
  7. Select field Height.amount.
  8. For the Operator, select Is not empty (Is Not Null).

Next we will add the appropriate block and fields.

  1. Drag the Set Fields block from the left panel to the Actions section.
  2. In the Properties panel on the right side of the screen, select Trigger Record for the Record Source.
  3. In the Add Field box, select Clearance.amount.
  4. In the Add Field box, select Clearance.unit.

NOTE: For the Create Record, Create Task, Set Fields, and Update Record blocks, you can set the number and unit properties of a quantity field individually.  The Clearance entry represents the quantity as a combination of unit and amount. The Clearance.amount entry allows for setting the amount individually. The Clearance.unit entry allows for setting the unit individually. When calculating a quantity using syntax mode, the .amount entry must be used. When in Link mode, the combined quantity field can be linked only to other quantity values. The value and amount fields, when used individually, are not restricted for use only with other quantity fields. The individual amount or unit can be set using links to other fields of the same type or set using calculations.

Next we will calculate the clearance to be 5 less than the height with the same unit as height.

  1. For Clearance.amount, click  and click (s), then enter: [eventsource|Height.amount] - 5
  2. For Clearance.unit, click  and click , then select Height.unit.
  3. In the Title field in the Properties panel, enter Set Clearance based on height.

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 Validate and set Support fields. Since it is a best practice to combine all validation and field setting in a single automation for a recordset, the automation is given a generic name.
  2. Activate the automation by sliding the switch to the on position.
  3. 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.

  • Was this article helpful?