Accessing values from the left hand side of an APEX Shuttle

Accessing values from the left hand side of an APEX Shuttle

In APEX, the value of the shuttle item is a colon delimited string representing the contents of the right hand side.

Consider a shuttle: P1_SHUTTLE below created from the following SQL

When you ask for the value of :P1_SHUTTLE you get a colon delimited string of the Right Hand side (e.g. 7782:7566:7934:7844:7876:7698:7900:7839:7788:7521)

To obtain the left hand side, on submit, the following steps are required:

  1. Ensure the Shuttle uses a Named LOV; in the below example we are going to use a Shuttle called :P1_SHUTTLE and a Named LOV of “LOV_EMP”
  2. Create a “On Submit – After Computations and Validations” Process with the following code
  3. Change the LOV/Items names as appropriate

The above code uses local variables to store the colon delimited strings although you may choose to perform a custom process with the shuttle results.

The SQL consists of:

The LOV rendered as a HTML Select List with the Return Item Extracted through XML functions and converted to a table
The Shuttle Right Hand Side rendered as a table

So basically, the left hand side is “what can be chosen minus what has been chosen”

The results of the above are then aggregated in to a single colon delimited string representing the shuttle left hand side (e.g. 7369:7499:7654:7902)


Matt Mulvaney Contributor
Senior Oracle APEX Development Consultant , Explorer UK Ltd

Matt is an experienced APEX solution designer having designed numerous complex systems using a broad range of Oracle Technologies. Building on his previous experience of Oracle Forms & PL/SQL, he is entirely focused on providing functionally rich APEX solutions. Matt promotes APEX as a software platform and openly shares best practises, techniques & approaches. Matt has a passion for excellence and enjoys producing high quality software solutions which provide a real business benefit.

follow me