Calculated Fields

Calculated Fields allow for Field Values to be based on an Expression as opposed to being imported or based on a Script. Calculated Fields can reference other Fields within the same Leaf, and can be based on the current Levels and Positions. You can also reference values on other Tables using the TableValue Function, but it's important to know that you cannot currently reference other Positions within the current Table.

It is possible to make a Solid field a Calculated field so that an expression can be supplied to determine which Solid field to reference.

Note: If a Solid field is changed to a calculated field, this will overwrite all existing solids for all leaf nodes that reference the Solid field. If the Calculated Solid Field (or any Calculated Field) is changed back to a Non-Calculated Field, the Calculated value will remain, but is a static rather than dynamic value.

Using Calculated Fields requires a basic understanding of Expressions as described here, but the following is a summary of the most relevant Functions, basic concepts and several example Expressions. Unless specified otherwise, all Expressions will be calculated based on the current Leaf.

Commonly Used Functions

  • GetValue(Field): Returns the Value from a Field Constant. For example GetValue(ImportedWasteVolume) will return the Imported Waste Volume as a number. This number can then be manipulated with any of the Math Functions.
  • Text(Process OR Equipment OR Level): Returns the Text name of a Variable. For example Text(Pit) will return the name of the Pit Position as a text string. This text string can now be manipulated with any of the Text Functions.
  • Between(Variable,Constant Lower,Constant Upper) Returns True or False and is inclusive of the two limits. For example Between(Seam, SeamD, SeamF) will return true if the Seam is Seam D, Seam F or between the two.

Key Concepts

  • Variable vs Constant: Process is a Variable. ProcessWaste, ProcessDrill etc are Constants. A common mistake is to have an expression that reads If(Process=Waste) which should read If(Process=ProcessWaste).
  • One Result Per Leaf: Similar to Excel, if you have a range of possible results in a given Expression you should used nested If() statements.
  • Filtering and Inserting Expression Options: There is a filter menu in each section (Functions, Operators, Constants and Variables) which allows simplification of the sometimes long list of options. You can also double click any of the options to insert them into an Expression.

Examples

  • Waste Density:
  • If(Seam=SeamD,2.3,If(Seam=SeamE,2.4,2.5))			

  • Waste Tonnes:
  • GetValue(ImportedWasteVolume) * GetValue(CalculatedWasteDensity)			

You can also just use regular numbers (literal values) for an Expression where the value is the same everywhere:

For conceptual information about Fields in general, see: Fields