LOV-Dynamic value selection
I am executing following query for LOV in APEX or HTML DB 2.0
IF :P2_TX_ID IS NOT NULL THEN
RETURN
'SELECT TX_UNIT_NAME
FROM TRANSPLANT_UNIT
WHERE TX_ID=:P_TX_ID';
ELSE
RETURN
'SELECT TX_UNIT_NAME
FROM TRANSPLANT_UNIT
ORDER BY 1';
END IF;
When I run the application, it always goes to ELSE loop as condition is executed when I am runing application. I want first page to be displayed and then I enter value for :p_TX_ID and based on the value of column, I should able get the query set result.
This was very simple in Forms and Reports (D2K or Developer 2000). How to achieve the same in Oracle Apes?