Hi,
I had asked a question earlier in one of the threads.
The details are in thread here.
https://community.oracle.com/tech/developers/discussion/4484286/oracle-apex-modfiy-grid-query-to-fetch-previous-quarter-data-if-current-not-available#latest
Requirement was to write query for interactive grid that would return previous quarter data if current quarter was unavailable.
To resolve i created function in database returning sql which implements same logic. But i am not sure how to use it in apex application.
My current IG query is:
SELECT DEPT_ID,DEPT_QUARTER_ID,
,KPI_1,KPI_2,KPI_3,KPI_4,KPI_5
from DEPT_DATA
WHERE
DEPT_QUARTER_ID=:DEPT_QUARTER_ID
AND PROJECT = :P1_PROJECT
I need to modifiy this to use the function mentioned below retuning the sql .How can i do that?
As mentioned in thread, for project variable p_id, there is application item :PROJECT.
For year and quarter, i have app items A_YEAR AND A_QUARTER.
So function would be something like:
Q_VALUE(:A_YEAR,A_QUARTER, :PROJECT, :P1_DEPT --P1_DEPT is page item for departments
But how do i use this as source of IG?