Conditional colour formatting in apex_item select list

Hello all,
I am having a select list in my tabular report created using apex_item.
What user want is the colour formatting of this select list according to the condition.
Say eg: A select list for departments, I want the departments with employees in different colour as compared to departments with no employees.
Please help.
Thanks
Tauceef

I've got a function in my package for this issue. Maybe it will gives you an idea how to solve this topic. The function is very similar to apex_item.select_list function, but there is a significant different. Displays values and returns values that are separated by two semicolons!
  FUNCTION get_select_list(p_idx NUMBER,
    p_value VARCHAR2 DEFAULT '',
    p_list_value VARCHAR2,
    p_attributes VARCHAR2 DEFAULT '',
    p_show_null VARCHAR2 DEFAULT '',
    p_null_value VARCHAR2 DEFAULT '',
    p_null_text VARCHAR2 DEFAULT '',
    p_item_id VARCHAR2 DEFAULT '') RETURN VARCHAR2 AS
    v_null VARCHAR2(4000);
    v_output VARCHAR2(4000);
    v_value VARCHAR2(4000);
    l_vc_fields htmldb_application_global.vc_arr2;
    l_vc_return_fields htmldb_application_global.vc_arr2;
  BEGIN
    l_vc_fields := HTMLDB_UTIL.string_to_table (p_list_value, ',');
    v_output := '<select name="f' || TRIM(TO_CHAR(p_idx, '09')) || '" ' || p_attributes;
    IF LENGTH(p_item_id) IS NOT NULL THEN
      v_output := v_output || ' id="' || p_item_id || '"';
    END IF;
    v_output := v_output || '>';
    v_null := '<option';
    IF LENGTH(p_null_value) IS NULL THEN
      v_null := v_null || ' value="%null%"';
    ELSE
      v_null := v_null || ' value="' || p_null_value || '"';
    END IF;
    v_null := v_null || '>';
    IF LENGTH(p_null_text) IS NULL THEN
      v_null := v_null || '%';
    ELSE
      v_null := v_null || p_null_text;
    END IF;
    v_null := v_null || '</option>';
    IF UPPER(p_show_null) != 'NO' THEN
      v_output := v_output || v_null;
    END IF;
    FOR i IN 1 .. l_vc_fields.COUNT LOOP
      l_vc_return_fields := HTMLDB_UTIL.string_to_table (l_vc_fields(i), ';;');
      v_output := v_output || '<option';
      IF l_vc_return_fields.COUNT = 2 THEN
        v_value := l_vc_return_fields(2);
      ELSE
        v_value := l_vc_return_fields(1);
      END IF;
      v_output := v_output || ' value="' || v_value || '"';
      IF v_value = p_value THEN
        v_output := v_output || ' selected="selected"';
      END IF;
      IF l_vc_return_fields.COUNT = 3 THEN
        v_output := v_output || ' ' || l_vc_return_fields(3);
      END IF;
      v_output := v_output || '>' || l_vc_return_fields(1) || '</option>';
    END LOOP;
    RETURN v_output || '</select>';
  END get_select_list;You can define three values for p_list_value instead of 2. The third value will be used as option attribute:
SELECT
my_package.get_select_list(
1,
'20',
'ACCOUNTING;;10,RESEARCH;;20,SALES;;30;;style="background-color: red;",OPERATIONS;;40'
) liste FROM dual;function returns
<select name="f01" >
<option value="10">ACCOUNTING</option>
<option value="20" selected="selected">RESEARCH</option>
<option value="SALES" style="background-color: red;">SALES</option>
<option value="40">OPERATIONS</option>
</select>The next step is just to create a function, which provide the string for p_list_value.

