如何将新的PK传递给Oracle Apex中的存储proc [英] How to pass new PK to stored proc in Oracle Apex

查看:83
本文介绍了如何将新的PK传递给Oracle Apex中的存储proc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有您的标准Oracle apex页面来创建/编辑/删除记录.

I have your standard Oracle apex page to create / edit / delete a record.

现在我想在创建新记录时调用存储的proc(仅在INSERT上,而不是更新/删除),因此我在页面上创建了一个Process并将其绑定到create按钮.

I now wanted to call a stored proc when a new record is created (only on INSERT, not update/delete), so I created a Process on the page and tied it to the create button.

到目前为止一切都很好....它调用了存储过程,正如我放入其中的调试消息所验证的那样.但是,我想将作为新记录的一部分创建的新PK传递给存储的proc.但是它收到的是空值.

All is well so far....it calls the stored procedure as expected as verified by the debug messages I put in there. However, I wanted to pass the new PK created as part of the new record to the stored proc. However it is receiving null.

我创建的过程设置为运行提交时-计算和验证后",我认为这是正确的.

The process I created is set to run "On Submit - after Computations and Validations" which I think is right.

有人可以建议为什么我可能没有得到新钥匙吗?那时表单处理仍不可用吗?

Can someone suggest why I might not be getting the new key? Is it still not available yet at that point in the form processing?

任何帮助表示赞赏.

推荐答案

如果使用标准Apex表格上的表单",则可以设置Process Row of ...进程的Return Key into Item属性以指定页面将使用插入的行的PK填充的项目:

If you are using a standard Apex "form on a table", then you can set the Return Key into Item property of the Process Row of ... process to specify a page item that will get populated with the PK of the inserted row:

然后您可以在过程调用中引用该项目.

You can then reference the item in your procedure call.

这篇关于如何将新的PK传递给Oracle Apex中的存储proc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