To set conditional formatting, select the item you want to work with then from the Properties pane
select Conditional Formatting and click the finder button
. The Conditional Formatting window appears.
|
Purpose |
Expression |
|---|---|
|
Highlight absences when the start date is today. |
On the Filter tab, click Edit, then select Use Advanced Filter. Enter the expression: DateTimeToFormattedString(vw_absence.AbsenceFromDate , "d") = DateTimeToFormattedString(Now() , "d") On the Properties tab, select the colourcolor you want to use from the Text Style options. |
|
Highlight absences which have a reason description ending with the word 'unknown'. |
On the Filter tab, click Edit, then select Use Advanced Filter. Enter the expression: vw_absence.ReasonDescription LIKE "%unknown" On the Properties tab, select the colourcolor you want to use from the Text Style options. |
|
Highlight absences if the total duration of all absence periods is greater than 10. |
On the Filter tab, click Edit, then select Use Advanced Filter. Enter the expression: sum(vw_absence.Duration) > 10 On the Properties tab, select the colourcolor you want to use from the Text Style options. |
The following examples use advanced conditional formatting. Before you try these examples, choose Tools > Options, then select the Options tab and enable Use Advanced Conditional Formatting.
|
Purpose |
Expression |
|---|---|
|
Highlight absences in red when the start date is today. |
If DateTimeToFormattedString(vw_absence.AbsenceFromDate , "d") = DateTimeToFormattedString(Now() , "d") then
TextStyle->Color:=NamedColor("Red")
else
TextStyle->Color:=NamedColor("Black")
|
|
Highlight absences in red which have a reason description ending with the word 'unknown'. |
If vw_absence.ReasonDescription LIKE "%unknown" then
TextStyle->Color:=NamedColor("Red")
else
TextStyle->Color:=NamedColor("Black")
|
|
Highlight absences in red, if the total duration of all absence periods is greater than 10. |
If sum(vw_absence.Duration) > 10 then
TextStyle->Color:=NamedColor("Red")
else
TextStyle->Color:=NamedColor("Black")
|