XPAC Reference Guide

Specifying shading using the field expression field

Specifying shading using the field expression field

Previous topic Next topic  

Specifying shading using the field expression field

Previous topic Next topic  

You can use the Field/Expression field/s in the Shading tab to specify a database field on which to base the shading of blocks for a Database or Mine Status plot:

Shading tab - Field Expression field

When you specify a database field, you can either:

select a database field from the drop-down list; or
type an expression.

Selecting a data field

Select a database field from the Field/Expression drop-down list to determine how XPAC shades each block in the plot. For example, if you select Imported Insitu Coal Thickness, XPAC shades each block in the plot according to its coal thickness (based on the increment shading).

Typing an expression

You can also type an expression into the Field/Expression drop-down list to determine how XPAC shades each block in the plot. Using an expression lets you shade blocks according to:

multiple data fields (selecting a data field only lets you use one data field value)
block properties, such as pointers (for example, to shade endwall blocks), PIL numbers (for example, to shade each seam a different colour) and so on.

Information

The Field/Expression field also lets you use XCM functions or commands, provided you can fit it on a single line.

See Shading expression examples for more information.

Using conditional expressions

A conditional expression returns one of two values, based on whether a condition is true or false.

Note

You can use the IIf function to use a conditional expression (instead of using an If...Then...Else...End If control structure, which requires you to create a data field and write an XCM).

You can use the following general format to produce a conditional expression:

IIf(Condition, Value if Condition True, Value if Condition False)

Condition is an expression which returns either a True or a False
Value if Condition True is the value to return if the Condition returns a value of True
Value if Condition False is the value to return if the Condition returns a value of False.

Note

The Value if Condition True and Value if Condition False must both return a valid expression. Both are evaluated, even if only one of them is returned.

See Shading expression examples for more information.