Discussions
Categories
- 197.1K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.7K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.3K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 466 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
How to do a simple Yes/No Checkbox

We are on APEX 21.1
I have a form that has a checkbox that uses the default Y/N.
When the user selects the checkbox, I see in the session state that it is changed from N to Y.
If the user changes their mind (before saving) and unselects the checkbox, the session state shows that the flag is still a Y.
How do I get the session state to recognize that it has been changed back to the original values?
When the checkbox is selected, there is a dynamic action to set other fields. If they unselect the checkbox, I need to set the values back to the original values.
Answers
-
You can check the checkbox value using client-side condition to check whether the value is Y/N.
-
I am checking the checkbox value using a client-side condition to check whether the value is Y/N.
I have two Dynamic Actions using the client-side condition.
When the user selects Y the first time, the flag in the session state changes from N to Y. When it is a Y it populates other fields on the page dynamically.
If the user changes their mind after selecting Y and the other fields gets populated (before doing a save), then unselects the flag, the session state remains Y. The dynamic action for when the client-server is N is never executed.
-
The dynamic action for when the client-server is N is never executed.
There is something wrong with your DA that it does not fire when the value is changed back to N. We cannot see your DA, so it is hard to say, maybe the client side condition. Debug your code!
-
InoL I am a new APEX developer. I am still trying to learn how to debug my code.
I am testing a condition where the user selects the completed flag, The flag in the session state and Page Items changes from N to Y (which you see when you click on Session). All of the true actions in the first Dynamic Action Settings are executed.
If the user changes their mind after selecting , then unselects the flag, the session state and Page Items remains Y. The dynamic action for when the client-server is N is never executed.
There are two Dynamic Action Settings is on P16_ASSIGNEE_COMPLETE_FLAG
The first Dynamic Setting contained the following. All True Actions under this worked. No False Actions worked
Event: Change
Selection Type: Items(s)
Items(s) P16_ASSIGNEE_COMPLETE_FLAG
Client-side Condition: Item= Value
Item: P16_ASSIGNEE_COMPLETE_FLAG
Value: Y
The Second Dynamic Setting contained the following. No actions worked under this.
Event: Change
Selection Type: Items(s)
Items(s) P16_ASSIGNEE_COMPLETE_FLAG
Client-side Condition: Item= Value
Item: P16_ASSIGNEE_COMPLETE_FLAG
Value: N
You mentioned, The dynamic action for when the client-server is N is never executed. Is it never executed because N was the original value?