英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论