Header Ads

Header ADS

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 in Oracle Apex


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,ID 
from ROLE_INFO
order 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,ID 
from MENU_INFO
order 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,':')))
         LOOP
         FOR z in (select * from table(apex_string.split(:P10_ROLE_NAME,':')))
         LOOP

INSERT 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











No comments

Theme images by Deejpilot. Powered by Blogger.