Plsql code in select list

My query is :
I am having table name room list which contain the information about rooms with
sitting capacity
name of rooms are fetch in select list :P1_ROOM_NAME which return the Room id to hidden item
:P1_ROOM_ID which is used for the third Select :P1_NO_OF_PARTICIPANTS
i am getting error in populating :P1_NO_OF_PARTICIPANTS
NO DATA FOUND AND I AS INVALID VARIABLE
I know No data found is due to :P1_ROOM_NAME IS NOT SELECTED FIRST
on page load.
Any Idea for the query of :P1_NO_OF_PARTICIPANTS
sample data and queries used
create table room_list
( room_id number,
  room_name varchar2(100),
  sitting_capacity
insert into room_list values(1,'a',3);
insert into room_list values(2,'a',1);
:P1_ROOM_NAME
SELECT ROOM_NAME AS D,ROOM_ID AS R
FROM ROOM_LIST
For Select List i used
:P1_NO_OF_PARTICIPANTS
Cascading lov used item P301_ROOM_ID
DECLARE
l_sitting_capacity varchar2(50);
begin
SELECT SITTING_CAPACITY into l_sitting_capacity
FROM ROOM_LIST
WHERE ROOM_ID=:P301_ROOM_ID;
FOR I IN 1..l_sitting_capacity
loop
RETURN
'select i as display ,i as return
from dual';
end loop;
end;

ReemaPuri wrote:
My query is :
I am having table name room list which contain the information about rooms with
sitting capacity
name of rooms are fetch in select list :P1_ROOM_NAME which return the Room id to hidden item
:P1_ROOM_ID which is used for the third Select :P1_NO_OF_PARTICIPANTS
i am getting error in populating :P1_NO_OF_PARTICIPANTS
NO DATA FOUND AND I AS INVALID VARIABLE
I know No data found is due to :P1_ROOM_NAME IS NOT SELECTED FIRST
on page load.
Any Idea for the query of :P1_NO_OF_PARTICIPANTS
Isn't that the wrong way round? Shouldn't the number of participants be identified first, so that the selection can be restricted to rooms with at least that capacity?
sample data and queries used
create table room_list
( room_id number,
  room_name varchar2(100),
  sitting_capacity
insert into room_list values(1,'a',3);
insert into room_list values(2,'a',1);
:P1_ROOM_NAME
SELECT ROOM_NAME AS D,ROOM_ID AS R
FROM ROOM_LIST
For Select List i used
:P1_NO_OF_PARTICIPANTS
Cascading lov used item P301_ROOM_ID
DECLARE
l_sitting_capacity varchar2(50);
begin
SELECT SITTING_CAPACITY into l_sitting_capacity
FROM ROOM_LIST
WHERE ROOM_ID=:P301_ROOM_ID;
FOR I IN 1..l_sitting_capacity
loop
RETURN
'select i as display ,i as return
from dual';
end loop;
end;
This code is completely nonsensical. The capacity of the room selected is retrieved, then you attempt a loop using that as the number of iterations, but the loop contains a RETURN statement that will exit the loop and terminate execution of the block on the first iteration. Finally, the value returned is the text of an invalid query on the DUAL table (there is no DUAL.I column...)
WHAT are you trying to do here?

Similar Messages

  • Apex Select List

    Hi,
    In my application. I have a requirement like the below
    one select list is there where iam displaying the country name returning country code.
    another select list i have a province name displayed returning the province code.
    Now my requirement is when i select country name another province select list should show only the province names belongs to that country dynamically,
    created dynamic action and wrote plsql function on change event to set value as follows but no luck please advice.
    IF :LANG_PREF_CD = 'E' THEN
    RETURN 'SELECT province_name
    , province_id
    FROM (SELECT E_province_name province_name
    , province_id province_id
    FROM province_table
    where province_table.country_id=:p1_country_name
    UNION ALL SELECT 0, '' '', NULL FROM DUAL )
    ORDER BY province_id;
    ELSE
    RETURN 'SELECT province_name
    , province_id
    FROM (SELECT f_province_name province_name
    , province_id province_id
    FROM province_table
    where province_table.country_id=:p1_country_name
    UNION ALL SELECT 0, '' '', NULL FROM DUAL )
    ORDER BY province_id;
    END IF ;
    can any one help where is the mistake please. thanks

    Hi,
    not sure for older versions but for > Apex 4.0 this is possible "out of the box".
    Define 1 list of values called country and set this as the LOV on your country field ( e.g. P11_COUNTRY ).
    Define a second field called P11_PROVINCE and set Cascading LOV Parent Item(s) to P11_COUNTRY, also set Page Items to Submit to P11_COUNTRY
    now define the list of values for the P11_PROVINCE in the List of values definition on the item page ( so not a named LOV since you shoudlk reference a page item ):
    select
         province,ID
    from provincelovtable
    where
    and country_id = :P11_COUNTRY
    The field country_id should contain the country id where the province is linked to.
    regards
    Bas

  • Spry select list code to wire it to html data table SET column?

    I am making a page based on Figure 15-14, Pg 878, in David Power's book, "Dw CS4 with CSS, Ajax and PHP. I have two separate html data tables hidden in the page, one for the specialties drop down select list and the other for the teachers master/detail regions. These are populated with php and working well. The spry select list and master/detail regions are working great except for one issue. The column in my html data table that is being filtered ("Specialty" in my code = 'Category' in the book's example code) is a SET column (with possible value of 1, 2, 3, 4, and/or 5). Clicking on the drop down menu brings up the records with a single value beautifully. The result for records with multiple values is a spry error "Invalid row number: 0". After four different versionings and methods of messing with this, I still haven't a clue. Please help me with how to rewire the Spry select list code so that it will read the records that have multiple items in that column. I have included the code below.
    var data_set_teachers = new Spry.Data.HTMLDataSet(null, "teacher_data");
    data_set_teachers.gallery = '1';
    function chooseSet(dataSet, row, rowNumber)
    if (row["Specialty"] == data_set_teachers.gallery) {
       return row;
    return null;
    data_set_teachers.filter(chooseSet);
    function changeSet(set)
    data_set_teachers.gallery = set;
    data_set_teachers.filter(chooseSet);
    data_set_teachers.setCurrentRowNumber(0);
    var rows = data_set_teachers.getData();
    for (var i = 0; i < rows.length; i++) {
       if (rows[i]["Specialty"] == set) {
         data_set_teachers.setCurrentRowNumber(i);
         break;
    var data_set_specialties = new Spry.Data.HTMLDataSet(null, "specialty_data");

    Well I'll be damned!
    What's done in the sample app is, of course, the intuitively obvious choice and is exactly what I started out trying to do the first time round.
    But as I mentioned before, when I first tried it (yes: I'm pretty sure I set the "for" attribute on the inlineMessage components), I got the non-unique component id exception for the inlineMessage component(s) after adding the second (but not the first) row to the page.
    Anyway, after dragging my inlineMessages to the exact same position as those in the AppModel example, now things work fine (except I think I'd like a line break before the message and to change the row/column styles so the values and messages line up properly...the look is rather ugly in the AppModel example when there are validation messages displayed).
    Not sure, but I'm thinking maybe there was an issue with where the inline message markup was placed, my first time through, relative to the data table value bound component and the column header facet?
    I was using the application view drag 'n drop feature the first time round and dragged the inlineMessage component to the spot just below the data table value bound component and hence just above the column header facet. In the AppModel example, OTOH, the inline messages are placed just after the column header facet.
    Of course, I will now try to duplicate the original exception.
    If I can (and it is an issue with placement), I will post back some sort of bug report or RFE. Otherwise, I'll post back declaring what a bone head I've been...;-)
    Anyway, thanks for the quick response, v.
    Campbell

  • ORA-01007 - variable not in select list error in pl\sql code

    Hi,
    When I tried to run this program I am getting below error:
    ORA-01007 - variable not in select list.Please help to resolve.
    Code:
    create or replace procedure "XX_BPM_DATA_P" (P_PROCESS_ID IN VARCHAR2)
    is
    TYPE l_entity_type IS TABLE OF xx_BPM_data.ENTITY%TYPE INDEX BY PLS_INTEGER;
    TYPE l_data_type IS TABLE OF XX_BPM_DATA.DATA%TYPE INDEX BY PLS_INTEGER;
    TYPE l_count_type IS TABLE OF XX_BPM_DATA.count%TYPE INDEX BY PLS_INTEGER;
    l_Entity_v l_Entity_type;
    l_data_v l_data_type;
    l_count_v l_count_type;
    l_security_group_id number;
    app_id number(20);
    l_Actual_value XX_BPM_DATA.DATA%TYPE;
    cursor BPM_CUR is select id,process_id , sequence, to_char(query) query,report_num from xx_test_bpm_dynamic
    where
        process_id = p_process_id
           and report_num=1
    order by process_id, sequence;
    BEGIN
    --delete xx_bpm_data where process_id = p_process_id;
    for bpm_rec in bpm_cur
    loop
    delete xx_bpm_data
    where process_id = bpm_rec.process_id
    and sequence = bpm_rec.sequence
    and report_num = bpm_rec.report_num;
    l_security_group_id := apex_custom_auth.get_session_id_from_cookie;
    --dbms_output.put_line(l_security_group_id);
    execute immediate bpm_rec.query BULK COLLECT INTO l_ENTITY_v,l_DATA_v,l_count_v;
    if (bpm_rec.report_num=2) then
    app_id:= 108;--NV('APP_ID');
    FORALL i IN l_ENTITY_v.FIRST..L_ENTITY_V.LAST
    INSERT INTO XX_BPM_DATA
        (EnTITY,
    value,data,count,
    Process_ID,
    Sequence,report_num)
    VALUES(l_entity_v(i),
    l_data_v(i),
    '<A HREF="f?p='||app_id||':301:'||':APP_SESSION'||'::::P301_process_id,p301_sequence,p301_id,p301_entity:'||bpm_rec.process_id||','||bpm_rec.sequence||','||bpm_rec.id||','||l_entity_v(i)||':">'||l_data_v(i)||'</A>',
        l_count_v(i),bpm_rec.process_id,
    BPM_rec.sequence,
    bpm_rec.report_num);
    else
    FORALL i IN l_ENTITY_v.FIRST..L_ENTITY_V.LAST
    INSERT INTO XX_BPM_DATA(EnTITY,data,
        count,
    Process_ID,
    Sequence,report_num)
    VALUES(l_entity_v(i),
    l_data_v(i),
        l_count_v(i),
        bpm_rec.process_id,
    BPM_rec.sequence,
    bpm_rec.report_num);
    end if;
    select round(avg(value),2) into l_actual_value from xx_bpm_data where process_id=bpm_rec.process_id and sequence=bpm_rec.sequence and report_num=bpm_rec.report_num;
    update xx_test_bpm_dynamic set value=l_actual_value where process_id=bpm_rec.process_id and sequence=Bpm_rec.sequence and report_num= bpm_rec.report_num;
    end loop;
    Commit;
    END;

    When I tried to run this program I am getting below error:
    ORA-01007 - variable not in select list.Please help to resolve.
    You likely would not need any help in you wrote and tested your code using standard best practices.
    Your code has NO exception handler and you are NOT identifying each step in the code so that the exception handler could print/log a message telling you EXACTLY which step raised the exception.,
    v_step NUMBER;
    -- before step 1
    v_step := 1;
    -- before step 2
    v_step := 2;
    Then in the exception handler the value of 'v_step' will tell you which step raised the exception.
    The exception you posted refers to a 'select list' so examine ALL of the select lists in your code. If you do that you will see that the primary query being run is obtained from a database table and then executed using dynamic SQL
    execute immediate bpm_rec.query BULK COLLECT INTO l_ENTITY_v,l_DATA_v,l_count_v;
    We have no way of knowing what query is in 'bpm_rec.query' when the exception happens or what columns that query returns. For all we know the query returns 2 columns and you are trying to load 3 collections. Or maybe the query returns 8 columns and you are trying to load 3 collections.
    Why don't you print out the query and execute it manually so you can see exactly what the result set looks like?
    dbms_output.put_line(bpm_rec.query);
    And don't even get us started on why you are using such security-prone dynamic sql to perform this processing instead of using ordinary SQL statements. Or why you are using associative arrays for the BULK COLLECT instead of nested tables.
    In short your code could blow up in several places and, because you have NO logging statements, control statements or exception handlers, anyone having to troubleshoot that code would have absolutely no idea what part of it may be the problem.

  • Ajax code help for conditional select list.

    Hi,
    I am using AJAX code for the first time, I dont have knowledge in java, I just grabbed the code from this forum and trying to manipulate to my requirement.
    My Requirement is I have two select lists, 1) host_name and 2) database_name.
    As soon as I pick/choose the value in host_name select list, I need to populate only those databases on that particular host. I dont want to submit the page for this action.
    Here is the code, I appreciate if some one can help.
    On demand Application Process code:
    declare
    l_counter number;
    l_o_name varchar2(2000);
    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 rec in (select "ORA_DATABASES_VW"."DATABASE_NAME" as "DATABASE_NAME",
         "ORA_DATABASES_VW"."DB_ID" as "DB_ID"
    from "ORA_DATABASES_VW"
    where "ORA_DATABASES_VW"."HOST_NAME" = :TEMP_ITEM)
    loop
    htp.prn('<option value="' || rec.db_id || '">' || rec.database_name || '</option>');
    end loop;
    htp.prn('</select>');
    end;
    HTML Header on that page:
    =================
    <script language="JavaScript1.1" type="text/javascript">
    function get_List_XML (source_item,target_item){   
    var v_Target = html_GetElement(target_item);
    var v_Source = html_GetElement(source_item);
    var ajaxResult = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=POPULATE_LIST_XML',0);
    ajaxResult.add('TEMP_ITEM',source_item.value);
    var v_result_xml = ajaxResult.get('XML');
    if(v_result_xml && v_Target)
    var options_Contents = v_result_xml.getElementsByTagName("option");
    v_Count = options_Contents.length;
    v_Target.length = 0;
    for(var i=0;i<v_Count;i++)
    var v_opt_xml = v_result_xml.getElementsByTagName("option");
    appendToSelect(v_Target, v_opt_xml.getAttribute ('value'),v_opt_xml.firstChild.nodeValue)
    function appendToSelect(target_item, option_val, option_content) {  
    var v_Opt = document.createElement("option");
    v_Opt.option_value = option_val;
    if(document.all){
    target_item.options.add(v_Opt);
    v_Opt.innerText = option_content;
    }else{  
    v_Opt.appendChild(document.createTextNode(option_content));
    target_item.appendChild(v_Opt);
    </script>
    Form element attribute in the host_name column. P935_INSTANCE_DB_NAME is my page item for database_name.
    onchange="get_List_XML (this,'P935_INSTANCE_DB_NAME')"

    Here is the code, Hope I had put it correctly now.
    This is fixed now. Thanks a lot for helping out this. I have two questions.
    1) I am seeing very slowness when selecting the select list. Will these java code require much resource?
    2) I need to put this logic in many screens for many columns. So having these many application process and application items and java code, will the application performance get a hit? I know that application process are on-demand and get called only when required.
    declare
    l_counter number;
    l_o_name varchar2(2000);
    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 rec in (select "ORA_DATABASES_VW"."DATABASE_NAME" as "DATABASE_NAME",
    "ORA_DATABASES_VW"."DB_ID" as "DB_ID"
    from "ORA_DATABASES_VW"
    where "ORA_DATABASES_VW"."HOST_NAME" = :TEMP_ITEM)
    loop
    htp.prn('<option value="' || rec.db_id || '">' || rec.database_name || '</option>');
    end loop;
    htp.prn('</select>');
    end;
    HTML Header on that page:
    =================
    <script language="JavaScript1.1" type="text/javascript">
    function get_List_XML (source_item,target_item){
    var v_Target = html_GetElement(target_item);
    var v_Source = html_GetElement(source_item);
    var ajaxResult = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=POPULATE_LIST_XML',0);
    ajaxResult.add('TEMP_ITEM',source_item.value);
    var v_result_xml = ajaxResult.get('XML');
    if(v_result_xml && v_Target)
    var options_Contents = v_result_xml.getElementsByTagName("option");
    v_Count = options_Contents.length;
    v_Target.length = 0;
    for(var i=0;i<v_Count;i++)
    var v_opt_xml = v_result_xml.getElementsByTagName("option");
    appendToSelect(v_Target, v_opt_xml.getAttribute ('value'),v_opt_xml.firstChild.nodeValue)
    function appendToSelect(target_item, option_val, option_content) {
    var v_Opt = document.createElement("option");
    v_Opt.option_value = option_val;
    if(document.all){
    target_item.options.add(v_Opt);
    v_Opt.innerText = option_content;
    }else{
    v_Opt.appendChild(document.createTextNode(option_content));
    target_item.appendChild(v_Opt);
    </script>
    Form element attribute in the host_name column. P935_INSTANCE_DB_NAME is my page item for database_name.
    onchange="get_List_XML (this,'P935_INSTANCE_DB_NAME')"
    }

  • Creating Selection List Dynamically or Through Code

    Has anyone created Selection Lists for Excel or Analyzer Dynamically Through Code? We have lists that could change quite often and would like to automate the process.

    Different methods for different situations. If you are just concerned about capturing newly added descendants/children of a dimension, it may be best to always begin the query at the appropriate parent level, then zooming/drilling to list all children/descendants at the time the query is run. Assigning attributes is another way to achieve this, assuming all the members which you wish to capture are similar in nature (eg. flavor, size, product category, etc.). After creating the attribute dimensions and assigning them to base dimensions, simply adding the attribute to the query dynamically filter the values returned. You can also drill/zoom on the attribute dimension in the query to view detail lists of the individual members which match.

  • Replace Select List with text field in Collection Code

    hi
    i am using an Collection Code .i have used an java script code to fetch rate of item with out refresh in column *(APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009).*
    My problem is this column is Select List but i want to use in textfield here.
    This is my Rate Column . How can i Replace it with textfield like APEX_ITEM.TEXT
    APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009,'SELECT RATE D, RATE R FROM ITEM_DETAILS WHERE ITEM_NAME =''' || a.c006|| '''',
    This is my Collection code
    select APEX_ITEM.HIDDEN(1,SEQ_ID),
    APEX_ITEM.TEXT(2,a.c001) c001,
    APEX_ITEM.TEXT(3,a.c002) c002,
    APEX_ITEM.TEXT(4,a.c003) c003,
    APEX_ITEM.TEXT(5,a.c004) c004,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(6,a.c005,'SELECT ITEM_GROUP D,ITEM_GROUP R FROM ITEM_GROUP_DETAILS order by ITEM_GROUP',
    'style="" '
    ||'onchange="get_select_list_xml(this,''f7_'|| LPAD (seq_id, 4, '0')
    ||''')"',
    'YES',
    '0',
    '-Select-',
    'f6_'|| LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c005,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(7,a.c006,'SELECT ITEM_NAME D,ITEM_NAME R FROM ITEM_DETAILS WHERE ITEM_GROUP =''' || a.c005|| '''' ,
    'style=""'
    ||'onchange="get_select_list_xml21(this,''f10_'|| LPAD (seq_id, 4, '0')
    ||''')"',
    'YES',
    '0',
    '-Select Name -',
    'f7_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c006,
    APEX_ITEM.TEXT(8,a.c007) c007,
    APEX_ITEM.TEXT(9,a.c008) c008,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009,'SELECT RATE D, RATE R FROM ITEM_DETAILS WHERE ITEM_NAME =''' || a.c006|| '''',
    'style=""',
    'YES',
    '0',
    '-Select Rate -',
    'f10_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c009,
    APEX_ITEM.TEXT(11,a.c010) c010
    FROM APEX_collections a
    where a.collection_name = 'ABC'
    Thanks
    Manoj Kaushik
    Edited by: Manoj Kaushik on Mar 11, 2010 1:25 AM

    hi
    i am using an Collection Code .i have used an java script code to fetch rate of item with out refresh in column *(APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009).*
    My problem is this column is Select List but i want to use in textfield here.
    This is my Rate Column . How can i Replace it with textfield like APEX_ITEM.TEXT
    APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009,'SELECT RATE D, RATE R FROM ITEM_DETAILS WHERE ITEM_NAME =''' || a.c006|| '''',
    This is my Collection code
    select APEX_ITEM.HIDDEN(1,SEQ_ID),
    APEX_ITEM.TEXT(2,a.c001) c001,
    APEX_ITEM.TEXT(3,a.c002) c002,
    APEX_ITEM.TEXT(4,a.c003) c003,
    APEX_ITEM.TEXT(5,a.c004) c004,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(6,a.c005,'SELECT ITEM_GROUP D,ITEM_GROUP R FROM ITEM_GROUP_DETAILS order by ITEM_GROUP',
    'style="" '
    ||'onchange="get_select_list_xml(this,''f7_'|| LPAD (seq_id, 4, '0')
    ||''')"',
    'YES',
    '0',
    '-Select-',
    'f6_'|| LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c005,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(7,a.c006,'SELECT ITEM_NAME D,ITEM_NAME R FROM ITEM_DETAILS WHERE ITEM_GROUP =''' || a.c005|| '''' ,
    'style=""'
    ||'onchange="get_select_list_xml21(this,''f10_'|| LPAD (seq_id, 4, '0')
    ||''')"',
    'YES',
    '0',
    '-Select Name -',
    'f7_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c006,
    APEX_ITEM.TEXT(8,a.c007) c007,
    APEX_ITEM.TEXT(9,a.c008) c008,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009,'SELECT RATE D, RATE R FROM ITEM_DETAILS WHERE ITEM_NAME =''' || a.c006|| '''',
    'style=""',
    'YES',
    '0',
    '-Select Rate -',
    'f10_' || LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c009,
    APEX_ITEM.TEXT(11,a.c010) c010
    FROM APEX_collections a
    where a.collection_name = 'ABC'
    Thanks
    Manoj Kaushik
    Edited by: Manoj Kaushik on Mar 11, 2010 1:25 AM

  • Select list with entires contain HTMLname code (&nbsp)

    soory i have already enter this information but it seems to be gone.
    In Apex is the query for the select list define as:
    SELECT to_char(acv_from,'dd.mm.yyyy')||' - ' ||nvl(to_char(acv_to,'dd.mm.yyyy'),'&amp;nbsp;') d,
    acv_id r
    FROM ac_version where acv_reg_id= :P7_INF_REG_ID order by acv_from
    APEX 3 generate following HTML code:
    <select name="p_t09" size="1" id="P7_INF_SEL_TIME_PERIOD" onchange="document.getElementById('P7_INF_ACV_ID').value=document.getElementById('P7_INF_SEL_TIME_PERIOD').value;doSubmit('P7_INF_SEL_TIME_PERIOD'); ">
    <option value="-1">- New Period -</option>
    <option value="4928">27.11.2007 - 27.04.2009</option>
    <option value="6121">28.04.2009 - 24.10.2009</option>
    <option value="6827">25.10.2009 - 14.05.2010</option>
    <option selected="selected" value="8405">15.05.2010 - &amp;nbsp;</option>
    </select>
    APEX 4 generate following HTML code:
    <select name="p_t09" id="P7_INF_SEL_TIME_PERIOD" size="1" onchange="document.getElementById('P7_INF_ACV_ID').value=document.getElementById('P7_INF_SEL_TIME_PERIOD').value;doSubmit('P7_INF_SEL_TIME_PERIOD'); "><option value="-1">- New Period -</option>
    <option value="4928">27.11.2007 - 27.04.2009</option>
    <option value="6121">28.04.2009 - 24.10.2009</option>
    <option value="6827">25.10.2009 - 14.05.2010</option>
    <option value="8405" selected="selected" >15.05.2010 &amp;amp;nbsp;</option>
    </select>
    my question was who can i disable the substitution of the & to &amp;amp;
    Edited by: user12002118 on 08.11.2010 23:42
    Edited by: user12002118 on 09.11.2010 01:54

    Hi,
    @user12002118: What is the purpose of
    nvl(to_char(acv_to,'dd.mm.yyyy'),' ')I think the NVL isn't really necessary, because in the select list you will not see the blank anyway because it's the last character. Just remove the NVL and I think you should be fine. Or if you think you need it, just replace the   with a real blank.
    @Paul: In general a select list doesn't render any HTML tags. So a &lt;strong> will never show a bold text. That's why we have decided that the output should always be escaped to prevent any XSS attacks but also to prevent that user data accidentally breaks the HTML code like with & or >. But I see the problem if someone wants to have protected blanks where he would have to use the HTML entity &amp;nbsp; so that the browser really renders each single blank. But I think that it's a really rare case for a select list. But as always, there are two workarounds available:
    1) Use your unicode trick
    2) Add htf.escape_sc somewhere in your SQL statement. That could also be in a comment like /* htf.escape_sc */ Because in that case APEX thinks you are already taking care of escaping and doesn't do it's own escaping.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Sample JSP code needed with jdbc select lists

    Hello java experts!
    I need to create a series a jsp pages that connects to an ms access "books" database. This first page should connect to the books.mdb and populate select lists with the values from the database. The solution would be similar to the the books shopping cart in the CoreServlets book, EXCEPT I must do everything in JSP only.
    All I have done to this point is Java servlets. (I've done shopping cart stud in ASP.net, but not JSP).
    I know everyone hates to post code samples, but seeing the code will help me understand. I've read the API, the tutorials, 3 textbooks, and any other doc I could find. I understand Java beans and jsp, but I need to see the JSP for this to finally crystalize.
    Thanks in advance.
    -JavaGirl

    what school is teaching db access from jsp?

  • Multiple Select List Box default value ysing Fx or Code

    Hello,
    If anybody could help me in figuring out how to set default or customized values (checked) for a multiple select list box in infopath based on a values in a secondary data connection using the fx function or code, instead of manually typing in text in the
    default value function, it would be really helpful. Have been stuck for eternity in this 
    I have a temp table now which has each student name and the subject separtely
    something like this 
    Student Name       Subject  
    AA                              
    English
    AA                              Maths
    So that in my infopath form if I choose a student name in a drop
    down box the multiple selection list box has the values of the subject chosen by the student checked

    Hi,
    Please check the link below and see if it can meet your requirement:
    http://basquang.wordpress.com/2010/03/29/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010/
    Here is the design for your scenario:
    List1 for subject name
    List2 for student and subject (just as your temp table)
    Then you could create cascading drop-down in InfoPath form.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • One select list with multiple LOV's (LOV based on how page was called)

    APEX 4.0.2
    I've a DML form page from a report on which I need a single select list item to have a differing LOV based on how the form page was called.
    The calling page (report), contains an edit link column and a create button. Depending on which is selected, I wish the LOV for my select list item to change. The idea behind this is that if someone creates a new entry, I want to constrain the select list to a subset of rows of a table query populating the LOV. On the other hand, if an existing item is edited, I want the select list LOV containing all rows of a table query populating the LOV.
    What I've tried...
    - Duplicates of select list item each triggered to render based on an arbitrary value set when either "create" or "edit" are selected. This did not work because the item was part of DML and would not allow replication on the same page.
    - Logic in the LOV sql statement controlling which sql was to be run based on an arbitrary value set when either "create" or "edit" are selected. This did not work as logic is not allowed in LOV sql statements.
    Any thoughts? Many Thanks!
    Paul

    Hello Patrick!
    Thanks for responding - Love your captcha plugin!
    Anyway, these are the two dynamic LOV's. The first I have in play right now (when creating new records). I need to have the other for existing record modifications.
    LOV #1
    select stock_no d, stock_no r
    from   [email protected]
    where  status like '%Awaiting Transfer%'
    or     status like '%On Hold%'
    order by 1LOV #2
    select stock_no d, stock_no r
    from   [email protected]
    order by 1As I mentioned, I attempted to use plsql logic in the query to trigger one or the other based on a value set when the user either clicked an edit link or a create button but couldn't get the dynamic LOV to commit with that extra code in it.
    Thanks!
    Paul

  • NLS issue in Java/PLSQL code [ using ROWID]

    I have NLS related question regarding the following scenario in Java/PLSQL code ::-
    OracleResultSet ors = (OracleResultSet) stmt.executeQuery("select rowId from t where t.col = 'XX'");
    // The above query could return multiple rowIds.
    String strVal1 = null;
    String strVal2 = null;
    if(ors.next())
    strVal1 = ors.getROWID(1).stringValue();
    if(ors.next())
    strVal2 = ors.getROWID(1).stringValue();
    ArrayList strList = new ArrayList();
    strList.add(strVal1);
    strList.add(strVal2);
    Now I need to pass a list of rowId's from Java to PLSQL function f().
    oracle.sql.ARRAY rowListArr = convertArrayListToRowPointerList(strList, conn) ;
    OracleCallableStatement cstmt = (OracleCallableStatement)
    cstmt.prepareCall("begin f(?); end;");
    cstmt.setObject(1, rowListArr);
    cstmt.execute();
    where:-
    static oracle.sql.ARRAY convertArrayListToRowPointerList(ArrayList arr, Connection conn)
    throws SQLException {
    oracle.sql.ArrayDescriptor stDesc = ArrayDescriptor.createDescriptor
    ("DBUSER.ROWPOINTERLIST", conn);
    oracle.sql.Datum[] keyVals= new oracle.sql.Datum[arr.size()];
    for(int i = 0; i < arr.size(); i++) {
    keyVals[i] = new oracle.sql.CHAR((String) arr.get(i),
    oracle.sql.CHAR.DEFAULT_CHARSET);
    oracle.sql.ARRAY keyArr = new oracle.sql.ARRAY(stDesc, conn, keyVals);
    return keyArr;
    and
    create or replace type DBUSER.ROWPOINTERLIST as table of varchar2(4000);
    Will there be NLS issues in the above code, where I pass the rowId content
    that I obtain from one query, as array of string bind variables to a subsequent PLSQL procedure? --- first approach
    Or
    do I need to pass the rowId list , as a array of oracle.sql.ROWID via bind variables? -- second approach
    The problem I have in second approach is that in the DB we cannot define a type as a table of ROWID's. So currently I have RowPointerList as a table of varchar2's (note the length of list of rowId is not predetermined in my case, so I user table instead of varray).
    However I was wondering if the first approach will have any NLS issues.
    Will appreciate your comments.
    Thanks

    ROWIDs are represented as either hex-encoded values or base64 encoded values. Both encodings use pure ASCII, so there should be no NLS issues.
    I am not very familiar with the oracle.sql.ARRAY type, but unless absolutely necessary, I would avoid the oracle.sql.CHAR datatype (assuming 10g drivers). Using java.lang.String is preferred.
    -- Sergiusz

  • Display a value from PLSQL code to screen

    How to display a value from PLSQL code to screen without loading or refreshing the page?
    im using ajax to call the javascript to run the PLSQL code. i desire to view some value in the screen when i run the PLSQL code
    skud.

    anything that you print from the PLSQL code(using htp.p, htp.prn etc) with will available in Javascript as the server response. You can parse that string it in javascript and display it on screen or modify page items or create dynamic items/elements using those values.
    A minimal example
    Ondemand PLSQL process : TEST_PROCESS
    begin
      htp.prn('hello world');
    end;Javascript Code
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=TEST_PROCESS',0);
    ajaxResult = ajaxRequest.get();
    alert(ajaxResult);Will display an alert message "hello world"
    You can construct the string in JSON/XML format in PLSQL to pass complex data structures(or multiple values) or even HTML code, then do the required processing in Javascript, for example extract out item values from it and set items, convert the JSON array to a select list item in the page or put the HTML code with a div element in the page.

  • Report -- filter with selection list -- show all values after select page

    Hello!
    I have the following problem:
    - I have a report
    - this report can be filtered with a selection-list
    - the selection list is based on dynamic LOV and has a null-value
    - I added the code of the report the following, to filter the report after choosing a value of the selection list:
    ... and (instr(type, decode(:P8_FILTER_type, '%null%',type,:P8_FILTER_type)) > 0)
    This works very well.
    But my problem is: When the user logs out and the next time, he logs in, the selection list shows " --- show all values --- " (my null-display-value) and the report is empty "no values found".
    ---> I want to show the first time, the page is selected ALL the values of the report. (this is now only possile if I press the button which belongs to the selection list)
    I hope, somebody understands my problem.
    Thank you so much,
    LISA

    Hello Lisa,
    The first time it's probably NULL.
    So what you can do in your where: (instr(type, decode(NVL(:P8_FILTER_type,'%null%'), '%null%',type,:P8_FILTER_type)) > 0)
    Off topic: I also wonder if that where clause can't be simpler? Do you rely need the instr?
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • Select list works for some users not for others

    Apex 3.2, Oracle 10g
    I have a page with a select list. (other select lists work fine) This view is a based on a view over a dblink with the chain being (public synonym -> dblink view -> dblink real view )
    One user logs into the Apex app and the select list populates.
    I log in to the app, either through the developer login or the app login, navigate to the same page and the select list does not populate.
    What can cause this in Apex or is it a database issue.
    Someone said it may be a rights issue, but I thought all Apex users appeared as the same 'user' to the database.
    Miscellaneous points: The app authentication is via LDAP/OID and I can get the select list code work in SQL Developer.
    Thanks,
    Sam

    not sure what you are asking
    It is a "Select List"
    The sql is
    select x d, x r
    from view
    wher x is not null
    order by 1
    The view is a synonym in the application schema, points to a view on the same database instance (different user) which points to the real view via dblink to a different database instance.

Maybe you are looking for

  • Bootcamp and windows 7 on 2006 Macbook 1.8

    I was wondering if Windows 7 will work if installed via Bootcamp on a 1st gen Macbook White 1.8 Core Duo? Thanks

  • Play (out to camera) vs. Print to Video

    Got a problem here that's hit and miss. Sometimes I can play from FCP timeline with my camera connected to record to tape, other times no (just get my camera's blue screen). I know I can Print to Video, but I'm currently trying to get a two-hour proj

  • Stacked bar chart with negative values

    Hi, trying to create a stacked bar chart I only get a grey picture. Reason: my data series provides positive and negative values. Can anyone tell me a trick how to fix this problem?

  • What is a PERMAMENT ERROR in BPM?

    Hello, that´s nice. All the docs about BPM describe the possible reactions to PERMANENT ERRORS. But what is this? Background: We created a BPM with a send step in a block after a receive step (That´s simple so far!). The send step (async) in the bloc

  • My calling plan and line rental are not shown in M...

    When I look in My BT at 'My Services' under Phone, it shows Unlimited Weekend Plan - correct. There is no mention of the Anytime Calls package that I am actually paying extra for, although this does show up on my previous bills. There is also no ment