Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to Highlight rows color based on a hidden Column value in CR

Soukaina IDRISSIOct 18 2023

Hi Experts,
I've figured out how to change the row color in a classic report based on the displayed value (In my case 'STATUS' Column)
The steps I've taken to do that are below:
- In the Function and Global Variable Declaration section of my page, i added this code:

function highlight_rows() {
$('td[headers="STATUS"]').each(function() {
let stat = $(this).text();
console.log(stat);
if (stat == 'closed' ) {
$(this).closest('tr').find('td').css({"background-color":"#fff5ce"});
}
}); 
};

And in the Execute when Page Loads section, I call up the function I created above, like:

highlight_rows();

However, my ultimate goal is to determine the row color based on a hidden column value.
Unfortunately, when I hide the STATUS column, this functionality ceases to work.

I did demo: on apex.oracle.com with this credentials:
Workspace: ws_formation
Username: demo
Password: azerty1234
I used the Application 298681- TEST HIGHLIGHT : Page 3

Thank you for help.

Comments
Post Details
Added on Oct 18 2023
2 comments
724 views