Shuttle Item in Oracle Apex
Shuttle Item in Oracle Apex
Topic Introduction: The shuttle Item in Oracle Apex is a list item with a multi-select option. It has two boxes Left and Right containing lists. The left box shows the source of the lists and the right side shows the selected list or values from the left side. Selected values are stored in a single colon-delimited string. In this tutorial, we will learn how to create a shuttle item and its using process in Oracle Apex forms. Here I will give an example of some menu permission given to a role
Shuttle Item Create on Oracle Apex
1. Create a page
2. Create a region
3. Create 2 Page item 
4. Go to 1st Item Properties
- Identification
 
        Name: P10_ROLE
        Type: Shuttle
- List of Values
 
        Type: SQL Query
        SQL Query: Write SQL for the role list
select ROLE_NAME,IDfrom ROLE_INFOorder by 1
5. Go to 2nd Item Properties
- Identification
 
        Name: P10_MENU
        Type: Shuttle
- List of Values
 
        Type: SQL Query
        SQL Query: Write SQL for the menu list
select MENU_NAME,IDfrom MENU_INFOorder by 1
Insert Process Using Shuttle Item on Oracle Apex
1. Create a process
2. Go to Process Properties
- Identification
 
        Name: Give a name if you want
        Type: Execute Code 
- Source
 
        Location: Local Database
        Language: PL/SQL
        PL/SQL Code: write an insert for inserting data on the table
FOR i in (select * from table(apex_string.split(:P10_MENU_NAME,':')))LOOPFOR z in (select * from table(apex_string.split(:P10_ROLE_NAME,':')))LOOPINSERT INTO MENU_PERMISSION (MENU_ID, SEC_ROLE_ID)VALUES (i.COLUMN_VALUE, z.COLUMN_VALUE);END loop;END loop;
- Server-side Condition
 
        When Button Pressed: Select the Button by which the button using wants to process run/execute
.png)
No comments