APEX – Easy way to fill select list

In APEX 4.0 there is a cool new future to fill child select list with AJAX. Lets do it..

First we create a select list item in a region and name it as DEPARTMENT (In my case P2_DEPARTMENT).

And we configure List of Values section. I just write simple SQL:
SELECT DNAME,DEPTNO FROM DEPT

This first item is the PARENT item. Lets create the child named EMPLOYEE (P2_EMPLOYEE). Our aim is to fill Employee select list depending on selected Department.

In the List Of Values section i just put the SQL which is filtered by selected Department.
SELECT ENAME D, EMPNO R FROM EMP WHERE DEPTNO = :P2_DEPARTMENT

The key point is the Cascading LOV Parameter Item(s) parameter. I just put the Parent select list item’s name to there which means when P2_DEPARTMENT item changed, fill P2_EMPLOYEES depending on Department. :)

Apex is cool to create fast applications.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s