How do you populate right side of Shuttle control

Hi,
I am trying to use shuttle control. I am not sure how to populate the right side of the shuttle control from database. I am using the following code. But, it is not populating the right side. In this code, P35_COUNTRIES is my shuttle. P35_X is a text field just to test the output. I can see an output 5:8:9 in the text field. But, my shuttle right side is empty. Am I doing something wrong here ? I would really appreciate any suggestions.
DECLARE
vCountries VARCHAR2(100);
vSEP VARCHAR2(1);
BEGIN
:P35_X := 'Inside test';
vCountries := '';
FOR C IN (SELECT country_id FROM countries WHERE territory_id = 1)
LOOP
vCountries := vCountries || vSEP || c.country_id;
:P35_X := vCountries;
vSEP := ':';
END LOOP;
:P35_COUNTRIES := vCountries;
:P35_X := vCountries;
END;
Thanks

Hi,
Yes, it is getting populated: [http://apex.oracle.com/pls/otn/f?p=30879:5]
My Source settings for the shuttle ("P5_SHUTTLE") are:
Source Used: Only...
Source Type: Static Assignment...
Source Value: (Blank)
Post Calc Computation: (Blank)
Default Value: (Blank)
List of Values Definition: SELECT DNAME d, DEPTNO r FROM DEPT ORDER BY 1
Settings for my Computation for this item:
Item Name: P5_SHUTTLE
Type: PL/SQL Function Body
Computation Point: Before Header
Computation:
DECLARE
vDEPT APEX_APPLICATION_GLOBAL.VC_ARR2;
i NUMBER := 1;
BEGIN
FOR c IN (SELECT DISTINCT DEPTNO FROM EMP WHERE ENAME LIKE 'A%')
LOOP
  vDEPT(i) := c.DEPTNO;
  i := i + 1;
END LOOP;
RETURN APEX_UTIL.TABLE_TO_STRING(vDEPT);
END;This computation is unconditional, so runs everytime the page is loaded.
Andy

Similar Messages

  • How to populate right side of Shuttle with display/return values?

    Hello,
    I know, that the proper way to populate the right side of shuttle is that:
    declare
         v_list     apex_application_global.vc_arr2;
    begin
         select profile_name return_value
           bulk     collect
           into     v_list
           from     user_profiles
          where     user_id = :p61_user_id;
         return (apex_util.table_to_string (v_list));
    end;It is comfortable for the user to see the name of the profile.
    However, I need a profile_id as a return value, like I have it on the left side of the shuttle.
    The left side of the shuttle is populated with a select list with display/return values, as you know.
    I need both sides of the shuttle to return profile_id in order to create a merge.
    How is it possible to populate the right side of the Shuttle with display/return values?

    All you have to do is to use the subset of shuttle query to assign value to the right side shuttle.
    http://apex.oracle.com/pls/apex/f?p=50942:95
    I have created a dummy page with shuttle query
    SELECT ename, empno FROM emp ORDER by 1then I have defined a pl-sql before header process to assign values to shuttle variable
    using the code
    begin
    :P95_SHUTTLE := '7566:219:7900:7782:90';
    end;since 90 is not one the result set of the shuttle query it is getting displayed as number, and for others it is displaying the text. Thanks.
    --Manish                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do you set a security password to control access to an external hard drive?

    how do you set a security password to control access to an external hard drive?

    The only way to reliably protect data, especially on an external hard drive, is to encrypt it.  Permissions don't have to be respected.  One way to encrypt data is to create an encrypted sparse bundle disk image with Disk Utility.  See:
    http://support.apple.com/kb/HT1578
    (Be sure to use the 256-bit encryption.)
    Alternately, you could use some whole-disk encryption, though I have no experience with any of the software for doing that.  You could try the following:
    http://www.truecrypt.org/
    I don't know that I would recommend the product being advertised inappropriately by keynesis.

  • How d you activate quick time A/V controls in the quick time window menu???

    How d you activate quick time A/V controls in the quick time window menu???

    QuickTime Player / Windows menu.

  • How to populate/persist right-side of Shuttle in apex 3.1.2 after submit

    In the new Shuttle I can only specify one LOV (select empname, empid from emp where empid not in (1,3,4)) but I also want to populate the right-side of the shuttle to show values which the non-members (select empname, empid from emp where empid in (2,5)) so that the user can make selections which persist after submit.

    Rashid,
    The method that worked for me was to:
    1) Create the LOV to populate the Left side of the shuttle (unselected).
    2) Define the Source property to populate the Right side (selected). In my case, I used a PL/SQL Function Body type, but any would work.
    I set the Source Used to Always, so that my user always started with the same default selection, but if you set it to "Only set when session value is null", that should do what you're asking for.
    Good luck (and thanks for the points by marking my answer helpful or correct),
    Stew

  • Another populate right side shuttle

    I have read the posts regarding populating the right side of the shuttle and have used a lot of Dkubicek's code from his example. The thing I am not sure about...is this supposed to be populating the right shuttle. Here is what I want to do. User comes to page, empty shuttle. They select userid, then using ajax I populate the states that user is assinged to. Once they select a specific state, I want to populate the right shuttle with all the counties that user is assigned to. I already have the left shuttle populating with ALL the counties in the state using a simple LOV. Right side will not populate. No filter needed. This is what I have built.
    application item
    shuttle_item_value
    application process
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<select>');
    FOR c IN (select DISTINCT t.county_name
    from apexim.hrw_fcm_zip_xref t
    where t.fcm_userid = 'LBROWN'
    and t.oper_state = 'VA')
    LOOP
    HTP.prn ('<option value="' || c.county_name || '">' || c.county_name || '</option>');
    END LOOP;
    HTP.prn ('</select>');
    END;
    javascript
    <script language="JavaScript1.1" type="text/javascript">
    function f_p2_get()
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=p2_get',0);
    get.add('P2_MEMBER_ID',html_GetElement('P2_MEMBER_ID').value)
    gReturn = get.get();
    if(gReturn)
    {  html_GetElement('P2_MEMBER_NAME').value = gReturn  }
    else
    {  html_GetElement('P2_MEMBER_NAME').value = 'null'  }
    get = null;
    </script>
    <script>
    NS4 = (document.layers) ? true : false;
    function f_filter_shuttle_item(pThis,pShuttle1,pShuttle2,event)
    var code = 0;
    if (NS4)
    code = event.which;
    else
    code = event.keyCode;
    if (code==13)
    var l_Return = null;
    var l_Select = html_GetElement(pShuttle1);
    var p_array = '';
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=filter_shuttle_item',0);
    for (i = 0; i < $x(pShuttle2).length; i++)
         if (p_array == '')
    p_array = $x(pShuttle2).value;
         else
    p_array = p_array + ':' + $x(pShuttle2)[i].value;
    get.add('SHUTTLE_ITEM_VALUE', p_array);
    gReturn = get.get('XML');
    if(gReturn && l_Select){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[i];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    function appendToSelect(pShuttle1, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all)
    pShuttle1.options.add(l_Opt);
    l_Opt.innerText = pContent;
         else
              l_Opt.appendChild(document.createTextNode(pContent));
         pShuttle1.appendChild(l_Opt);
    </script>
    on select of state drop down
    onChange="f_filter_shuttle_item(this, 'P1010_COUNTY_SHUTTLE_LEFT', 'P1010_COUNTY_SHUTTLE_RIGHT',event);" autocomplete="off"
    Thanks in advance, Justin

    We have accomplished our task

  • Updating table from right side of shuttle

    I have a situation where I have a many to many relationship with 2 tables and an intermediate table. I am trying to create a shuttle item to be able to bring the two tables together. I have been reading the posts regarding populating the right side of the shuttle. That works now, but I have no idea how to take that and update the intermediate table with the values from the right side of the shuttle.
    I tried using APEX_APPLICATION.G_F02, but that only seems to work, if the values in the right side are highlighted.
    I can't seem to figure out what the name of the right hand of the shuttle is.
    Any help would be very welcome.
    Thanks, Greg

    Greg,
    Are you processing on submit? If so then the values would be avaialble by simply referencing the item. Each return value would be separated by a colon as in:
    1:2:3
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    http://sourceforge.net/projects/plrecur
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • How Do You Populate A Spark List Control With An Array?

    Hello, all,
    Sorry to come accross so frustrated, but how in the name of God do you populate a Spark list control with the data in an array?  You used to be able to do this with the mx:List control, but the guys developing Flex just had to make things more difficult than they need to be!  I am more of a code purist and prefer doing things the way they have been done for decades, but apparently nothing can ever stay simple!
    I simply want to populate a list control with an array and this shouldn't be rocket science!  I found out that I must use a "collection" element, so I decided that an arrayCollection would be best.  However, after searching Adobe's documentation about arrayCollections, I am lost in a black hole of data binding, extra lines of code just to add a new element, the need to sort it, etc...!
    Here is my code:
    var pendingArray:ArrayCollection = new ArrayCollection();
    for ( var i:int = 0 ; i < queue.length ; i++ )
         var item:UserQueueItem = queue[i] as UserQueueItem ;
         if ( item.status == UserQueueItem.STATUS_PENDING )
         pendingArray.addItem({label:item.descriptor.displayName,descriptor:item.descriptor});
    Here is the relevant MXML:
    <s:VGroup>
         <s:List id="knockingList" width="110" height="100"/>              
    </s:VGroup>
    I'm not getting any errors, but the list is not populating.
    I have seen several examples where the arrayCollection is declared and populated in MXML:
            <mx:ArrayCollection id="myAC">
                <!-- Use an fx:Array tag to associate an id with the array. -->
                <fx:Array id="myArray">
                    <fx:Object label="MI" data="Lansing"/>
                    <fx:Object label="MO" data="Jefferson City"/>
                    <fx:Object label="MA" data="Boston"/>
                    etc...
               </fx:Array>
            </mx:ArrayCollection>
    That may be fine for an example, but I think this is a rare situation.  Most of the time I would image that the arrayCollection would be created and populated on the fly in ActionScript!  How can I do this?
    Thanks in advance for any help or advice anyone can give!
    Matt

    In your post it seemed like you were trying to take care of many considerations at once: optimization, design, architecture.  I would suggest you get something up and running and then worry about everything else.
    If I use data binding, then I will probably have to declare the  arrayCollection as a global variable and then I'll have to write 100 or  so extra lines of code to addItem(), removeItem(), sort(), etc...  It  just seems like too much overhead.
    I believe you may have some misconceptions about databinding in general.  You won't have to make it a global variable and you certainly won't need an extra 100 lines of code.  If you did this forum would be a very , very quiet place.
    I don't want to use data binding because the original array is refreshed  often and there is one function called by an event that re-declares the  arrayCollection each time, populates it with the array, and then sets  it as the list's dataprovider.
    That is the beauty of the ArrayCollection, it can handle the updates to its source Array. I don't know if you need to redeclare the ArrayCollection, resetting the source to the new Array allows everyone involved to keep their references so you don't have to worry about any "spooky" stuff going on.

  • How do you populate location's metadata?

    I'm just looking after ideas or your solutions on how to populate Country, State and City metadata. We all know what those terms mean, but it's sometimes difficult to populate them... and I don like to have them as "Unknown". For example:
    I make one-day visit to some small place in Italy, about 30km outside nearest town, where the photo is actually taken on the hills nearby.
    So, all I have for sure is Country=Italy.
    I could enter State as Province (Italy has more than hundred of them), but that would require quite a lot research to findout which place belong to which province -especially if visiting some foreign country (think of Asian states provinces).
    OK, I'll leave all State/Province blank too (thus "Unknown).
    Now about City: as said, nearest is about 30km away from shooting location and I actually never been there. Does/would that city count in your usage?
    Should I leave City blank too? Well, I'll have a lot "unknown" places then. And IMO it doesn't make sense I write City="Bruno's farm" (should be used for Location tag though).
    How do you deal with these?
    Thanks for ideas,
    Bogdan

    I have a two part answer:
    1. Where I do have records of the location, even if it requires research, I fill out as much as I have. Country and State/Provence/Whatever are usually easy to reconstruct. I use the nearest city unless I'm in a Wildlife Refuge, Park, Reserve, et. Then I use that for City.
    I also create a keyword hierarchy which mirrors this, since LR won't automatically do this for me.
    2. Going forward I now shoot with a GPS on my D2X and will know exactly where I was. Perhaps there will be some easy lookup feature to populate the location fields from this one day. Until then, I'll just pop out to Google maps in LR and see where I was (if I can't remember).
    I know it sounds like I forget where I am a lot. The reality is that I go on multiweek shoots and cover a lot of ground before returning home. That was the motivator for the GPS, just tired of trying to remember which part of the jungle I was in for a given pic.

  • How do you populate cfselect when cfgrid selected row is changed

    hi can anyone enlighten me as to how to pass data to a
    cfselect from a cfgrid
    i am using a listner function so that the grid can populate
    form controlswhen a row is selected
    i use bindings on cfinputs so no problem there
    how do u populate a cfselect drop down with data from a grid
    and then how woul i also display query results from another
    query as a second option
    lost
    yes i dont konw much as
    realyy apprecitae your help

    Unfortunately, there's no 'tab-out' event in ABAP standard dynpros - you've got to trigger a PAI event to make that happen (such as hitting 'Enter').

  • How do you populate a cell in numbers to convert to a phone number?

    How do you get a cell do populate to a phone number?
    So if I type 5555551212 it would read 555-555-1212?

    Hi,
    I think this has been answered here by someone else.
    https://discussions.apple.com/message/12413431?messageID=12413431

  • How do you populate a page item in apex with a value read from excel

    Dear All
    I am working on application where I am uploading a csv file in oracle apex. I then need to access a value in Cell B2 of the csv file and populate a page item called
    :P2100_AUTHORISATION_ID with this value. Many of the examples I have found upload the data using v_data-array into a table but I don't need to do that I just need to get the value from the csv file and then display additional information about the file allowing the user to either or continue or cancel the request to upload. I am running into a small problem that I can't explain and wondered if anyone had any ideas.
    Here is the code I am using to try and populate and item called :P2100_AUTHORISATION_ID but when I poulate the item the value is always 0. But if I replace the line :P2100_AUTHORISATION_ID:= v_data_array(2) with a raise_application_error(-20001,v_data_array(2)); The correct value is displayed in the eror. Any Help would be appreciate and I apologise in advance if this akes no sense at all:-)
    declare
    --variables needed to read excel data from flow files
    v_blob_data BLOB;
    v_blob_len NUMBER;
    v_position NUMBER;
    v_raw_chunk RAW(10000);
    v_char CHAR(1);
    c_chunk_len number := 1;
    v_line VARCHAR2 (32767) := NULL;
    v_data_array wwv_flow_global.vc_arr2;
    v_rows number;
    v_sr_no number := 1;
    begin
    --------------------------------------get file info from www_flow_files
    select blob_content into v_blob_data from wwv_flow_files
    where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER) and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
    v_blob_len := dbms_lob.getlength(v_blob_data);
    v_position := 1;
    --Read and convert binary to char
    WHILE ( v_position <= v_blob_len ) LOOP
    v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
    v_char := chr(p_bl_wd_data_entry.hex_to_decimal(rawtohex(v_raw_chunk)));
    v_line := v_line || v_char;
    v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved
    IF v_char = CHR(10) THEN
    -- Convert comma to : to use wwv_flow_utilities </span>
    v_line := REPLACE (v_line, ',', ':');
    -- Convert each column separated by : into array of data </span>
    v_data_array := wwv_flow_utilities.string_to_table (v_line);
    --get filename from wwv_flow_files
    select filename into :P2100_FILE_NAME from wwv_flow_files where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER) and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
    :P2100_AUTHORISATION_ID:= v_data_array(2);
    -- Clear out
    -- v_line := NULL;
    --v_sr_no := v_sr_no + 1;
    END IF;
    END LOOP;
    end;
    Best Regards
    Lynn

    Hi Joel
    Continuing on from my last question, there was something else I want to ask if you dont mind.
    Now that I have the v_data_array(2) value in a page item I would like to use as an input value to a procedure to return some information I need displayed on the page. To do this I need to convert it to a number but when I try to so this I get the following error
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    When I use the wwv_flow.debug that you told me about it is outputting a value '4851 ' so it look like there may be some sort of asii character causing a problem. I have tried using trim(v_data_array(2)) and ascii(v_data_array(2)) but nothing seems to work.
    Would you know how to convert a v_data_array value to a number? At the moment I am attemting to do it withiin the same code I attached in my earlier post but I have replaced the assignment of :P2100_AUTHORISATION_ID with the code below where P_BL_WD_DATA_ENTRY.getauthid is the procedure returning the values I need.
    :P2100_AUTHORISATION_ID:= P_BL_WD_DATA_ENTRY.getauthid(to_number(v_data_array(2)));
    Thanks
    Lynn

  • How to programatically populate data in ADF shuttle component?

    Hi,
    Can anyone please let me know the code for programatically pouplating data into the shuttle Oracle ADF shuttle component using ArrayList object? I have my data(records) in an Arraylist object and I am using JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660.
    Thanks,
    Vikas

    Have a look at this thread:
    http://baigsorcl.blogspot.com/2010/10/creating-shuttle-component-in-oracle.html
    Thanks,
    Navaneeth

  • How to turn pictures right side up permanently?

    My wife took her first 600 pictures on the iphone4S upside down. When we view them in Windows preview, we can rotate them around correctly, but if we leave "Preview" and come back to use it later, they are all upside down again. How can we change them permanently?

    My wife took her first 600 pictures on the iphone4S upside down. When we view them in Windows preview, we can rotate them around correctly, but if we leave "Preview" and come back to use it later, they are all upside down again. How can we change them permanently?

  • How do you implement server side sorting using IPlanet 5.x?

     

    You can use the sort control. The C and Java SDKs also provide support for it. See http://docs.iplanet.com/docs/manuals/dirsdk/csdk41/html/controls.htm#13286 for an example.

Maybe you are looking for

  • Don't understand why TimeMachine stops before end of backup

    Hello, I wish I use TimeMachine to backup my computer. When the TimeMachine process starts, the dialog box with the progress bar says "saving xxx/93Mo". However, the backup process stops by itself at 65 Go (!!) and the Console says the data were save

  • Printer Sharing from Inspiron w/ XP to Mac w/ Leopard attached to HP cp1700

    Burning Question- I have my Quicksilver with Leopard (see below) with my HP cp1700. My bf has a Inspiron Laptop with windows XP. How does one printer share to the Quicksilver? The router is a Linksys Wireless. I do have file sharing up and running. B

  • New image

    I just upload my podcast and apple accepted, but i want a another image. my podcast is from podomatic please help me!!

  • Connect ipod with new computer

    I have an existing ipod classic with about 4,000 songs.  I have downloaded iTunes to a new computer.  Can I simply plug the ipod into the computer (Windows PC laptop) so that my Library and iPod will sync or is there another procedure? Thanks!

  • How to down load the same app twice

    How do I download the same app twice so I have both on my home screen.  I want to monitor cameras at 2 different locations and need to have 2 apps to load seperate info into each.  When I try to down load the app for the 2nd time the only option is t