Dynamic LOV in a Tabular Form

Can somebody please tell me if there is a easy way to code a
dynamic LOV in a Tabular Form?
I need the ability to access a column value in the table row, to use in the WHERE clause of LOV query for another column in the row? Seems
like that should be easy , but not finding an answer.
Thanks for any help.
Carol

Hi Carol,
You can add the select list's definition directly into your SQL statement using APEX_ITEM.SELECT_LIST_FROM_QUERY - see: [http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_item.htm#CHDIDGDA]
If you first run your page with your existing select list on it, then do a View Source and look for the select list, you will see a "name" attribute of something like "f01" or "f02" etc. Make a note of the number part of this.
Then update your SQL statement to include the above and using the number you noted as the Index value (say, 4):
SELECT EMPNO,
ENAME,
DEPTNO,
APEX_ITEM.SELECT_LIST_FROM_QUERY(4,MGR,'SELECT ENAME d, EMPNO r FROM EMP WHERE DEPTNO = ' || DEPTNO || ' AND EMPNO <> ' || EMPNO) MGR
FROM EMPThat would give you a select list of employees in the same department as the current employee (excluding that employee themself)
Andy

Similar Messages

  • Dynamic Action On change tabular form question

    Hi guys!
    I've wanted to add dynamic action on change (tabular form) to execute PL/SQL which checks if column of the tabular form has changed and if yes it changes walue of text field to Y or N. It doesnt work...and I don't know why. If I create validation with this PL/SQL it works. Can you help?
    DA:
    On change - Tabular Form
    PL/SQL;
    DECLARE
       nazwa     VARCHAR2(4000);
       counter   NUMBER := 0;
    BEGIN
       FOR i IN 1 .. apex_application.g_f08.COUNT
       LOOP
        SELECT NAZWISKO INTO nazwa FROM SPR_META.M_UZYTKOWNICY WHERE NAZWA_UZYTKOWNIKA = apex_application.g_f02(i);
          IF wwv_flow_item.md5(nazwa) <>  wwv_flow_item.md5(apex_application.g_f08(i)) THEN
            counter := counter + 1;
          END IF;
       END LOOP;
       IF counter > 0 THEN
       :P5_IS_TABULAR_FORM_CHANGED := 'Y';
       ELSE
        :P5_IS_TABULAR_FORM_CHANGED := 'N';
      END IF;
    END;Page items to submit: P5_IS_TABULAR_FORM_CHANGE
    What's wrong?
    With regards,
    PsmakR

    Region static id shouldn be in bracketsYou missed the '#' informt of the region id.
    why my original PL/SQL process did not work
    FOR i IN 1 .. apex_application.g_f08.COUNTThis works only when the application array has values and that happens only when the page is submitted.When you submit the dynamic action , it isn't.
    This script combined with script to detect changes makes apex page running very slowIf you use that PLSQL code(assuming it works as expected) , then its going to take a server request every-time you change a field in the tabular form and loop though all the array values(if they would be submitted before) and recalculate and compare the checksums . Isn't that going to be very inefficient.
    As for that JS code, it only runs at the client side. You can do all the server side checks on submit, when the user expects some delay due to processing.

  • Help using a dynamic action to update tabular form items (specifically radio button) based on collection

    Hi Everyone, I have posted this question in the past and made huge progress with Denes Kubicek's help:  https://apex.oracle.com/pls/apex/f?p=31517:294:115851992029365::::: based on my earlier question posted: https://forums.oracle.com/forums/thread.jspa?threadID=2537494
    I am struggling with one item in my tabular form.  It is a radio button.  The choices all appear properly, but the value is not saved in the collection (and hence, not saved in the table).  All other items in the tabular form save properly.
    here is what I have for the query.   It is item c024 (which maps to ;'f03'), which is defined as a radio LOV based on an existing LOV.
    Currently I have:
    2 page items:
    P110_ID
    P110_VALUE
    Dynamic action called CHANGE COLUMN:
    event: CHANGE
    selection type: jQUERY Selector
    jQuery:
    jQuery Select = input[name='f03'],select[name'f08'],select[name='f09'],input[name='f10'],input[name='f11'],input[name='f12'],select[name='f40'],input[name='f21'],input[name='f22'],input[name='f23'],input[name='f50']
    event scope: Dynamic
    true action#1: set value P110_ID javascript expression this.triggeringElement.id
    true action#2: set value P110_VALUE javascript expression this.triggeringElement.value
    true action#3: execute pl/sql code
    declare
      v_member number;
      v_seq number;
    begin
      v_member := TO_NUMBER (SUBSTR (:p110_id, 2, 2));
      select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
      safis_collections.update_column(v_seq,
                                    v_member,
                                    :p110_value);
    true ation#4 refresh region :LANDINGS_COLLECTION
    the tabular form is based on the query:
    SELECT
    apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
    seq_id,
    seq_id display_seq_id,
    apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
    apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0','  -- Select Favorite --  ','f08_'||seq_id,'') Disposition,
    apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear,
    apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
    apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
    apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
    ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars,
    decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished,
    decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY,
    decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT,
    c024 hms_flag,
    decode(c050,'Y',apex_item.checkbox(21,'Y','id="f21_'||seq_id||'" style="background-color:#FBEC5D; " onClick="alterYes('||seq_id||');" onKeyPress="alterYes('||seq_id||');"',c021),'N','N/A') FinsAttached,
    decode(c050,'Y',apex_item.checkbox(22,'N','id="f22_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterNo('||seq_id||');" onKeyPress="alterNo('||seq_id||');"',c022),'N','N/A') FinsNotAttached,
    decode(c050,'Y',apex_item.checkbox(23,'U','id="f23_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterUnk('||seq_id||');" onKeyPress="alterUnk('||seq_id||');"',c023),'N','N/A') FinsUnknown,
    decode(c050,'Y',apex_item.textarea(28,c028,3,null,null,'f28_'||seq_id,''),'N','N/A') Explanation,
    decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale,
    decode(c020,'Y',
    apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;"',null,null,null,'f40_'||seq_id,''),
    'N','N/A') HMS_AREA_CODE,
    c020,c050,
    decode(c020,'Y',
    apex_item.text(41,TO_NUMBER(c041),5,null,null,'f41_'||seq_id,''),
    'N','N/A') Sale_Price
    from apex_collections
    where collection_name = 'SPECIES_COLLECTION' order by seq_id
    I have noticed the following:
    when I change column C011 (price) the following values are set in the dynamic action:
    P110_ID = f11_1
    P110_VALUE = whatever I change the price to.
    when I change the column C024 (hms_flag), the following values are set:
    P110_ID = f03_0001
    P110_VALUE = whatever I change hms_flag to.
    the region is refreshed in my dynamic action, and the change for hms_flag does not hold.  I have tested the SQL query that generates the value for v_SEQ in the dynamic action.   In both a change to price and HMS_FLAG it appears valid
    select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
    if f11_1, v_seq:= 1
    if f03_0001, v_seq := 1
    thank you!

    solved.  sort of. 
    field c024 references f03.
    the Dynamic ACtion, step 4 calculates v_member by taking a substring of P110_ID...and in all other fields, the column and the field (fxx) are the same value....except for c024.
    I am not certain exactly how to resolve, but see the problem.

  • Cascading LOV in a Tabular form

    Hi Guys,
    I have read numerous articles on the generation of cascading LOV's in a tabular form but havent been able to get it working
    I have created an example in my apex workspace at:
    http://apex.oracle.com/pls/apex/f?p=4000:1500
    workspace XXAPPS
    Username guest
    Password demo
    app no 17551
    Page 2
    In my test scenario, I have an emp table, dept table and an office table.
    Within my tabular form(based on the emp table), I have a deptno column and an office column.
    Depending on what the user selects in the deptno column, I would like the corresponding list of offices associated to that dept LOV to be returned in the offices LOV.
    The table structure is
    EMP
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO
    OFFICE_ID
    DEPT
    DEPTNO
    DNAME
    LOC
    OFFICE
    OFFICE_ID
    OFFICE_NAME
    DEPTNO
    When the user selects a deptno in the LOV I would like that to control the values that are returned in the office LOV.
    I have used Jari's blog post:
    http://dbswh.webhop.net/dbswh/f?p=BLOG:READ:0::::ARTICLE:2003800346210117
    but as you can see it isn't quite working in that the office LOV is not returning anything.
    I am pretty new new to JavaScript and jQuery so am no doubt doing something wrong as some of the steps are causing errors and are confusing me a bit e.g. step2 is causing the page to return blank (I have commented the code out in the example)
    Any help would be greatly appreciated.
    Thanks
    Edited by: Cashy on 07-Mar-2012 04:05

    Hi fac,
    That is the full code as per the Jari's link on http://dbswh.webhop.net/dbswh/f?p=BLOG:READ:0::::ARTICLE:2003800346210117 (last but one section of instructions).
    I have got the id of the elements (f07 and f06) by using IE Developer toolbar and have passed those into the dynamic action.
    The child element is now just showing loading...
    It seems to me that the on demand process is not being called because I changed the code to:
    DECLARE
    l_sql VARCHAR2(32700);
    BEGIN
    IF APEX_APPLICATION.G_x01 IS NOT NULL OR APEX_APPLICATION.G_x01 IS NULL
    THEN raise_application_error(-20001,'code gets here');
    l_sql := 'SELECT competency_id AS RET
    ,competency_description AS DIS
    FROM XXMEL_FOCUS_COMPETENTCIES
    WHERE competency_category_id = ' || APEX_APPLICATION.G_x01 || '
    ORDER BY competency_description
    APEX_UTIL.JSON_FROM_SQL(l_sql);
    ELSE
    HTP.prn('{"row":[]}');
    END IF;
    just to see if the code is getting to the process but the error message that I put in the PL/SQL is not firing.
    Chris

  • How to retain value in LoV item in Tabular Form, after Page Refresh

    Hi,
    I have a tabular form, which contains 2 items(columns), of type "Select List - named LoV".
    Now, 2nd item(column) in tabular form, that LoV should get populated based on user's selection value in first item LoV.
    1. So how do I refer to the value, that user selected in first item's LoV? I will have to use this value as reference in LoV query of my 2nd item ( on this tabular form)
    2. Everytime I select value in first item LoV, page gets refreshed, as my requirement is to calculate 2nd item's LoV based on selected value in first item. So after this page refresh, first item LoV loses its value that was selected before the page refresh happened. So how do i retain this value in first item LoV? I have an unconditional process, that on every submit(refresh) of page, I set all my items with their corresponding values. But problem is what do i mention there to refer to this first item ( of type LoV) of tabular form?
    I looked in view source of my page, this item is referred as f03.
    So i used "apex_application.g_f03", to set this item to its value, in my uncoditional submit process. But it did not work. I tried to refer this item as "f03" in this unconditional submit process. But still it did not help, the selected item loses its value after page refresh(submit).
    Please help.
    Thanks and Regards,
    Ravi.

    Hi Rave,
    You will have to use Javascript and Ajax to change the values as ApEx submissions will lose your results unless they are saved into the database.
    Remember, that as you are using a tabular form there will be lots of items called f01, fo2, fo3 etc on the page (one per row).
    Regards
    Michael
    Edited by: MKii on Jun 4, 2009 10:13 AM

  • Why doesn't a Popup Key LOV (named LOV) in a tabular form not display values in the popup?

    I have a tabular form and I'm setting one of the fields to a Popup Key LOV (named LOV). The named LOV is a static LOV. When the popup is displayed there are no values displayed. The same thing happens if I use a Popup LOV (named LOV).
    I created a sample application http://apex.oracle.com/pls/apex/f?p=15762:1that shows what happens. When the job field popup is selected, no items are displayed. If I change the item to a Select List (named LOV) it works fine.
    Is this a bug?

    Hi
    I am also getting the same issue. Hope it could be a bug.
    Can anyone plz confirm this?
    Thanks
    Lakshmi

  • Specify image for a pop-up LOV in a tabular form?

    Hi,
    I am using a tabular form for users to edit data. One of the fields has too many options to use a select list, so I have to use a pop-up lov (query based)... grrrr
    The lov shows up in my form as [Field value]List
    I would like to remove the text "List" and put a small icon there. Where can I specify the image source?
    Thanks,
    Rob

    Hi Denes,
    Thanks for your reply. I looked at your page, but I'm not sure if it relates to my issue.
    Here's a piece of the generated HTML for the pop-up lov:
    &lt;span class="lov"&gt;
    &lt;label class="hideMe508" for="f03_0004"&gt;f03_0004&lt;/label&gt;
    &lt;input id="f03_0004" type="text" value="U41" maxlength="2000" size="8" name="f03"/&gt;
    &lt;img align="middle" style="vertical-align: middle; cursor: pointer;" alt="List"/&gt;
    &lt;/span&gt;Notice that there is an image tag, but the src attribute is not there...as a result the browser displays the alt text List.
    If I missed your solution I apologise...

  • Default value of combobox using dynamic LOV in Oracle Portal form

    We are trying to specify the deafult value of a combobox on a form that derives it options from a dynamic LOV. The option value is a number and the display is text.
    E.g.
    <Option value="1">Books
    <Option value="2">CDs
    We have tried various ways of setting the default option to be selected on the Combobox. First, we tried using a sql query to return a number from a table (sql query returns number -> in the default value type field). Next, we tried to use a constant number (default value: 2, default value type: constant). In neither case, did the Oracle Portal form pre-select our default choice in the drop-down list.
    Any suggestions? I browsed the other forum articles on this topic and noticed several folks believed it was a bug in Portal. We are using Portal version 3.0.9 (latest App Server for the Ebusiness Suite). Thanks in advance.

    You can manually add the select list (or for that matter anything else) to a wizard created form. If the select list is for an existing item, simply change the "Display As" setting from Text to a Select List based on the LOV you create. Any changes made will then be applied by the update process.
    cheers,
    Ron

  • Restricting LOV values in tabular form

    Hi,
    I am new to APEX.
    I have a tabular updateable report with the following layout
    wagon_no container_no origination destination received_flag wagon_size
    wagon123 container123 MLPM DOZ N 20
    wagon456 container456 MLPM DOZ N 40
    Wagon number,container_number,origination,destination are LOV's and which can be updateable.
    Size is read only.
    I need to restrict the entry of the wagon's and container in the report.
    ie,If wagon Size is 20,then I can enter the same wagon size twice.
    If the wagon size is 40,then I can enter the wagon only once for a particular train.
    Can it be done at the LOV?
    Can it be done through Javascripts..if yes,how can it be done??I have not used Javascript..
    Also,the container cannot be entered twice..
    I tried restricting the container number in the LOV by not displaying the entered container number in the LOV .But,once saved and while querying later,it doesnot show the correct value.
    Can anybody help me out?please,its quite urgent..

    Hi,
    Have a look at Denie' example on cascading LOV's. this should give you some insight.
    http://apex.oracle.com/pls/otn/f?p=31517:42:8068804019748890::NO.
    Kind regards,
    Iloon

  • Bug in Static LOV definition in tabular form?

    I have always defined static LOVs as follows
    STATIC:Yes;Y,No;N
    but now with V4.0+ the select list at runtime appears as follows:
    STATIC:Yes
    No
    Suddenly the literal "STATIC" is appearing in the first display field.
    If I omit the word "STATIC:" from the definition, it seems to work fine. Was this an intentional change in the definition of static LOVs? If so, you then the developers need to update the help text for LOVs.
    PaulP

    bump...

  • Cascading LOVs in a tabular form - 2 fields

    Hi
    Since I cannot find the original thread to VIKAS sample application
    http://apex.oracle.com/pls/otn/f?p=24317:9:702016961545771
    anymore, could someone help me to adopt & strip down his example to only have 2 select fields dependent on each other
    This is the JavaScript I currently have from his site
    <HEADER>
    <script type="text/javascript">
    function appendToSelect(pSelect, pValue, pContent)
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){/* why is ie different ask bill */
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    else {
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    var g_products=new Object;
    var g_sales_reps=new Object;
    function replace_select_list(pSelect,pXML)
    var l_Count = pXML.getElementsByTagName("option").length;
    pSelect.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = pXML.getElementsByTagName("option");
    appendToSelect(pSelect, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
    function get_ajax_select_xml(pThis)
    var l_Return = null;
    var l_td=html_CascadeUpTill(pThis,'TD');
    var l_products=l_td.nextSibling.getElementsByTagName('select')[0];
    var old_product;
    if (l_products.options.length>0) old_product=html_SelectValue(l_products);
    var l_sales_reps=l_td.nextSibling.nextSibling.getElementsByTagName('select')[0];
    var old_rep;
    if (l_sales_reps.options.length>0) old_rep=html_SelectValue(l_sales_reps);
    if (g_products[pThis.value] && l_products) {
    replace_select_list(l_products,g_products[pThis.value]);
    if (old_product) html_SetSelectValue(l_products,old_product);
    else {
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=get_products',html_GetElement('pFlowStepId').value);
    get.add('TEMPORARY_ITEM',pThis.value);
    gReturn = get.get('XML');
    if(gReturn && l_products) { replace_select_list(l_products,gReturn); if (old_product) html_SetSelectValue(l_products,old_product);}
    g_products[pThis.value]=gReturn;
    get=null;
    if (g_sales_reps[pThis.value] && l_sales_reps) {
    replace_select_list(l_sales_reps,g_sales_reps[pThis.value]);
    if (old_rep) html_SetSelectValue(l_sales_reps,old_rep);
    else {
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=get_sales_reps',html_GetElement('pFlowStepId').value);
    get.add('TEMPORARY_ITEM',pThis.value);
    gReturn = get.get('XML');
    if(gReturn && l_sales_reps) {replace_select_list(l_sales_reps,gReturn);if (old_rep) html_SetSelectValue(l_sales_reps,old_rep);}
    g_sales_reps[pThis.value]=gReturn;
    get=null;
    </script>
    <FOOTER>
    <script type="text/javascript">
    function getCellIndex(pRow,pCell)
    if (document.all) {
    for(var j=0;i<pRow.cells.length;j++)
    if(pRow.cells[j] == pCell) return j;
    return pCell.cellIndex;
    function fire_onchange()
    var td_manufacturer=html_GetElement('MANUFACTURER');
    var l_cellindex=getCellIndex(td_manufacturer.parentNode,td_manufacturer);
    var l_table=html_CascadeUpTill(td_manufacturer,'TABLE');
    for (var j=1;j<l_table.rows.length;j++) {
    var l_cell=l_table.rows[j].cells[l_cellindex];
    var l_select=l_cell.getElementsByTagName('select')[0];
    if (l_select && l_select.onchange) l_select.onchange();
    fire_onchange();
    </script>
    ON DEMAND PROCESS (get_products)
    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 val from products
    where manufacturer=:TEMPORARY_ITEM)
    loop
    htp.prn('<option value="' || rec.val || '">' || rec.val
    || '</option>');
    end loop;
    htp.prn('</select>');
    end;
    Also does it make a difference if the temporary item (condition) is a string value rather than a numeric value?
    Thanks a lot!
    David
    Message was edited by:
    swosh

    Swosh,
    I think that this approach is better than the one from Vikas:
    http://htmldb.oracle.com/pls/otn/f?p=31517:176
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Bug Report: Static LOV's and PDF Printing with Tabular Forms

    I have a tabular form, which acts as an editable report. Some columns are 'Standard Report Column' and some are Select Lists, using Static LOV's with the contents of
    Yes;Y,No;NThe purpose of the page is to allow users to edit yes/no attributes of a row. Then, they can print the report.
    To make the current sort of the report reflect what is being printed to PDF, I've used a Report Layout associated with the report region, as oposed to a report query. A report query in this case would not reflect the sort of the report (all columns are sortable asc/desc).
    Anyway, I link my report with the layout created, and go to run it. I get this message.
    ORA-06550: line 1, column 50: PLS-00103: Encountered the symbol "," when expecting one of the following: := . ( @ % ; The symbol ":= was inserted before "," to continue.
         Error      ERR-1000 Unable to determine LOV from "declare function x return varchar2 is begin Yes;Y,No;N return null; end; begin wwv_flow_utilities.g_query := x; end;".
    OK      
    report error:
    ORA-20001: Error fetching column value: ORA-01403: no data foundI'm guessing the product is trying to take my static LOV and place it in a function to be able to generate which value is being displayed as text, from the select lists. However, it doesn't work.
    I've been able to get around it - by adding a YES_NO domain to my domain_codes table (a table which associates abreviations with full meanings), I can set by select lists to be query based select lists using the SQL select code_meaning, code from domain_codes where domain = 'YES_NO_CODE'. This still allows the user to dropdown Yes/No fields, and the PDF printing doesn't break.
    It is just me, or can't the PDF printing handle static LOV's in tabular forms/reports?

    Hi Patrick.
    I've tried STATIC:Yes;Y,No;Nwhile stating it is a Select List (static LOV). The values that are rendered on the page are
    [STATIC:Yes]
    [No        ]
    ----------I tried the same thing with STATIC2 instead of STATIC, and the same thing happened.
    It also broke if I tried STATIC or STATIC2 under Select List (query based LOV). This is within a report where there is no hyperlink to say 'Create/Edit static list' or 'Create Dynamic List', as there is under select list items.
    However, I am finding that for some reason, the values being sent to the PDF are not the values in the database (Y/N), but the showing values (Yes/No). This happens when I use the domain_code select query as the query based LOV.
    Furthermore, I cannot get any columns not rendering on the page to be generated in the PDF. I have a column that groups items depending on values, and I want this grouping to display in the PDF instead on the original value, ideally.
    Cheers,
    K.

  • Dynamic actions and tabular forms

    I'm trying to attach a dynamic action to a tabular form item, and it's not working the way I'm expecting it to. Since you can't attach dynamic actions to parts of a tabular form in the "normal" way that you can for page items, I'm using JQuery selectors to pick the parts to link to. For links (such as opening a pop-up window with more information about a row), this is working fine. But I'm really struggling to attach to a simple checkbox.
    On my tabular form, I've got a simple checkbox. I've tried putting text in the Element Attributes, Element Option Attributes, CSS Class, CSS Style, and HTML Expression fields, but none of them appear to be making it through to the source code of the generated page. Which means, I think, that I'm limited to using a jQuery Selector along the lines of "input[name=f07]", but creating a dynamic action on click or on change with that selector doesn't seem to ever fire.
    What am I missing?
    -David

    Ok, this is interesting. When I tried to mock this up on apex.oracle.com, I was able to make it work (though I had to change the selector to "input[name=f07_NOSUBMIT]", which means I'm going to have to walk the DOM to get the actual value...but I'm pretty sure I can handle that). After a bit of scratching my head, I eventually found that my pop-up dynamic action was somehow or other blocking the checkbox dynamic action from firing. Changing the sequence so that the checkbox DA happens first allows them both to fire.
    Here's the javascript from the pop-up DA (it's based on this post by Havard Kristiansen):
    /* prevent default behavior on click */
    var trgt = this.triggeringElement.href;
    var e = this.browserEvent;
    e.preventDefault();
    /* Trigger JQuery UI dialog */
    var horizontalPadding = 30;
    var verticalPadding = 30;
    $('<iframe id="modalDialog" src="' + trgt + '" />').dialog({
         title: "Item Details",
         autoOpen: true,
         width: 570,
         height: 400,
         modal: true,
         close: function(event, ui) {$(this).remove();},
         overlay: {
              opacity: 0.5,
              background: "black"}
    }).width(570 - horizontalPadding).height(400 - verticalPadding);
    return false;At this point, the checkbox DA's action is simply an alert box. Like I said, I'm not sure what's going on, but I'm at least able to move forward...
    -David

  • Dependent LOV in Tabular Form

    All,
    We are developing an application where we come across requirement to have two fields in tabular form and both are required to have LOV. But the issue is the second field LOV in the tabular form is dependent on first field value.
    ex: Assume first field is "Country" and second field is "Cities", when user selects first field country as "US", then we have to populate list of citiies in "US" for that row. And if the user selects country as "UK" for the second row, we have to populate second field (city) with list of citieis in "UK".
    We are unable to achieve this functionality and any help/pointers would be highly appreciated.
    Ram

    Hi Ram,
    Please have a look at this example by Denes Kubicek
    [http://apex.oracle.com/pls/otn/f?p=31517:176|http://apex.oracle.com/pls/otn/f?p=31517:176]
    I was able to achieve the cascading LOV functionality based on the above example.
    Thanks,
    Dippy

  • Dynamic Actions on tabular form items

    Has anyone had success with using dynamic actions on a tabular form item?
    When I create a dynamic action for the selection type I believe I want to use DOM Object, I am just not sure what ID I then need to put into the DOM Object field.
    Any help would be greatly appreciated
    Regards
    Mark

    If you wish to use JavaScript with tabular forms, I suggest looking at APEX_ITEM column types. They allow you to specify the JavaScript array number of any given column in your tabular form and rely on it. Then as you loop through your rows you can positively identify the element.
    Example:
    Original query:
    select colA, colB from myTable;
    select apex_item.text(1, colA, 20,20) as myText,
      apex_item.select_list_from_lov(2, colB, 'LOV_MYLOV', 0, 'NO') myLookup
      from myTable;I also highly recommend Firebug for Firefox. It will allow you to drill down into the DOM on any page to see the element identifications as the browser sees them. Definitely the best browser plugin for web development.

Maybe you are looking for