Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8817943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:58:33+00:00 2026-06-14T04:58:33+00:00

APEX version: 4.1.1.00.23 I have a shuttle that populates the right site based on

  • 0

APEX version: 4.1.1.00.23

I have a shuttle that populates the right site based on what is chosen from a select list. Whenever an item is picked from the select list, the correct item or items are populated on the right panel, but there is always a null that is added. How do I get ride of the null?

enter image description here

Shuttle name: P51_Shuttle
Select list name: P51_Analyst

Here is my code:
HTML Header:

<script type="text/javascript">

function LoadRightPane()
{ 
  var objDQAnalyst = document.getElementById("P51_DQ_ANALYST");
  var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=get_DQAttributes',0);
  ajaxRequest.add('P51_DQ_ANALYST',objDQAnalyst.value);
  ajaxResult = ajaxRequest.get();

//alert(ajaxResult);

  if(ajaxResult)
    {  

    var shuttleRight = document.getElementById("P51_SHUTTLE_RIGHT");
      shuttleRight.options.length = 0;
      var attrArray = ajaxResult.split("~colsep~");
      for(var i=0; i < attrArray.length; i++) {
        shuttleRight.options[i] = new Option(attrArray[i], attrArray[i]);
      }
    }
    else
    {
      shuttleRight.options.length = 0;
    }
  ajaxRequest = null; 
} 

function moveitem(item) {
return;
   s_left = document.getElementById("P51_SHUTTLE_TO_LEFT");
   db.transaction(function(tx){
      tx.executeSql('select distinct DQ_ATTRIBUTE from DQ_MANUAL_EDIT where DQ_ANALYST = ?',[item],function(tx,results)
  {
      for (var i=0; i < s_left.options.length;i++)
   {
     if (results.value == s_left.options[i].value) 
     {
         s_left.options[i].selected = true;
         g_Shuttlep_v15.move();
     }
   }
  });
 });
}

</script>

Page HTML Body Attribute:

onLoad="Javascript:LoadRightPane();"

Applicaiton/Page process called (get_DQAttributes)

DECLARE

L_RETURN VARCHAR2(2000):= NULL ;

BEGIN

BEGIN

FOR rec IN (    
select distinct dq_attribute 
from DQ_MANUAL_EDIT
where dq_analyst = :P51_DQ_ANALYST
)    
LOOP      
L_RETURN := L_RETURN || rec.dq_attribute || '~colsep~' ;

END LOOP;

end;


htp.prn(L_RETURN);

END;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:58:34+00:00Added an answer on June 14, 2026 at 4:58 am

    Your ajax process always returns something suffixed with ~colsep~

    When you run a string like that in firebug:

    "test1~colsep~".split("~colsep~")
    

    The result will be an array with 2 elements:

    ["test1", ""]
    

    So your NULL element originates from that. To fix this just adjust the ajax process to trim the last separator with RTRIM.

    DECLARE
       L_RETURN VARCHAR2(2000):= NULL ;
    BEGIN
       FOR rec IN ( select distinct dq_attribute 
                      from DQ_MANUAL_EDIT
                     where dq_analyst = :P51_DQ_ANALYST)    
       LOOP      
          L_RETURN := L_RETURN || rec.dq_attribute || '~colsep~' ;
       END LOOP;
       l_return := rtrim(l_return, '~colsep~');
    
       htp.prn(L_RETURN);
    END;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

APEX version: 4.1.1.00.23 I have a shuttle on a page, and when I move
I have written an apex class that will create a PDF quote and attach
I'm using Oracle APEX and I have a report region in a page that
I have a html/javascript web page that I need to run unmodified on APEX
I have an APEX class that is used to send an email out each
Using: Oracle ApEx 3.0.1 I have a SQL report region that contains a hidden
I have two tables in APEX that are linked by their primary key. One
I have a visualforce/apex functionality that exports & emails a PDF for commission agreements
I have apex tag that generate input text field. <apex:page id=my_page> <apex:inputText id=foo id=c_txt></apex:inputText>
I have an apex application that authenticates using LDAP which would also check to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.