Custom Fields

A Custom Field is a user-defined custom result that is built with a formula in the Expression Editor. Examples of Custom Fields range from simple to complex. There are two distinct types of Custom Field:
- Value Type: Returns a Numeric value
- Filter Type: Returns a Text value
The basic principle is that a Value Type Custom Field will return numbers and Filter Type Custom Fields will return strings. Want to calculate an operating cost? Multiply your operating hours by your hourly cost in a Value Type.
Want to group multiple benches together to create broader groups like low, medium and high material? A Filter Type will filter those benches into their relevant material height string.
Custom Fields are the result of an Expression. You can consider an Expression to be a formula similar to an Excel formula. The main body of the topic below will detail several examples as well as where to find the full set of tools available to you.
Custom Field Limitations
It's important to know that Custom Fields can only be calculated on a "per line of the Output Schedule" basis. This means that although Custom Fields can be aggregated individually, they cannot be an aggregated calculation (such as Strip Ratio). You can still calculate Strip Ratios in Spreadsheets.
Variables vs Constants
It's important to understand the difference between a Constant and a Variable when dealing with the Expression Editor. A Variable is anything that might change when you run your Scenario (any item that might appear in a line of the Output Schedule).
Constants
Constants are things that never change. They include Equipment, Processes and relevant Table Positions and Fields. The most common Constants are True and False but also includes things like Pi and options for the Between Function.
Constants that use Code Names
A common example of Constants in practice are the Equipment and Processes you set up in your Scenario. These type of Constants use Code Names.
In your project, you might have a piece of Equipment named Blasting, but you might also have a Process called Blasting. You can't use Blasting as the name for each as they have to be unique, so the application places their location before the name, so the piece of Equipment called Blasting has the Code Name EquipmentBlasting (no spaces) and the Process called Blasting has the Code Name ProcessBlasting (no spaces).
You'll use quite a lot of "if the variable is this constant then do this". So, if you were saying if the Process is Coal you would write that as Process=ProcessCoal. There are plenty of examples to help you get started so don't get too caught up on it right now.
Add Custom Field
To add a Custom Field, right-click "Custom Fields" and choosing New -> Custom Filter/Value Field Type.
Expression Type
(Default: Single) Determines whether your Expression will be conditional on the Process or Equipment.
Per Equipment
Allows an expression to be set per equipment. When one or more Per Equipment Custom Field Expressions have been added, the same per equipment expressions can be reviewed and edited as part of your Equipment setup. See: Custom Fields
Per Process
Allows an expression to be set per process.
Format String
The Format String controls the way the data appears, but doesn't affect the data itself. The Format String nomenclature is based on C# standards. For a summary, see: Format Strings
Aggregation
(Default: Sum) How the data will be aggregated when filtered (typically Sum when dealing with quantities).
Aggregation Method | Description |
---|---|
None | No aggregation. |
Sum | Returns the sum of all child node values. This is the default. |
Weighted Average | Sums the result of each child node value multiplied by the corresponding value in a corresponding In-built Weighting Field or Custom Weighting Field and then divides by the sum of all the weighted field values. |
Expression (Filter OR Value)
Many areas in the application that use Expressions have both a Filter and Value Expression available. Filter Expressions evaluate and return Booleans, whereas Value Expressions return either Values or Text depending on their context.
If a Filter Expression returns True, then the Value Expression will also be evaluated. If the Filter returns false, the Value Expression will return nothing. If you wish to have a Value Expression that changes depending on certain conditions (if this, else that) then you would use one or more Conditional Logic Functions.
For more information about expressions, see: Expression Editor
Custom Field Examples
Simple Coal Value: If you're scheduling in Volume but want to report Tonnes, or vice versa, you would use the GetValue() Function to draw the Constant from the table, and multiply it by the Source Percentage Completed:
Equipment Cost: This example shows a Per Equipment Value Type:
Volume: This example shows a Per Process Value Type:
Unit Equipment Cost:
Using an existing custom field as a Value Expression (Add all Volume over 3km):
Filter Type Bench Grouping Example: The example below will group Benches below RL 0 as Low, 0-50 as Mid and 55+ as High:
If(Between(SourceBench,SourceBenchN85,SourceBenchN5)=True,"Low", If(Between(SourceBench,SourceBench0,SourceBench50)=True,"Mid","High"))