Teacher: Muhammad Nur E Alam, nurealam.rajjak@gmail.
com WhatsApp: +8801917975575
Apex Collection
By-Muhammad Nur E Alam
Amra EMP_APEX_COLLECTION name ekti table create kore then New ekti apex form create kore, sei
ager er item a data diye seta apex collection a nibo then ei apex collection theke ekta report dekhabe
ei same form pager er ekta new region a, then ei APEX_COLLECTION data oi EMP_APEX_COLLECTION
table insert save korbo.
Page 1 of 7
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
Database Table:
==============
create table apex_collection_ddd60
(
id number,
name varchar2(50),
salary number,
join_date date
);
Page 2 of 7
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
Apex Collection
Entry Form Naamee ekti Region niye sekhane ekti Button nibo. Button Name: Go_To_Apex_Collection
Ei Go_To_Apex_Collection Button a ekti Dynamic Action create korbo.
Dynamic Action:
==============
Name : Apex_Collection_DA
When :
Event: Click
Select Type: Button
Button: Go_To_Apex_Collection
True Action:
===========
Action: Execute Server-Side Code
===========
PL/SQL Code:
===============================
BEGIN
--- Create Apex_Collection ---
if not apex_collection.collection_exists('EMP_AC') then
apex_collection.create_collection('EMP_AC') ;
end if ;
------------------------------
apex_collection.add_member
(
p_collection_name => 'EMP_AC',
p_c001 => :P5_ID,
p_c002 => :P5_NAME,
p_c003 => :P5_SALARY,
p_c004 => :P5_JOIN_DATE
);
END ;
===============================
Page 3 of 7
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
Item to Submit: Collection er sob item e lov theke select kore dite hobe:
Like: P5_ID,P5_NAME,P5_SALARY,P5_JOIN_DATE
Then Dynamic action er vitore r akta True action create korte hobe:
=========================================================
Action: Clear
Selection Type : Items
Item : P5_ID,P5_NAME,P5_SALARY,P5_JOIN_DATE
@@@@@@@@@@@@@@@@@@@
Apex Collection Report:
Identification > Type: Classic Report
-------------------------------------------------
SELECT SEQ_ID SL#, C001 ID, C002 Name, C003 salary, C004 join_date
FROM APEX_COLLECTIONS
WHERE COLLECTION_NAME = 'EMP_AC' ;
Note:
And QUANTITY,PRICE,TOTAL_UNIT_PRICE Column Alignment Right Kore dibo
And Format Mask Dibo: 99,99,99,99,999.99 --(Only Report er Column a e Format Mask dite hobe
Form er Item a Format Mask na deowa valo for Apex Collection)
Then oije ager banao Collection er Dynamic action er vitore r akta True action create korte hobe:
=================================================================================
Action: Refresh
Selection Type: Region
Region : oi report er region er name ti dhoriye dite hobe.
Page 4 of 7
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
Report er niche Total dekhte chaile:
##############################
Report er Attributes er:
Break Formatting:
Report Sum Label: Total
Then Quantity and Total Unit Price er column er property
Advanced :
Compute Sum: aita on kore dibo
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Report er data save korer jonno akta process nite hobe:
Report Region a Ekti Button Create korbo, Button Name: Save_Apex_Collection_Data_to_Table
Save_Apex_Collection_Data_to_Table Button er Property tegiye
Behavior:
Database Action: SQL Insert Action
Process ta After Submit hobena,
Just Process er moddhe e Hobe:
PL/SQL Code:
------------------
=================================================
BEGIN
if not apex_collection.collection_exists('EMP_AC') then
apex_collection.create_collection('EMP_AC') ;
end if;
insert into APEX_COLLECTION_DDD60(id, name, salary, join_date)
select C001, C002, C003, C004
FROM APEX_COLLECTIONS
WHERE COLLECTION_NAME= 'EMP_AC' ;
commit ;
apex_collection.truncate_collection(p_collection_name => 'EMP_AC') ;
END ;
===================================================
Page 5 of 7
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
Then Server-side Condition
When Button Pressed:
Save_Apex_Collection_Data_to_Table select kore dibo
@@@@@ End of Apex_Collection @@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Built-In Database Package: apex_collection
====================================
sqlplus / as sysdba
desc apex_collection ;
apex_collection.ADD_MEMBER(P_COLLECTION_NAME, P_C001) ;
SQL> desc apex_collection
PROCEDURE ADD_MEMBER
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
P_COLLECTION_NAME VARCHAR2 IN
P_C001 VARCHAR2 IN DEFAULT
P_C002 VARCHAR2 IN DEFAULT
P_C003 VARCHAR2 IN DEFAULT
P_C004 VARCHAR2 IN DEFAULT
P_C005 VARCHAR2 IN DEFAULT
P_C006 VARCHAR2 IN DEFAULT
P_C007 VARCHAR2 IN DEFAULT
P_C008 VARCHAR2 IN DEFAULT
P_C009 VARCHAR2 IN DEFAULT
P_C010 VARCHAR2 IN DEFAULT
P_C011 VARCHAR2 IN DEFAULT
P_C012 VARCHAR2 IN DEFAULT
P_C013 VARCHAR2 IN DEFAULT
P_C014 VARCHAR2 IN DEFAULT
P_C015 VARCHAR2 IN DEFAULT
P_C016 VARCHAR2 IN DEFAULT
P_C017 VARCHAR2 IN DEFAULT
P_C018 VARCHAR2 IN DEFAULT
P_C019 VARCHAR2 IN DEFAULT
P_C020 VARCHAR2 IN DEFAULT
P_C021 VARCHAR2 IN DEFAULT
P_C022 VARCHAR2 IN DEFAULT
Page 6 of 7
Youtube Channel: https://www.youtube.com/@muhammadnurealam
Teacher: Muhammad Nur E Alam, [email protected] WhatsApp: +8801917975575
P_C023 VARCHAR2 IN DEFAULT
P_C024 VARCHAR2 IN DEFAULT
P_C025 VARCHAR2 IN DEFAULT
P_C026 VARCHAR2 IN DEFAULT
P_C027 VARCHAR2 IN DEFAULT
P_C028 VARCHAR2 IN DEFAULT
P_C029 VARCHAR2 IN DEFAULT
P_C030 VARCHAR2 IN DEFAULT
P_C031 VARCHAR2 IN DEFAULT
P_C032 VARCHAR2 IN DEFAULT
P_C033 VARCHAR2 IN DEFAULT
P_C034 VARCHAR2 IN DEFAULT
P_C035 VARCHAR2 IN DEFAULT
P_C036 VARCHAR2 IN DEFAULT
P_C037 VARCHAR2 IN DEFAULT
P_C038 VARCHAR2 IN DEFAULT
P_C039 VARCHAR2 IN DEFAULT
P_C040 VARCHAR2 IN DEFAULT
P_C041 VARCHAR2 IN DEFAULT
P_C042 VARCHAR2 IN DEFAULT
P_C043 VARCHAR2 IN DEFAULT
P_C044 VARCHAR2 IN DEFAULT
P_C045 VARCHAR2 IN DEFAULT
P_C046 VARCHAR2 IN DEFAULT
P_C047 VARCHAR2 IN DEFAULT
P_C048 VARCHAR2 IN DEFAULT
P_C049 VARCHAR2 IN DEFAULT
P_C050 VARCHAR2 IN DEFAULT
P_N001 NUMBER IN DEFAULT
P_N002 NUMBER IN DEFAULT
P_N003 NUMBER IN DEFAULT
P_N004 NUMBER IN DEFAULT
P_N005 NUMBER IN DEFAULT
P_D001 DATE IN DEFAULT
P_D002 DATE IN DEFAULT
P_D003 DATE IN DEFAULT
P_D004 DATE IN DEFAULT
P_D005 DATE IN DEFAULT
P_CLOB001 CLOB IN DEFAULT
P_BLOB001 BLOB IN DEFAULT
P_XMLTYPE001 XMLTYPE IN DEFAULT
P_GENERATE_MD5 VARCHAR2 IN DEFAULT
@@@@@ End of Built-In Database Package & Apex Collection @@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Page 7 of 7
Youtube Channel: https://www.youtube.com/@muhammadnurealam