Oracle APEX Tutorial 5 – Check Boxes – Part 2 – Video Training

By M&S Consulting (Kevin) on Aug 6th, 2009
Filed Under Technical Tips // Tags: ,

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

YouTube Preview Image

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 STATUS
obsolete: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)&gt; 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).
Bookmark and Share

Related Information:

  1. 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...
  2. 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,...
  3. 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...
  4. 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...
  5. 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...
  6. 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....
  7. 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...
  8. 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...

Leave a Reply


Archives

Recent Comments

  • Kavitha Muniraj said: Hi, Could you please send a script which checks the status of forms and reports of oracle...
  • Siddharth said: Hey thanks a lot !! Have been lookin all over for this :) My PC may not be able t handle FlashBuilder...
  • Cyrex said: Hey man why I cant install Apex 4? is there anyone can help me.,?
  • sharanabasava said: ALTER TABLE [my_table_name] RENAME COLUMN [current_column_name] TO [new_column_name]; Sir,I...
  • Huub Vankan said: Thanks for this easy solution. Indeed strange that is does not work in the (x86) folder….

Calendar

July 2010
M T W T F S S
« Jun    
 1234
567891011
12131415161718
19202122232425
262728293031  

Featured Testimonial

"M&S has taken 'partnership' to a new level. They are not only a deeply skilled service provider, the M&S team is actually a mission critical component to our operations, taking on new initiatives as well as maintaining custom, open source, and COTS solutions."

CEO, MedPivot

Free SQL Service