Oracle APEX Tutorial 5 – Check Boxes – Part 2 – Video Training
Filed Under Technical Tips // Tags: oracle apex, video training
Introduction
Within APEX, there are a multitude of things you can use Check Boxes for, and many ways they
can be used to improve your application. This tutorial will focus on some of the things you can
use them for, as well as how to set thier properties to make them work for you, not against you.
We reccomend you review our article APEX Tutorial Preparation and OEHR Sample Data Install if
you haven’t already, as this tutorial requires the OEHR Sample Data to work properly.
Part 1 - Multi Value Check Boxes and Adding Check Boxes
High Level Steps
1) Create Multi Vaule Check Boxes. (0:30)
2) Add Check Boxes to Each Row. (4:50)
Times in parenthesis are the approximate start times for those steps
Notes and Resources
Multi Value Boxes
What we are doing ius creating a set of multi valued check boxes to serve as a way to filter
the returned data by category. Check boxes give us the flexibility to pick just what we want,
and not be limites to a single choice or preset combination.
Computation Explained
We create an odd computation and the purpose isn’t very clear. What we are doing is closing a
logic loophole in the behaviour of the check boxes. If you were to deselect all the check boxes,
all the products woudl be listed, instead of none, due to how the logic works (deseleted means
NULL< which means revert to default, which is Y, thus it’s on, even if off). By putting in this
computation, it essentially forces the system to remember the state of the check boxes.
APEX_ITEM
The APEX_ITEM is part of the system supplied packages that allow you to dynamically add certain
items as the page is processed. In this case, we are using it to create a ‘delete’ checkbox for
each displayed row.
Code and Entered Text
Label, Source Value and LOV for P1_REPORT_SEARCH
Product STATUSobsolete:orderable:planned:under development
SELECT DISTINCT product_status display_value, product_status return_value FROM oehr_product_information ORDER BY 1
Below is the new WHERE clause for the Product Report Source SQL Query
WHERE instr(':'||:P1_REPORT_SEARCH||':',product_status)> 0
Computation and Expression 1 for P1_REPORT_SEARCH
none(bogus_value)
P1_REPORT_SEARCH
Form Element for P1_REPORT_SEARCH
class="fielddatabold"
New line to be added to the Region Source SQL Query for the Product Report Region
apex_item.checkbox(1,product_id) del,
Below is the PL/SQL code for the Delete Products Process
FOR i IN 1..APEX_APPLICATION.G_F01.count LOOP DELETE FROM oehr_product_information WHERE product_id = APEX_APPLICATION.G_F01(i); END LOOP;
Sucess and Fail messages for the Delete Products Process
Product(s) deleted.
Unable to delete product(s).
Related Information:
- Oracle APEX Tutorial 5 – Check Boxes – Part 1 – Video Training
Within APEX, there are a multitude of things you can use Check Boxes for, and many ways they can be...
- Oracle APEX Tutorial 8 - Up and Downloading Files - Part 1 - Video Training
Reports and data entry constitue the bulk of what most of these tutorials cover, and what many businesses need. However,...
- Oracle APEX Tutorial 4 – Form Layout – Part 1 – Video Training
APEX gives you a lot of power and flexibility with its built in wizards. They are very good at creating...
- Oracle APEX Tutorial 4 – Form Layout – Part 3 – Video Training
APEX gives you a lot of power and flexibility with its built in wizards. They are very good at creating...
- Oracle APEX Tutorial 3 - Drilldown Report Part 1- Video Training
This tutorial covers section 4 of the Oracle APEX Advanced Tutorials, Creating a drilldown report...
- Oracle APEX Tutorial 2 - Parameterized Report Part 2 - Video Training
This Tutorial is a guided walkthrough of section 3 of the Oracle APEX Advanced Tutorials....
- Oracle APEX Tutorial 3 - Drilldown Report Part 2- Video Training
This tutorial covers section 4 of the Oracle APEX Advanced Tutorials, Creating a Drilldown Report...
- Oracle APEX Tutorial 6 – A Web Service – Part 2 – Video Training
As the world moves forward, there is a higher need for more information. However, it is a near impossible task...
