0
votes

I am using Application Express 3.2.1 and I have an application that when run pulls these columns from a database:

Display Name, Email Address, Phone Number, Home Network, Country

I want to make a way to filter the rows by Country, so I created a Select Named LOV with this values definition:

select name d, name v
from 
(
    select distinct(country) name
    from hh_carriers 
)

When I click "Run" for my application, all my data is displayed correctly and my select list populates correctly. However, when I select a "Country" from my select list, the data doesn't change. The select list also goes back to the default value. Is there something else I have to do with the Select Named POV? What do I have to do to make the filter work? Thanks.

This is what my SQL statement looks like to generate my page:

select * from hh_carriers
where
country like :P5_COUNTRY

Display Extra Values: No
Source Used: Only when current value in session state is null
Source Type: Static assignment (value equals source attribute)

Edit: Changed some things for clarity

3
You will need to add a button to submit the page. On submit, your LOV selected value will be posted for use in your page process. If you want the page to submit on change automatically, you'll need to add a dynamic action or a bit of javascript.Wolf

3 Answers

0
votes

You need to reference the select list in the WHERE clause of the report query something like this:

where home_network = :p123_home_network

(p123_home_network being the name of the select list)

0
votes

How is your page set up basically? Does it boil down to: a page item on top of type select list, based on your lov, and a report region under that, with the query where you filter based on your page item?

If so, then it shouldn't be that hard to get it to work. Like Wolf commented, you will need to submit the page after you changed the value in your select list. Its value needs to be submitted into session state, since that is what your query filter is referencing.

What i don't get is your issue with the select list going back to default value. At what point does this happen?

0
votes

My "Expression 1" in my "Edit Page Computation" needed to be set to P5_COUNTRY.