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.
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(ImportedCoalVolume) will return the Imported Coal 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, ProcessCoal, 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))
GetValue(ImportedWasteVolume) * GetValue(CalculatedWasteDensity)
You can also just use regular numbers for an Expression where the value is the same everywhere:
For conceptual information about Fields in general, see: Fields