0
votes

I have an interactive grid in apex application which has 2 columns.

The query is as below:

The grid has 3 columns: CURRENT_KPI, NEW_KPI and RESULT. As can be seen result column results from CURRENT_KPI-NEW_KPI.

select to_char(KPI_1,'999,999,999,999') CURRENT_KPI, 
       case when dept=1 
            then to_char(KPI_2,'999,999,999,999') 
            else to_char(KPI_3,'999,999,999,999') 
        end as NEW_KPI, 
       to_char( kpi_1 - case when dept=1 
                             then kpi_2
                             else kpi_3
                          end,
                 '999,999,999,999' ) result
from KPI_DATA;

I need to change text color of result column such that:

If number is positive, i.e. 999,999,999 , text will be blue. If number is negative, i.e. -999,999,999, text will be brown. If number is 0, text color will be red.

Apex version: 20.2

How can this be achieved?

EDIT: Options available in IG Actions menu operator:

enter image description here

1

1 Answers

2
votes

Use what Apex offers - highlighting.

  • run the interactive grid
  • go to Actions menu, select Format, select Highlight
  • create as many of them as you want, e.g.
    • name it "blue"
    • highlight "row"
    • set "text color" to "blue" (#99CCFF)
    • condition type is "column"
    • column name is "result"
    • operator is "greater than"
    • value is "0"

Once you create them all, run the page and text will be painted in colors you chose.