What do you mean with "SQL query result"?
Do mean something like if more than X rows returned by the report then color the title of the report region red.
There might be a straight forward dynamic action possible.
Basically is find a way to determine what CSS class it should be.
And set that class for the title of that region.
For the pl/sql solution you would need a region template specific for this region.
And you would need a apex (page) item to hold the name of the class for example PXX_CLASS.
Now change the region template such that in the html that holds the title the PXX_CLASS is referenced
Something like class="&PXX_CLASS." .
Without out any futher information of which an example on apex.oracle.com would be of the most help we cann't offer any more assistance.
How to color HTML region header depending on SQL query result ?
It depends. On a lot of information you have not provided.
Always provide the following information when asking a question:
When the question relates to visual formatting and layout like this one, we also need to know:
Reproducing the problem on apex.oracle.com so we can see it at first hand is always recommended. Asking the question as effectively as possible by following the guidelines here and here will also help in getting a rapid resolution.
When and where is the SQL query to be evaulated?
by header I mean region Title.
And by "color" do you mean the title text or background color? Or both?
So unless you are willing to invested some time to set something up on apex.oracle.com we can't help you any further.
I got it to work, I added ID to <H3> element and used jquery selector in dynamic action. But Im wondering how do I get it to work in an 5 minute interval. Let say that the value of the title would be the input for SQL which determines whether to color it green or red.
Is there an dynamic action which could be triggered every 5 minutes with condition of SQL result in it.
Thank you ! Timer dynamic action solved all the problems for me.
What I did was:
Added timer dynamic action for the page.
Added timer expire dynamic action which refreshes/sets hidden page items (which have sql in them).
what I will do now is add another dynamic action to check the values of page items to set style (background-color) to certain