Oracle APEX 互动网格从另一张表中提取记录。

huangapple go评论48阅读模式
英文:

oracle apex interactive grid fetch records from another table

问题

我正在使用Oracle APEX 21.2,在页面上创建了两个区域:

一个是表单区域,另一个是交互式网格区域。

在表单区域中,我有一个名为TPORDER_NO的页面项和一个名为GetValue的按钮。

交互式网格区域基于表Detail_ReadyStock,该表具有列Porder_no, Porder_Date, b_code, p_code, sku_code, ps_code, and box_qty.

我还有一个名为PendingProdOrder的视图,其中包含与Detail_ReadyStock表相同的列:Porder_no, Porder_Date, b_code, p_code, sku_code, ps_code, and box_qty. 此视图存储多条记录。

我的要求是,当我在TPORDER_NO页面项中输入一个值,然后单击GetValue按钮时,应该在交互式网格区域中显示所有Porder_no等于页面项值的视图(PendingProdOrder)中的记录。

我将不胜感激地接受有关如何实现这一目标的任何指导。

提前致谢。

尝试了许多方法但未能成功。

英文:

I am working with Oracle APEX 21.2 and have created two regions on a page:

one is a form region and the other is an Interactive Grid region.

In the form region, I have a Page Item named TPORDER_NO and a Button named GetValue.

The Interactive Grid region is based on the table Detail_ReadyStock, which has columns Porder_no, Porder_Date, b_code, p_code, sku_code, ps_code, and box_qty.

I also have a view called PendingProdOrder that contains the same columns as the Detail_ReadyStock table: Porder_no, Porder_Date, b_code, p_code, sku_code, ps_code, and box_qty. This view stores multiple records.

My requirement is that when I enter a value in the TPORDER_NO Page Item and click the GetValue Button, it fetch all records from View (PendingProdOrder) where Porder_no=PageItem should be displayed in the Interactive Grid region.

I would appreciate any guidance on how to achieve this.

Thank you in advance.

Tried many things but not able achieve.

答案1

得分: 1

  • 将交互式网格的 "Where clause" 属性设置为

    porder_no = :TPORDER_NO

  • TPORDER_NO 放入 "Page items to submit" 交互式网格的属性中

这就是全部内容;当您输入值到 TPORDER_NO 项目并点击按钮时,它将提交页面并导致交互式网格刷新,使用输入到页面项目的值作为筛选条件,仅检索满足 where 条件的行。

英文:
  • set interactive grid's "Where clause" property to

    porder_no = :TPORDER_NO
    
  • put TPORDER_NO into "Page items to submit" interactive grid's property

That's all; when you enter value into TPORDER_NO item and push the button, it'll submit the page and cause interactive grid to refresh, using value entered into the page item as a filter which will retrieve only rows that satisfy the where condition.

答案2

得分: 1

@Littlefoot已经回答得很正确,但是该解决方案需要页面提交。您没有说明是否要提交表单,如果不想提交,可以使用动态操作来实现此功能。

要配置它:

  • 将交互式网格的“Where clause”属性设置为
porder_no = :TPORDER_NO
  • TPORDER_NO放入交互式网格的“Page items to submit”属性中

  • 将按钮(GetValue)操作设置为“由动态操作定义”

  • 创建一个动态操作,以在单击按钮GetValue时执行动作“刷新”,选择类型为“Region”,区域为您的交互式网格。

英文:

@Littlefoot has answered correctly, however, that solution requires a page submit. You have not said if you want to submit the form so if you don't want to submit you can achieve this functionality using a dynamic action.

To configure that

  • set interactive grid's "Where clause" property to
        porder_no = :TPORDER_NO
  • put TPORDER_NO into "Page items to submit" interactive grid's property

  • Set the button (GetValue) action to "Defined by Dynamic Action"

  • Create a dynamic action on click of button GetValue with a true action of action "Refresh", selection type "Region", Region: your interactive grid.

huangapple
  • 本文由 发表于 2023年5月17日 20:25:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/76272086.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定