Tech, Oracle, user experience, coffee, design standards, and shameless ranting

How to set Oracle Apex Checkbox default value

By Craig Glendenning

As often is the case when I blog about something, I spent waaaaay too much time trying to figure out how to do something that is seemingly very simple. In this case my trivial requirement was to create a single checkbox, that when checked, puts “Yes” in the database, and when unchecked, puts “No” in the database. Here is how to do it:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- Create your Checkbox item.
- Make sure that the following are set in the "List of Values" section of the checkbox item:
 
Named LOV: - Select Named LOV -
Display Extra Values: No
Dynamic Translation: - Not Translated -
Number Of Columns: 1
Display Null: No
Null Display Value:
Null Return Value:
List of values definition: STATIC:;Yes
 
Save these changes, if you made any and then add a computation to the page as follows:
 
Click the "Create" icon.
Choose "Item on This Page"
click next...
 
Compute Item: (The checkbox you want to modify)
Sequence: (choose the default)
Computation Point: After Submit
Computation Type: Static Assignment
click next...
 
Computation: (Value you want to return) for example: No
click next...
 
Condition Type: Value of Item in Expression 1 is NULL
Expression 1: (name of checkbox you want to modify. Example: P1_DATA_FG
click create...

This article was created by Craig Glendenning

I found this article at his Oracle Ramblings web site

Thanks for the tip Craig

Share

You can follow any responses to this entry through the RSS 2.0 feed.

Switch to our mobile site