【问题标题】:Oracle Apex Interactive Grid - LOV CascadeOracle Apex 交互式网格 - LOV 级联
【发布时间】:2023-01-11 09:42:32
【问题描述】:

我有一个带有 2 个选择列表列 (LOV) 的交互式网格:

Type_of_food    Product

根据客户要求,两者都有自己的独立表格,如下所示:

Type_of_food    type_of_food_Id
Fruit           123
Vegetable       456
Snack           789

Product         Product_Id   type_of_food_Id
Apple           ABC          123
Banana          DEF          123
Onion           GHI          456
Kale            JKL          456
Cookies         MNO          789

所以基本上,当用户从下拉列表中选择水果时,下一列(产品)将更新为属于该类别的产品。 我的 Type_of_food 列查询是:

select distinct
type_of_food d,
type_of_food r
from type_of_food_table

虽然我的产品列查询是:

select distinct
Product r,
Product g
from Product_table
left join type_of_food_table on type_of_food_table.type_of_food_id = 
Product_table.type_of_food_id

LOV 都显示 Type_of_food 和 Product Items,当我选择 Type_of_food 时,Product Column 得到刷新。问题是,它不会使用正确的值进行刷新(例如,如果我选择 Fruits,它将显示所有产品,而不管类型如何)。 我的产品列启用了“级联值列表”,其中“父列”=“Type_of_food”。 任何人都知道我做错了什么?

谢谢

【问题讨论】:

    标签: oracle oracle-apex


    【解决方案1】:

    找到解决方案,将其添加到产品查询中:

    select distinct
    Product r,
    Product g
    from Product_table
    left join type_of_food_table on type_of_food_table.type_of_food_id = 
    Product_table.type_of_food_id
    --getting the select list column (product) value:
    where type_of_food_table.type_of_food = v('type_of_food_select_list_column')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-10
      • 1970-01-01
      • 2020-02-22
      • 1970-01-01
      • 1970-01-01
      • 2019-01-26
      • 1970-01-01
      相关资源
      最近更新 更多