在 Oracle Application Express 中使用 Select Named LOV 时出现问题

发布于 2024-12-07 20:31:15 字数 600 浏览 1 评论 0原文

我正在使用 Application Express 3.2.1,我有一个应用程序,运行时从数据库中提取这些列:

显示名称、电子邮件地址、电话号码、家庭网络、国家/地区

我想找到一种按国家/地区过滤行的方法,所以我使用以下值定义创建了一个选择命名 LOV:

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

当我为我的应用程序单击“运行”时,我的所有数据都会正确显示,并且我的选择列表会正确填充。但是,当我从选择列表中选择“国家/地区”时,数据不会更改。选择列表也会返回到默认值。我还需要与“选择指定 POV”做其他事情吗?我需要做什么才能使过滤器正常工作?谢谢。

这就是我的 SQL 语句生成页面的样子:

select * from hh_carriers
where
country like :P5_COUNTRY

显示额外值:否
使用的源:仅当会话状态中的当前值为空时
源类型:静态分配(值等于源属性)

编辑:为了清楚起见,更改了一些内容

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

随心而道 2024-12-14 20:31:15

您需要在报告查询的 WHERE 子句中引用选择列表,如下所示:(

where home_network = :p123_home_network

p123_home_network 是选择列表的名称)

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)

像极了他 2024-12-14 20:31:15

您的页面基本上是如何设置的?
它是否归结为:基于您的喜好的类型选择列表顶部的页面项目,以及该区域下的报告区域,以及您根据页面项目进行过滤的查询?

如果是这样,那么让它发挥作用应该不难。就像沃尔夫评论的那样,您需要在更改选择列表中的值后提交页面。它的值需要提交到会话状态,因为这是您的查询过滤器引用的内容。

我不明白的是您的选择列表返回默认值的问题。什么时候会发生这种情况?

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?

倦话 2024-12-14 20:31:15

我的“编辑页面计算”中的“表达式1”需要设置为P5_COUNTRY。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文