oracle - Oracle APEX show button when multiple conditions are met
问题描述
I have a couple of dropdowns on my page, a hidden item and a button.
Whenever user changes the value of P1_DD1 or P1_DD2, I need to show the button if one of the following met:
1) If P1_HIDDEN='YES' and both P1_DD1 and P1_DD2 are not null
or
2) If P1_HIDDEN='NO' and P1_DD1 is not null
what is the best way to do this?
I originally added dynamic actions to both P1_DD1 and P1_DD2 on change and for P1_DD1 add set Client-side condition to Item IS NOT NULL and set the item to P1_DD1 and Server-side condition PL/SQL Ex[pression: :P1_HIDDEN='NO'
that works fine. The issue is with P1_DD2. I tried using similar logic - add client-side condition where P1_DD2 is not null and then add server-side condition PL/SQL Expression :P1_HIDDEN='YES' AND P1_DD1 IS NOT NULL
but nothing happens. Trying to figure out why that is. Or, perhaps, there is a better way to do this?
解决方案
1 - 尝试在这些项目更改时创建动态操作(P1_HIDDEN、P1_DD1、P1_DD2)。
2 - 客户端条件 >> Javascript 表达式
((apex.item('P1_DD1').getValue() != '') &&
(apex.item('P1_DD2').getValue() != '') &&
(apex.item('P1_HIDDEN').getValue() == 'YES'))
||
((apex.item('P1_DD1').getValue() != '') &&
(apex.item('P1_HIDDEN').getValue() == 'NO'))
3 - 真正的行动>>显示你的按钮>>在页面加载时启用执行
4 - 错误操作>>隐藏您的按钮>>在页面加载时启用执行
推荐阅读
- typescript - TypeScript:从 JSON 反序列化到有区别的联合
- r - 使用 geom_sf 绘制基于点的内核映射
- c++11 - 在下面的例子中,指针 p 从哪里获取信息?
- machine-learning - 如何在 Keras 模型中拆分输入
- javascript - 删除 csv 文件中的每一行
- javascript - 如何用scrollmagic滚动效果?
- c# - 没有通过 RestSharp 调用发送 OAuth2 Bearer Token
- reactjs - 如何将属性传递给 React 函数组件?
- javascript - 防止超链接在新选项卡/窗口中打开
- javascript - jQuery 选择器性能:Safari