在外部包中使用 APEX_CUSTOM_AUTH.APPLICATION_PAGE_ITEM_EXISTS – APEX 21.2

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

Using APEX_CUSTOM_AUTH.APPLICATION_PAGE_ITEM_EXISTS in external Package - APEX 21.2

问题

我有一个页面,其中包含以下页面项目,:P10_ACCOUNT_CHANGED_FLAG,并不总是在页面上呈现(使用服务器端条件)。我有一个外部包引用了这个页面。

我试图检查页面项目是否存在。如果存在,然后将表单值设置为包中的全局变量g_changed_flag。如果不存在,则将默认值设置为'N'

我尝试使用以下代码:

l_page_item_exists := apex_custom_auth.application_page_item_exists(:P10_ACCOUNT_CHANGES_FLAG);

if l_page_item_exists then
  g_change_flag := v('P10_ACCOUNT_CHANGES_FLAG');
else
  g_change_flag := 'N';
end if;

但它抛出以下错误:

PLS-00049: bad bind variable 'P10_ACCOUNT_CHANGES_FLAG'

有什么建议吗?

英文:

I have a page where the following page item, :P10_ACCOUNT_CHANGED_FLAG, is not always rendered on the page (using Server Side condition). I have an external package that references this page.

I am trying to check for the existence of the page item. If it exists, then set form value to a global package variable, g_changed_flag in the package. If not, then default value to 'N'.

I was trying to use:

l_page_item_exists := apex_custom_auth.application_page_item_exists(:P10_ACCOUNT_CHANGES_FLAG);

if l_page_item_exists then
  g_change_flag := v('P10_ACCOUNT_CHANGES_FLAG');
else
  g_change_flag := 'N';
end if;

But it throws the following error:

PLS-00049: bad bind variable 'P10_ACCOUNT_CHANGES_FLAG'

Any advice?

答案1

得分: 2

l_page_item_exists := apex_custom_auth.application_page_item_exists('P10_ACCOUNT_CHANGES_FLAG');

英文:

You're looking for an item, not its value.

Try

l_page_item_exists := 
  apex_custom_auth.application_page_item_exists('P10_ACCOUNT_CHANGES_FLAG');

instead.

huangapple
  • 本文由 发表于 2023年2月8日 21:46:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/75386722.html
匿名

发表评论

匿名网友

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

确定