我有一个带有 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”。 有人知道我做错了什么吗?
谢谢
找到解决方案,将其添加到产品查询中:
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')
谢谢你帮我解决了问题