Apex Shuttle Extender Key LOV

So you really like the Apex shuttle menu with its ease of selecting and ordering multiple values. The difficulty comes when you have a large number of values and the user has difficulty scrolling through the list trying to find the value they want. One solution is to use have a basic set of values in the shuttle item and use the Shuttle Extender plugin to add additional values. Great, but this only works where the user is able to freetext values and the display value is the same as the return value. My requirement was to be able to get the same effect using a Popup Key LOV to extend the shuttle list, and this is how I did it:

1. Create a Shuttle Item P44_SHUTTLE with a basic set of values e.g.

SELECT ename, empno FROM emp WHERE empno > 7782

However the extended shuttle menu will inevitably contain values that are not in the basic lov. Using the Display Additional Values, will only display the return value and not the display value. To get around this, UNION onto the end of the lov query a SELECT that will return the additional values entered.

Note the use of the split item function to convert the colon separated list into a table. The creation of this table function is described here.

SELECT ename,
FROM emp,
WHERE empno = column_value

2. Crate another item of type POPUP KEY LOV, P44_SHUTTLE_EXTENDER, with an lov query that contains the full set of values.

SELECT ename, empno FROM emp WHERE empno <= 7782

3. In the Shuttle Extender item set the following.

Post Element Text =>

<a href="javascript:f_shuttle_popup('P44_SHUTTLE_EXTENDER','P44_SHUTTLE');"> Add</a>

HTML Form Element Attributes =>


4. Add the following code to the Function and Global Variable Declaration of the Page