Oracle Apex Menu Based On Table

To create menu based on Table: 

CREATE TABLE  MENUTREE 

   ( CODE            VARCHAR2(10), 
PARENT         VARCHAR2(10), 
TYP               CHAR(1),    ----------- USER TYPE
NAME            VARCHAR2(50), 
ACTIVE          CHAR(1),    ------------ YES / NO
ADMIN           CHAR(1),    ------------ YES / NO
MENUTYP       CHAR(1) DEFAULT '1', ---- TOP, MAIN AND SUB MENU
PERMISSION   CHAR(1), 
PAGEID          VARCHAR2(10)
   );

Copy the following code in menu creation:


select level, 
       NAME label, 
       decode(pageID, null, null, 'f?p=&APP_ID.:'||PAGEID||':&APP_SESSION.')  as target, 
       'NO' is_current,
       '>>' image
from MENUTREE
where ACTIVE='Y'
start with PARENT is null
connect by prior LTRIM(RTRIM(CODE))=LTRIM(RTRIM(PARENT))
order siblings by CODE;




Muhammad Abdullah Al Noor

Muhammad Abdullah Al Noor, An Oracle Apex Consultants and founder of Noors Technology (www.noorstech.com). Core Expertise : Database Administration, Oracle Forms and Reports Development, Oracle Apex Application Designer and Development, Linux Professional etc. Also the owner of TrainerBD Training and OraDemy E-Learning. WhatsApp +8801790721177

Post a Comment

Previous Post Next Post