Filtering on LOV by Apex Page Item - Resolved
Shra1Feb 16 2010 — edited May 18 2010Following Issue has been resolved...
Finally I could find a way to resolve this issue...I created a new page-0 item for phone_id and initialized it with the Page 11 site_id value always (p0_site_id source tab data source initialize to application item and simply type P11_SITE_ID in the data source)...Used the p0_phone_id as the filter on my named LOV...The query works as expected now.
Hi, I have a page item with a Named LOV attached to it..The following query is the driving query for the named-lov..However, I need to apply further filter on the LOV to narrow the list to a value of a page item - :P11_SITE_ID - But the LOV doesn't return any rows..I tested the entire query outside at SQL> by hard-coding the value of :P11_SITE_ID and it returns the expected rows with the filter.
When I arrive at Page 11, I'm setting the value of :P11_SITE_ID from the invoking page. I printed the initialized value of :P11_SITE_ID on Page 11 and it does show the assigned value (from the originating interactive report page link column that's invoking this page).
This LOV is on Page 11 - phone_id column set as "select list (named lov)".
-Named lov SITE_ASSIGNED_PHONES_LOV query sql below...
*<code>*
SELECT phone_number d, phone_id r
FROM phones p
WHERE phone_id IN
(SELECT s.phone_id
FROM site_phones_assigned s
WHERE s.site_id = :P11_SITE_ID
)
ORDER BY 1;
*</code>*
The above LOV query doesn't filter on the :P11_SITE_ID value..LOV doesn't return any values on Page11. However, for testing, if I remove the :P11_SITE_ID filter, all site-phones-assigned values are displayed on the phone_id lov during runtime.
Please advice, how one can apply a page-item filter on a named-lov.
Thank you
-Shravan
Edited by: Shravan_Kumar on Feb 21, 2010 11:33 AM
Edited by: Shravan_Kumar on Feb 21, 2010 12:18 PM