Similar Messages

  • Apex_item select list to be displayed with multiple default values

    I am using APEX 4.2.
    For one of our requirements , we are displaying a report which uses "apex_item.select_list_from_query" multiselect field.
    The above function accepts a parameter, 'p_value' using which we can specify the default value to be highlighted.
    Is there any way to highlight multiple values on the select list by default, when the page is loaded, based on a sql output.
    Sample Scenario:
    Say colour is a multiselect field. Full list of values available : R, B, G, Y, O
    On day1, for record1 i am choosing R and B. which I am saving in the backend when the page is submitted.
    On day2 : I login again to see the report. When the report is loaded, I should see the values 'R' and 'B' highlighted or in a different font format , differentiated from the rest.
    Thanks in advance for your replies.
    Regards,
    Raasi
    Edited by: 878815 on Mar 11, 2013 10:23 PM

    878815 wrote:
    I am using apex_item.select_list_from query. and then a piece of javascript to concatenate as a colon delimited string. This is the function I am using in the report sql,
    apex_item.hidden(20,null)||apex_item.select_list_from_query(6,null,'<sql>','multiple size = "6" onChange="Multi(this)"','NO' ) as col_1I think 'multiple size' is a custom attribute and APEX have no clue about it.
    javascript code:
    function Multi(p_this)
    var l_selected=html_SelectValue(p_this);
    if (l_selected.constructor == Array) l_selected=l_selected.join(':');
    p_this.parentNode.firstChild.value = l_selected;
    return l_selected;
    };What is this apex_item.hidden used for.. placeholder?
    May be populate the hidden item with default value as colon delimited string and on page load use some JavaScript to read that string and set/highlight the select list.
    It would be easy if you can replicate the issue on apex.oracle.com

  • 1 Conditional report based on 3 select lists/ 3 different select statements

    I have made 1 report based on the three select lists. The report is displayed in the center of the page. The user needs to fill them in order, the select lists are:
    Selectlist:
    1. P1_LOVPG - Null is allowed, but is only appearing at top with a label of Productgroup
    2. P1_LOVSG - Null is allowed, but is only appearing at top with a label of Subgroup
    3. P1_LOVMA - Null is allowed, but is only appearing at top with a label of Manufacturer
    LOVPG contains a distinct collect of the ProductGroups
    QUERY LOV = select distinct pg from X
    LOVSG contains a distinct collect of the SubGroups inside the selected PG.list
    QUERY LOV = select distinct sg from X where pg = :P1_LOVPG
    LOVMA contains a distinct collect of the Manufacturers inside the selected SG.lst
    QUERY LOV = select distinct ma from X where sg = :P_LOVSG
    Based on the the selected items the user would see the following:
    Table X
    PG SG MA ART
    A-----X----M---1
    A-----X----N---2
    A-----Y----M---3
    A-----X----M---4
    B-----X----M---5
    B-----Y----N---6
    B-----Z----O---7
    Seletion 1 PG = A -> selects PG A in select list result, User sees:
    Report A
    PG SG MA ART
    A-----X----M---1
    A-----X----N---2
    A-----Y----M---3
    A-----X----M---4
    Query would be: select * from X where PG = :P1_LOVPG
    Selection 2, user still sees the above, can only select from the SG select list NULL, X, Y. User needs to choose between X or Y value. He picks X, he sees:
    Report B
    PG SG MA ART
    A-----X----M---1
    A-----X----N---2
    A-----X----M---4
    Query would be: select * from X where PG = :P1_LOVPG and SG = :P_LOVSG
    Selection 3, user still sees selection 2 on his screen, can only select from the MA list bewteen NULL, M or N, user needs to choose between M or N. He picks M, he sees:
    Report C
    PG SG MA ART
    A-----X----M---1
    A-----X----M---4
    Query would be: select * from X where PG = :P1_LOVPG and SG = :P_LOVSG
    As you can see the query changes as the user goes deeper into the structure. It is a simple if then else system where the quey changes. How do I set this up in htmldb?
    (I've read something about Oracle's SQL and it's decode function, but can they be used with changing select statements?)

    are you sure your data meets the JOIN conditions?
    You can make a quick check.. only example...
    select single * from KONP into ls_konp
    where knumh = P_knumh.
    if sy-subrc eq 0.
    select * from from A905 into table lt_a905 where
         kappl in so_kappl
         and kschl in so_kschl
         and VKORG in so_vkorg
         and vtweg in so_vtweg
         and kondm in so_kondm
         and wkreg in so_wkreg
         and knumh = ls_konp-knumh.
    if sy-subrc eq 0.
    select * from A919 into table lt_a919
    for all entries in lt_a905
    where kappl = lt_a905-kappl
    and kschl = lt_905-kschl
    and knumh = lt_905-knumh.
    endif.
    endif.

  • Need to do conditional processing based on just-selected list item

    hi -- I have a vertical, unordered list. Each list item branches to a different page when selected.
    When the list item is selected, and before the branch happens, I need to do some conditional processing
    that depends on which list item was just selected.
    How can I get information about which list item was just selected?
    Thanks,
    Carol

    Carol - List items get rendered as links on the page so as soon as you click the link the browser goes there. You can't normally run a process on the current page by clicking that link. I suppose you could build each list item target (defined in the list item definition) to use javascript that submits the page, perhaps passing the item name as the "request" value. Then when the page is submitted, an after-submit process could do whatever you need it to and similarly a branch could be defined for each list item that would take the user to the intended page.
    Scott

  • Conditional colour formatting lost after pivoting

    Hi All,
    Scenario is, I m reporting on essbase cube, and i have a report with 2 dim Account,TimePeriod and 2 fact columns Actual and ops.
    I have certain accounts which need to be highligted so i do it through conditional formatting in Accounts column. Also the corresponding measures also need to be highlighted which i have done thru conditional fomatting in criteria tab for that measures.
    Now the issue is the Accounts and measures get highlighted in table view but when i do pivot view it just highlights account column only and not the corresponding measures.
    Any input or comments is highly appreciated
    With Regards,
    Pradeesh

    Hi,
    Thanks Stijin and David for your reply. i was out for christmas holidays so cudn't reply. As you have mentioned my problem is the same i.e. 'cross-column conditional formatting'. But the columns that i need to highlight would be in integer format and not in char.
    I wud explain my scenario better. i have a accounts column and other measure columns as shown below. The accounts column is an union of members from different level of different hirarchy of a cube.
    2009/Q3 2009/Q3 2009/Q3 2009/Q3 2009/Q3
    'Accounts' 'Actual' 'Actual%' 'Ops' 'Ops%' 'Act vs Ops'
    A 29 20 39 51 16
    B 100 14 15 66 6
    C 55 44 84 87 4
    D 14 45 25 14 7
    I want the accounts column with entire rows of B and C to be highlighted, that means i want the value 'B 100 14 15 66 6' and 'C 55 44 84 87 4' to be highlighted.
    With regards
    Prads

  • Condition that checks the value of an Item derived from a select list

    I want to conditionally display and hide items in a region based on a select list item.
    Some items will display when the select list is at the default (%null%) and others will be displayed when the select list user selects from the select list.
    The display is then updated when the "SAVE" button is pressed and the page processed.
    How do I test the select list item to be null. The condition looks like this;
    Type: PL/SQL Expression
    :P1_SELECT is null
    I also tried, :P1_SELECT is not null and :P1_SELECT = '%nul%'.
    The latter changed the condition to :P1_SELECT = ''
    How can I test the valu in P1_SELECT?
    tia,
    Sam
    Message was edited by:
    After a long day I saw that I did not write the condition correctly. Mea culpa.
    slavanaway

    I had the problem wrong.
    The issue was a second field that could have a Y or N or null. When I checked it in PL/SQL expression as
    :P_YN != 'Y' and :P_SELECT is null
    assuming the null condition would resolve as != 'Y' I had to do an explicit check as
    (:P_YN != 'Y' or :P_YN is null) and :P_SELECT is null
    That fixed it.... I like null and I hate null
    Thanks for the reply

  • Conditional Select List in a Report maintained using a Multi Row Update

    I have a SQL Report that is maintained with a "Multi Row Update" process. One of the columns needs to be ether a "Select List" based on a named LOV or just "Text" (Read Only) based on the value in the column. I have the UI working using a case statement and apex_items in me SQL but the Report Column is not marked "Edit" and the "Multi Row Update" process just ignores changes.
    Any help would be great!

    Just curious, why is the first parameter to in third TEXT_FROM_ITEM invocation NULL instead of 20? Also check your first parameter in your ELSE. Shouldn't it be a global number as well?
    Did you try adding a hidden item to your SELECT statement? Something like:
    (case
    when CSSN.KTTR_BILL_STAT_UID = KT_UTIL_PKG.get_kttr_uid_from_ref_val('SESSION_BILL_STAT','SESSION_BILL_STAT_1') then
    apex_item.select_list_from_lov(20,CSSN.KTTR_BILL_STAT_UID,'KTTR_SESSION_BILL_STAT_PRPR','','NO')
    when CSSN.KTTR_BILL_STAT_UID = KT_UTIL_PKG.get_kttr_uid_from_ref_val('SESSION_BILL_STAT','SESSION_BILL_STAT_2') then
    apex_item.select_list_from_lov(20,CSSN.KTTR_BILL_STAT_UID,'KTTR_SESSION_BILL_STAT_PRPR','','NO')
    when CSSN.KTTR_BILL_STAT_UID is null then
    apex_item.text_from_lov(20,'KTTR_SESSION_BILL_STAT')
    else
    apex_item.text_from_lov(20,CSSN.KTTR_BILL_STAT_UID,'KTTR_SESSION_BILL_STAT')
    end) as KTTR_BILL_STAT_DISP,
    apex_item.hidden(30,CSSN.KTTR_BILL_STAT_UID) MIRRORThen in either an Javascript onBlur event on KTTR_BILL_STAT_DISP or in a Page Process assign the value of KTTR_BILL_STAT_DISP to MIRROR.
    Mike

  • Select list coloured based on selected value

    Hello,
    Could anyone please tell me if it is possible to display a LOV with a background colour based on the selected value ?
    In fact , I have a report with many select lists whose value can be Y,N,N/A and I would like that the corresponding LOVs have the background colour set according to the value .
    Thanks in advance,
    Andreea
    Edited by: user12064977 on 20-Oct-2009 02:15

    Andreea,
    Lets assume your select list item name is P1_SL and return values as follows
    Display -  Return
    N/A     -  NA
    YES     -   Y
    NO      -   NEdit you page and put JS code similar to following in footer section
    <script>
    slval = $v("P1_SL");
    sl = $x("P1_SL");
    if(slval=="Y")
    sl.style.backgroundColor="#FFCC80";
    else if (slval=="N")
    sl.style.backgroundColor="#CCAA80";
    else
    sl.style.backgroundColor="#CCCC80";
    </script>So background color will be set on page load.
    Now edit your page and put JS code similar to following in HTML Header section
    <script>
    function setColor(this1)
    slval = this1.value;
    if(slval=="Y")
    this1.style.backgroundColor="#FFCC80";
    else if (slval=="N")
    this1.style.backgroundColor="#FFAA80";
    else
    this1.style.backgroundColor="#CCCC80";
    </script>Edit your select list item and set following for 'HTML Form Element Attributes'
    onChange="javascript:setColor(this);"So the select list color will be set accordingly 'onChange'.
    Cheers,
    Hari

  • Converting Year in YYYY format for return in select list

    Using Apex 4.1.1 on Linux (Apex Listener on glassfish)
    I have a table with week ending dates and use this table for as my LOV.
    The select list comes up like 12-SEP-12 when I check the value attribute in Firebug. Problem is that this comes up as year 0012 instead of 2012 when I try to use it in my PL SQL code to save it to a table.
    Is there a way I can get the return value for the year in YYYY format for return value in select list? Have tried to_date(dt, 'DD-MON-YYYY') with no luck.
    Cheers.

    All APEX session state values are held as VARCHAR2s. Explicit conversion to and from DATE values using specified formats is recommended. Convert to VARCHAR2 in the LOV query:
    select to_char(week_ending, 'DD-MON-YYYY') l, to_char(week_ending, 'YYYY-MM-DD') v from ...and to DATE in the PL/SQL process code:
    ...to_date(:p1_week_ending, 'YYYY-MM-DD')...I'm trying to standardise on using ISO 8601 representations for non-displayed date values. These are unambiguous, sort properly using character semantics, and are compatible with other systems and technologies.

  • Dynamic select list with display,return val & join condition issue.

    hello,
    I am having a dynamic select list with display, return value
    say for example my select statement is
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (e.deptno=dt.deptno)
    where (condition)
    when i tried this query for my select list, it is not working. It saying that
    " LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query. "
    I am not able to understand the problem. Can anyone help me out with this issue?
    thanks.

    Shouldn't your join have dept as the driving table?
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (dt.deptno = e.deptno)
    where (condition)
    Or using older Oracle standard join
    select distinct dname d, deptno r
    from dept dt, emp e
    where (dt.deptno (+) = e.deptno) AND (OTHER WHERE condition)
    OR
    (Since a right join is just getting the values from the driving table that are NOT in the associated table)
    select distinct dname d, deptno r
    from dept dt
    WHERE dt deptno NOT IN (SELECT deptno FROM emp) AND (OTHER where condition)
    Thank you,
    Tony Miller
    Webster, TX

  • Report displayed based on Select List condition

    Hello,
    Any help would be appreciated.
    I have a report and a select list, P55_MISSING. The select list contains the column names in the table that the report displays.
    If I select one of the column names, I would like to display all records where that column name is null.
    The sql I have at the moment is:
    select
    "ID",
    "APPLICATION",
    "SHORT_DESCRIPTION",
    "DESCRIPTION",
    "OPC_NET_NAMES",
    "PROCESSING_SCHEDULE",
    "PROCESSING_REGULARITY",
    "PLATFORMS_INVOLVED",
    "UNIX_DIRECTORIES",
    "SOURCE_FILES",
    from "APP_METADATA"
    where :P55_MISSING IS NULL
    If I select 'source files' for example, I would expect to see 3 out of 4 records stored in the table. However, I receive the message 'no data found'.
    Any help would be great. Thank you.

    Hi
    In order to doe this you will have to use dynamic sql (so you have to change your report type to 'SQL Query (PL/SQL Function Body Returning SQL Query)').
    It would then look something like this...
    DECLARE
    l_sql VARCHAR2(32767);
    BEGIN
    l_sql := 'SELECT id,
                     application,
                     short_description,
                     description,
                     opc_net_names,
                     processing_schedule,
                     processing_regularity,
                     platforms_involved,
                     unix_directories,
                     source_file
              FROM   app_metadata
              WHERE ';
    l_sql := l_sql||:P55_MISSING||' IS NULL';
    RETURN l_sql;
    END;Sorry, I can't test this as I don't have your tables.
    Cheers
    Ben

  • Conditional Validation on Textfield(s) based on Select/List - help needed.

    Hey Gang,
    I have a simple page where a select/list menu with values "1" through "5" determines how many following textfields require validation. There is an "onchange" event which calls a function to update the validation. Below is my code:
    [ body tag *spry js/css scripts are called in head]
    <form id="form1" name="form1" method="post" action="">
      <p>
          <select name="menu" id="menu" onchange="menuFunction()">
            <option value="0" selected="selected">0</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
          </select>
      </p>
      <p>
        <span id="sprytextfield1"><input type="text" name="text1" id="text1" /></span><br />
        <span id="sprytextfield2"><input type="text" name="text2" id="text2" /></span><br />
        <span id="sprytextfield3"><input type="text" name="text3" id="text3" /></span><br />
        <span id="sprytextfield4"><input type="text" name="text4" id="text4" /></span><br />
        <span id="sprytextfield5"><input type="text" name="text5" id="text5" /></span>
      </p>
    <p><input type="submit" name="submit" id="submit" value="Submit" /></p>
    </form>
    <script type="text/javascript">
    <!--
    function menuFunction() {
          var menuNum = document.getElementById('menu').value;
         for(i=1; i<=5; i++) {
               if(i<=menuNum) {
                    eval("var sprytextfield" +i+ "= new Spry.Widget.ValidationTextField(\"sprytextfield" +i+ "\")" );
               } else {
                   eval("var sprytextfield" +i+ "= new Spry.Widget.ValidationTextField(\"sprytextfield" +i+ "\", \"none\", {isRequired:false})" );
    //-->
    </script>
    [ / body tag etc... ]
    The function seems to work when it requires the validation for the textfields, but not when removing the validation. I've tried doing  eval("sprytextfield" +i+ ".destroy()"); as well without success.
    I've searched through forums and could not find an answer to this (sorry if I missed it)  ... so hopefully somebody can point me in the right direction. (*I found the post w/ the link http://www.spry-it.com/examples/spry-widget-validation-generation-and-destroy/ -- however that page doesn't seem to work *Chrome)
    Thanks for any help! =)
    ~Mike

    Have a look here http://forums.adobe.com/message/2651124#2651124
    If that doesn't help please come back here.
    Ben

  • Dynamic Select List / Radio Buttons triggering conditional display of field

    Hi HTMLDB Team,
    I wanted to mimic this very nice and useful HTMLDB 'select list feature' at the HTMLDB "Create Application ... from Application Export file " ... option .
    ie when you hit the form that asks you to "install the application", i,e
    Builder - Application >Export Import>Export Repository>Install Application
    you have the the following radio Options :
    Install As Application
    X Reuse Application ID 401 From Export File
    X Auto Assign New Application ID
    X Change Application ID
    New Application
    The "New Application ID" field appears only when I select "Change Application ID" radio option. That great and that's exactly what I want.
    How do you do that ?
    I am currently using a select list instead of radio list. It's the same thing ... I
    I tried " many options of the "select list with redirect .... with submit .... but I was not successfful. All I am trying to achieve is to offer a list of departments ... but when the user select "other", I want to show a text field for the user to type in the "other Department" ... without losing what I had already entered in the form previously and without actually Submitting the form . I still have other fields to enter after the select list .
    Is that possible with pure HTMLDB ?
    Or do I have to craft up some Javascript .
    I'd prefer pure HTMLDB .. I do not want to use javascript, to avoin a maintenance nightmare once I submit the code to other developers ...
    Can you pls help ?
    Thanks a lot.

    Hello,
    Take a look at these built in javascript function
    they should give you what you want.
    http://htmldb.oracle.com/pls/otn/f?p=11933:39
    CarlCarl,
    if I understand it right, these functions are already built in Apex 2.2.1.
    I need to show an item with label when user selects certain radio button. This sounds like the opposite to f_Hide_On_Value_Item_Row function.
    Can this task be done with apex built-in javascript functionality at this moment?
    Thanks

  • 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')"
    }

  • Dynamic Action based on Interactive Report Select List Value

    I'd like to perform a Dynamic Action when a user selects one of 3 options from a Select List within an Interactive Report:
    select APEX_ITEM.SELECT_LIST(
    p_idx => 3,
    --p_value         =>   deptno,
    p_list_values => 'Copy;Copy,Delete;Delete,Export to PDF;Export to PDF',
    --p_attributes    =>   'style="color:red;"',
    p_show_null => 'YES',
    p_null_value => NULL,
    p_null_text => '--Select--',
    --p_item_id       =>   'f03_#ROWNUM#',
    p_item_id => 'P6_IR_SELECT_LIST',
    p_item_label => 'Label for f03_#ROWNUM#',
    p_show_extra => 'YES') "Actions"
    from dual;
    When building the Dynamic Action, I chose the following values from the Advanced wizard
    Event: Select
    Selection Type: DOM Object
    DOM Object: P6_IR_SELECT_LIST
    Condition: Equal to
    Value: "Delete"
    True Action: Execute Javascript Code: Alert('Here');
    Doesn't seem to be firing...can anyone help?
    Thanks in advance,
    John

    Hi,
    I am not sure if the "equal to" condition applies to a DOM object... after all, a DOM object can be anything (any HTML element) not only a field.
    Try using a javascript expression instead, like this:
    $v('P6_IR_SELECT_LIST')=='Delete'UPDATE: Sorry, I just tested and "equal to" condition works for DOM objects... should have tested before posting!
    Luis
    Edited by: Luis Cabral on Feb 29, 2012 4:45 PM

Maybe you are looking for

  • Apple's latest noisy powerbook drives me crazy

    I posted this on silentpcreview.com, and re-post here to share you with my experience with the latest apple product. I just returned the latest verison of powerbook 12" to apple. Because it's so noisy. I choose apple's laptop because many people in t

  • OSX 2 Finger swipe makes image swipe away

    Hi I am running PS on my MacBook with OSX Lion I am finding that I keep accidentally swiping my image (panning) around as I am attempting to use the OSX swipe gestures. Its very annoying as I have to keep realighning my image up on the desktop. Thank

  • Chapters and Playlists.

    I have a one piece video from P Pro. I have set the menus and chapters within that timeline. I have a button to play all and one for each chapter and after each chapter the end action to the menu. Each of the chapter sections works well. However whre

  • XML Signature with WSDL

    Hello!!! I created this topic also at Security forum, but i think that was a wrong choice I need to consume Web Service (WSDL). It's working without any problem. But there is also one operation where I need to add Digitial Signature to it. It is very

  • How do be sure I don't lose contacts when I update to ios5

    I have a 3G iphone and have read the horror stories of losing all your contacts.  I have backed up the iphone to my Windows 7 computer.  I have transferred all my purchases to itunes.  I have heard that many people are finding that the backup doesn't