3 Replies Latest reply on Apr 3, 2014 9:47 PM by Jorge Rimblas

    Dynamic Shuttle Source


      Hey how do you dynamically change the shuttle values based on a user changing the value of a select list? I have been playing with it all day, Cascading LOVs work if you want the left side possible values changed, but we want the right side selected values changed.I have tried various dynamic actions, including constructing the A:B:C:D string for the shuttle. More details on the example below


      LOV for shuttle:

      Select item_name, item_key from menu_items;


      Source for shuttle:

      Select item_key where menu_profile=:PXX_SELECT_LIST;


      So if all possible values are A,B,C,D,E,F,G.


      Profile 1 on the right would have A,B,C and on the left, D,E,F,G while Profile 2 has the opposite, or what not. Any ideas or advice would be appreciated.


      I found this which is very similar to what I want but the post just had a link and no explanation of how it is done. http://apex.oracle.com/pls/apex/f?p=579:46

        • 1. Re: Dynamic Shuttle Source
          Jorge Rimblas

          What's your APEX version?



          Did you try the Set Value action on a Dynamic Action?

          Or if you need it in your own code then use the $s("ITEM", "VALUE") call.




          • 2. Re: Dynamic Shuttle Source

            We are running Apex 4.2, and I tried both the Set Value and the Execute PL/SQL option and a couple combos of these two. I gave up after making sure that the dynamic action changes a text field with the return value of the select list and then tried to use that text field in the query. It says that nothing is returned in the query, which is false outside of apex and in the database itself with the same query.


            The only thing I can think of is the bind variable. We are using "where menu_profile:PXX_ITEM_KEY" currently in the query

            • 3. Re: Dynamic Shuttle Source
              Jorge Rimblas

              If you're Executing PL/SQL to change the value, then make sure your Shuttle item is specified in the Page Items to Return field.


              Then only other thing I could suggest is to setup an example in apex.oracle.com and provide login credentials so that me or someone can log in and take a look.


              With Javascript I was able to set the shuttle using a call like this:

              $s("P22_S", "KING:BLAKE")


              PL/SQL call from a DA also works great.

              My PL/SQL code was:


              :P22_S := 'KING:BLAKE';


              And then P22_S in the Page Items to Return field.