Conditional Formatting

Navigation:  Advanced Formatting >

Conditional Formatting

Previous pageReturn to chapter overviewNext page

Tools like MS Excel use conditional formatting as a way of highlighting particular values in a cell. For example, when a cell has a value of 'Important', colour it in red.

This is a great way to help readers to understand what's important in your documents.

You can also use colors from EA to automatically add colors to some variables. See using EA colors.

You can also add conditional formatting to your eaDocX documents, and use the values of information you have in EA to change the colors in tables & inline text, as well as changing the text which is printed.

For example, if you have a list of Issues which you print in a table:

There are a few problems with this list, which we might want to highlight to our readers:

One issue has no reference, and another has no description. We might like to highlight this, to remind us to add them

Another issue is more recent than the others. We'll highlight this.

The 'priority' column uses the standard EA priority values, which can't be changed. Our local standards for priority is 'Must have' , 'Should have' and 'May have', which replace 'H/M/L'

We'd like also like to highlight the different phases where these issues apply.

 

Adding all of this processing to our issues list produces this:

Details of Conditional Formatting rules

Rule type

Conditions

Value

 

Text

same as

 

string

contains

does not contain

begins with

ends with

Numeric value

equal to

integer or decimal e.g.

1,

1.23, but not floating point numbers e.g.  6.022E23 or 6.62E-34

not equal to

greater than

less than

greater than or equal to

Date

on

Date, chosen from the calendar

before

after

on or before

on or after

Empty



Not Empty



Always


(applies your chosen color for any value of the field)

 

For any conditional formatting rule, you may also define:

Highlight color

Defines which colour will be used to highlight the text.

In tables, this will be the background color of any cell to which the rule applies

In Inline text, this will be the colour for the paragraph

Replacement text

Where a conditional formatting rule applies, this text will replace whatever would normally appear there.

 

number - works with decimals & integers i.e. 1,42, 42.1 but not 6.022E23 or 6.62E-34