LOV cascading in tabular form

Hi guys,.

I have read many articles on the generation of LOV cascading in a tabular presentation, but have not been able to make it work

I created an example in my apex workspace at:

http://Apex.Oracle.com/pls/Apex/f?p=4000:1500
XXAPPS workspace
Name of guest user
Password demo
App no 17551
Page 2

In my test scenario, I have a table emp, dept and a desk.

In my tabular form (based on the emp table), I have a column deptno and a column of office.

Depending on what the user selects in the column deptno, I want the corresponding list of offices associated with this dept LOV to return to offices LOV.

The structure of the table 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 to the office of LOV.

I used the blog post from Jari:
http://dbswh.webhop.NET/dbswh/f?p=blog:read:0:article:2003800346210117

but as you can see there is not enough work that LOV Office does not return anything.

I'm fairly new new JavaScript and jQuery, so probably something wrong, because some steps are responsible for errors and are confusing me a bit for example step2 is causing the page to return to the white (I have commented the code in the example)

Any help would be greatly appreciated.


Thank you

Edited by: Cashy March 7, 2012 04:05

Hello

See your sample now

I have fix your dynamic action. You got some strange numbers start JavaScript.
Also, you have used bad selectors for parent and child select list.

I have also change the application process

Kind regards
Jari

Tags: Database

Similar Questions

  • JavaScript allows you to create cascading LOV to the tabular report only works on level 1

    I'm trying to implement a LOV cascading to a tabular report.  I have been using an example by Denes Kubicek (https://apex.oracle.com/pls/otn/f?p=31517:315).  I am able to get this example works when I'm on the workspace hosted APEX (workspacehttps://apex.oracle.com/pls/apex/f?p=67254:1 = COA demo/demo).  The example works as expected in the space of organized labor.

    My problem is when I take the application and import in a workspace internal APEX LOV Cascading sets the value of the first row in the table report; However, it does not define the following lines, and it does not dynamically change the values in the first rows of LOV, when another Department is selected.  I also tested the results by exporting the application on internal site to the hosted site. It works perfectly on the hosted site, but not inside.  Our internal APEX site is running version 4.2.2.00.11.

    The JavaScript code that is executed in dynamic Action is:

    elem var = ' # ' + this.triggeringElement.id;

    var = key "#", "f02_" + this.triggeringElement.id.substring (4);

    var set_list = ' # ', 'f04_' + this.triggeringElement.id.substring (4);

    var key_val = $(key) .val ();

    var elem_val = $(elem) .val ();

    var selected_val = ";

    (apex). Server.Process

    "getEmployees"

    {

    x 01: elem_val,.

    x 02: key_val

    },

    {

    success: function {(pData)

    $(set_list).find('option').remove ();

    $(pData, fonction (clé, innerjson) {} .each)

    $(set_list) .append ($("< option >', {})

    value: innerjson. VALUE,

    text: innerjson.NAME

    }))

    If (innerjson. SELECTED! = ") {selected_val = innerjson. SELECTED};

    });

    If (selected_val! = ") {}

    $('select'_+_set_list_+_'_option').each (function)

    {this.selected = (this.text == selected_val) ;})} ;

    }

    },

    }

    );

    Is it possible that our internal environment lacks some features used in code? How can I check to see if we have a missing function?  There are other reasons that the two environments react differently?

    Any help would be appreciated.

    Thank you

    PAM Zaske

    City of Arvada

    Arvada, Colorado

    Hello

    DBA should copy all images and static files to install image file zip to the web server.

    And of course old files need to be replaced.

    What web server you are using?

    Browser of witch you use when you test?

    When you test check browser console if there are JavaScript errors.

    Kind regards

    Jari

  • Dynamic LOV in tabular form

    Can someone please tell me if there is an easy way to code one
    Dynamic LOV in tabular form?
    I need the ability to access a column in the row of the table value, to be used in the WHERE clause of the query LOV to another column of the line? Seems
    how it should be easy, but do not find an answer.

    Thanks for any help.

    Carol

    Hi Carol,.

    You can add the definition of the selection list directly in your SQL using APEX_ITEM statement. SELECT_LIST_FROM_QUERY - see: [http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_item.htm#CHDIDGDA]

    If you run your page with your existing on this subject, first selection list, then do a View Source and find the list of selection, you'll see an attribute "name" of something as "f01" or "f02" etc. Take note of the part number of this.

    Then update your SQL statement to include the above, and using the number you noticed that the Index value (for example, 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 EMP
    

    Which would give you a list of selection of employees in the same Department as the current employee (excluding the employee themselves)

    Andy

  • Lovs cascading in a table, see the stored default value

    Hi all.

    I use 5 APEX.

    I need to create a Select list based on another inside a tabular presentation, I have followed this thread: How to make the selection list cascading in the form of? and when I add a new line it works OK, the problem is once I have save changes, if I have access to the tabular presentation page again every row shows 'Selection' - and the value that is stored in the database is not shown by default, the list is built according to the LOV parent for existing lines, but will return to the Mode "selection", that vary according to the initial behavior in the form of tables.

    Please help me to show the stored value for the lines already stored.

    Thanks in advance, best regards.

    Hi all.

    The problem is in the definition of the child selection list, I changed the "display additional values" field to YES and now it works perfectly.

    Concerning

  • LOV cascading works not when the page is public

    Hello

    I have a LOV cascading in a tabular form that I built example Denes Kubicek
    http://Apex.Oracle.com/pls/OTN/f?p=31517:176:2702932664861989:

    Thanks to this wonderful examle, I could make my lov cascading.

    However when I do the public page, the second lov (which is based on the first) does not work.

    Inorder to debug I changed to get.get () get.get ('XML') and put an alert on it; to check if the string of the selection list is correctly returned by the application process - it returns null. The alert even returns the string from the selection list when I set the authentication on the page.

    Also I noticed that when the page is public the application (TAB_CASCADING_ITEM) item is not be filled with the value of the first selection list.
    No matter who has encountered the same problem?
    Appreciate any suggestions?

    Thank you
    Dippy

    One of the parameters in the htmldb_get is the page on which the process is running. You should change this to the current page or make public page 0 as well.

  • APEX_ITEM can. SELECT_LIST_FROM_QUERY be used in tabular form?

    Hello

    Is it possible to add an apex_item to an existing query in tabular form, such as the one below?

    SELECT APEX_ITEM. SELECT_LIST_FROM_QUERY (3, job, 'Employment SELECT DISTINCT FROM emp') job

    WCP

    It is an example that can be found at APEX_ITEM.

    My actual query is as follows:

    Select

    "ROWID",.

    "REF."

    "DESCR",.

    APEX_ITEM. SELECT_LIST_FROM_QUERY (10, code, 'SELECT code FROM lov') 'CODE '.

    of ' #OWNER # '. " LOVREF ".

    The report definition, I put the element 'Code' as 'List of selection (query based LOV)' and I get the following error when I run the report:

    report error: ORA-20001: Error fetching column value: ORA-20001: Query must begin with SELECT or WITH

    REF

    Descr

    Code

    Can someone please say if the use of APEX_ITEM. SELECT_LIST_FROM_QUERY is valid in tabular form?

    Thanks in advance

    Yes, but your column definition must use "column of report Standard", if you want to use apex_item.

  • Q: problem LOV cascading APEX 4.1.1 DB 11.2.0.3

    Hello
    I have a form with two LOVs (region and country) and I try to get the country LOV change when I select a region. What happens is that I can choose a region, but no country appear (there is a small circular thing that gets displayed for one second, but the LOV country is never updated).

    That's what I did and I read the docs, and it seems that I made the right choice. I created 2 LOVs:

    LOV_REGION
    select region_name d, region_id r
    from region
    order by 1
    The example data:
    REGION_ID       7
    REGION_NAME     APAC
    LOV_COUNTRY:
    select c.country_name d, c.country_id r
    from  country c
    where c.region_id = :P3_REGION
    order by 1
    The example data:
    COUNTRY_ID      284
    COUNTRY_NAME    Australia
    REGION_ID       7
    On a page, I have two questions (list selection both of them):

    P3_REGION:
    -Named LOV: LOV_REGION
    -View the Null value
    -Opportunity source: only when current session value is null
    -Static assignment

    P3_COUNTRY:
    -Named LOV: LOV_COUNTRY
    -View the Null value
    -Articles of Parent LOV cascading: P3_REGION
    -Opportunity source: only when current session value is null
    -Static assignment

    To see that I'm sane, I followed the example here: http://docs.oracle.com/cd/E23903_01/doc/ doc.41 /e21674/bldapp_item.htm #HTMDB05014. On the same page. But no luck because it does not work either.

    Any ideas what I'm doing wrong, I hope that I just need more RedBull and a crash course by reading the documentation?

    update of the following

    Page items to submit P3_REGION

  • Bug LOV cascading?

    Hi all...

    Please help with this question.
    Not sure this is a bug or browser problem.

    APEX: 4.1
    Browser: IE 7
    Database: 11g

    If I have a lov cascading, and if I have a bit of javascript
    under the HTML FORM ELEMENTS ATTRIBUTES '"onchange ="alert ('hi');" » »

    Fires the event on change twice.

    why he shoots twice onchange?

    Please check the following application.

    http://Apex.Oracle.com/pls/Apex/f?p=41803:2

    Select a Department, you will get 2 alert messages.

    Y at - it a fix for this?

    Checked Firefox and Safari on Mac and I only get the alert once on two of these browsers. Sounds like a problem with IE. Surprise, surprise...

    Earl

  • Error LOV cascading on click of a button

    Hello
    I've implemented a LOVs 4 cascading in an app that fills in the correct data from the previous items. My problem is when I click on the search button to complete the registration data on the basis of the 4 values LOV cascading select list lose focus, they reduce to a minimum with no data. Someone at - he never experienced this and knows how to solve this problem? My list of Select cascading use processes of Application and JavaScript to fill in the values. I also use some methods of Application and Javascript based on research, the buttons back and forward to complete searchable data based on the value selected in the LOVs cascade. Help or knowledge is really enjoyed this question. I don't know if it an error in syntax or in the Select list is not searchable form using APEX values. I also have an example in any wants to take a look at the about, thanks again.

    Charles:

    The function "f_query_by_example" JS lent items with a tagname of "SELECT". I changed the line

    If (l_El.tagName == 'INPUT') {}

    to be

    If (l_El.tagName == 'INPUT' | l_El.tagName == 'SELECT') {}

    Good selection lists appear now.

    CITY

  • lov cascading does not

    I show no result for the next lov cascading. Can someone help me understand why? The p437_a_type field will be filled by a static lov. (99-1-agency 2-Department 3-division 4-section admin.)
    My second love will tear out of different select statements based on the value of the first lov. I tried to use a case statement, then went with a union State then decided to ask for help when neither one worked.

    I have a process application called CASCADING_SELECT_LIST1 with the following process:
    BEGIN
    OWA_UTIL.mime_header ("text/xml", FALSE);
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ("< select >");
    HTP.prn ("< option value ="' | 1 |) "" ' > ' | ' - all roles - ""
    || "< / option >".
    );

    FOR c IN (SELECT, Ruy)
    (SELECT '- no roles -' d, r 0
    OF the double
    where: cascading_selectlist_item_1 = 99
    UNION SELECT agency_name d, agency_id r
    OF the Agency
    WHERE: cascading_selectlist_item_1 = 1
    UNION select D_DEPT_NAME d, D_DEPT_ID r
    of the DEPARTMENT
    WHERE: cascading_selectlist_item_1 = 2
    UNION select d_div_name d, d_div_id r
    the Division
    WHERE: cascading_selectlist_item_1 = 3
    UNION select s_sec_name d, s_id r
    Article
    WHERE: cascading_selectlist_item_1 = 4)
    )
    LOOP
    HTP.prn ("< option value ="' | c.r |) '">' || c.d | ("< / option >");
    END LOOP;

    HTP.prn ("< / select >");
    END;

    I have a named item application: CASCADING_SELECTLIST_ITEM_1

    In my form my header javascript form is the following: < script >
    function get_select_list_xml1 (pThis, pSelect) {}
    var l_Return = null;
    var l_Select = html_GetElement (pSelect);
    get var = new htmldb_Get (null, html_GetElement('pFlowId').value,
    = CASCADING_SELECT_LIST1', 0);
    Get.Add ('CASCADING_SELECTLIST_ITEM_1', pThis.value);
    gReturn = get.get ('XML');
    If (gReturn & & l_Select) {}
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for (var i = 0; i < l_Count; i ++) {}
    var l_Opt_Xml = gReturn.getElementsByTagName ("option");
    appendToSelect (l_Select, l_Opt_Xml.getAttribute ('value'),
    l_Opt_Xml.FirstChild.nodeValue)
    }
    }
    get = null;
    }

    function appendToSelect (pSelect, pValue, pContent) {}
    var l_Opt = document.createElement ("option");
    l_Opt.value = pValue;
    {if (document. All)}
    pSelect.options.add (l_Opt);
    l_Opt.innerText = pContent;
    } else {}
    l_Opt.appendChild (document.createTextNode (pContent));
    pSelect.appendChild (l_Opt);
    }

    }
    < /script >
    My P437 - static type lov def is: Admin; 99, agency 1, Department 2, Division; 3, section; 4
    My lov def P437-A-Number is:
    R & d, SELECT
    Of
    (SELECT '- no roles -' d, r 0
    OF the double
    where: P437_A_TYPE = 99
    UNION SELECT agency_name d, agency_id r
    OF the Agency
    WHERE: P437_A_TYPE = 1
    UNION select D_DEPT_NAME d, D_DEPT_ID r
    of the DEPARTMENT
    WHERE: P437_A_TYPE = 2
    UNION select d_div_name d, d_div_id r
    the Division
    WHERE: P437_A_TYPE = 3
    UNION select s_sec_name d, s_id r
    Article
    WHERE: P437_A_TYPE = 4)
    ORDER BY 1

    Any help will be greatly appreciated.

    Published by: ethel on May 20, 2009 08:38

    Published by: ethel on May 20, 2009 10:50

    Published by: ethel on May 20, 2009 12:11

    Published by: ethel on May 20, 2009 12:14

    Hi Andy,.

    I hope you are well.

    I have a question about it.

    Is the name of the Application element must be identical to the variable binding in code enforcement process?
    In this case is the following

    Code of the ODP

    FOR c IN (SELECT d, r
    FROM (SELECT '-No Roles- ' d, 0 r
    FROM dual
    where :CASCADING_SELECTLIST_ITEM_1 = 99
    UNION SELECT agency_name d, agency_id r
    FROM agency
    WHERE :CASCADING_SELECTLIST_ITEM_1 = 1
    

    and the name of the application must be CASCADING_SELECTLIST_ITEM_1

    I ask this because I thought that the javascript is simply passing the value of the element of the ODP and not the name of the element.

    Before thanks for your insight.

    See you soon,.
    Joel

  • Call skillbuilder tabular form modal plugin

    Hello

    I have a tabular presentation, which I try to call the modal skillbuilders one of the columns page.

    The field I want to use to pass the modal page ID can be null, so I put a bit of functionality in the display only the link, if the ID is filled.

    I used the modal plugin before, but don't ever use this kind of functionality (from link on status of tabular form) as I have always previously used a button and assigned the id.

    Can someone advise how to assign the field WIP_TRACKING ID please that I can use to go to modal page?

    The tables SQL code is below:

    SELECT
    COMMENT_ID,
    COMMENT_ID COMMENT_ID_DISPLAY,
    APPLY_COMMENT_TIMING,
    CUSTOMER_NUMBER,
    ITEM_NUMBER,
    SAP_NSC_NAME,
    SAP_CUSTOMER,
    SET_STOP_INFLATING_ODR_SSD,
    COMMENT_TEXT,
    DISABLED_FLAG,
    CASE
      WHEN NVL(APPLY_COMMENT_TIMING,-1) =3
      THEN
      '<a href="'
      || 'f?p=&APP_ID.:2:&SESSION.::&DEBUG.::'
      || 'P2_COMMENT_ID:'
      || COMMENT_ID
      || '">'
      || '<img src="#IMAGE_PREFIX#edit_big.gif" alt="">'
      || '</a>'
      ELSE 'Not Tracked'
      END WIP_Tracking
    FROM #OWNER#.XXMEL_CPE_COMMENTS
    
    

    Cashy,

    You didn't say if your Apex 4 or 5. So better idea is now under the HTML code, or add custom attributes id = "".

    Laurent

  • Adding line by submitting the manual tabular form while adding lines

    Hi all

    I'm a newbie in the Apex.

    I created a manual tabular form based on Apex_Collection. In addition, created the buttons ADD, DELETE and APPLY the CHANGES .

    The data below are the steps that I did.

    1 initialize the Collections

    Process: When loading - before header

    Enforcement process: once a Page visit

    Source:

    DECLARE
      l_collection_name APEX_COLLECTIONS.COLLECTION_NAME%TYPE;
      l_bind_names      APEX_APPLICATION_GLOBAL.VC_ARR2;
      l_bind_values     APEX_APPLICATION_GLOBAL.VC_ARR2;
      l_query           VARCHAR2(32767);
    BEGIN
      l_collection_name := 'EMAILDETAILS';
    
      IF apex_collection.collection_exists(l_collection_name)
      THEN
      apex_collection.delete_collection(p_collection_name => l_collection_name);
      END IF;
    
      l_query := '   SELECT cmp_cd, ' --c001 => f01
      || '   email, ' --c002 => f02
      || '   tab_seq_id, '  --c003 => f03
      || '   NULL, ' --c004 => f04
      || '   NULL, ' --c005 => f05
      || '   NULL, ' --c006 => f06
      || '   NULL, ' --c007 => f07
      || '   NULL, ' --c008 => f08
      || '   NULL, ' --c009 => f09
      || '   NULL, ' --c010 => f10
      || '   NULL, ' --c011 => f11
      || '   NULL, ' --c012 => f12
      || '   NULL, ' --c013 => f13
      || '   NULL, ' --c014 => f14
      || '   NULL, ' --c015 => f15
      || '   NULL, ' --c016 => f16
      || '   NULL, ' --c017 => f17
      || '   NULL, ' --c018 => f18
      || '   NULL, ' --c019 => f19
      || '   NULL, ' --c020 => f20
      || '   NULL, ' --c021 => f21
      || '   NULL, ' --c022 => f22
      || '   NULL, ' --c023 => f23
      || '   NULL, ' --c024 => f24
      || '   NULL, ' --c025 => f25
      || '   NULL, ' --c026 => f26
      || '   NULL, ' --c027 => f27
      || '   NULL, ' --c028 => f28
      || '   NULL, ' --c029 => f29
      || '   NULL, ' --c030 => f30
      || '   NULL, ' --c031 => f31
      || '   NULL, ' --c032 => f32
      || '   NULL, ' --c033 => f33
      || '   NULL, ' --c034 => f34
      || '   NULL, ' --c035 => f35
      || '   NULL, ' --c036 => f36
      || '   NULL, ' --c037 => f37
      || '   NULL, ' --c038 => f38
      || '   NULL, ' --c039 => f39
      || '   NULL, ' --c040 => f40
      || '   NULL, ' --c041 => f41
      || '   NULL, ' --c042 => f42
      || '   NULL, ' --c043 => f43
      || '   NULL, ' --c044 => f44
      || '   NULL, ' --c045 => f45
      || '   NULL, ' --c046 => f46
      || '   ''O'', ' --c047 (for record status)
      || '   wwv_flow_item.md5(cmp_cd, email, tab_seq_id) ' --c048 (for optimistic locking)
      --c049 for (not used in collection/reserevered for seq_id array)
      --c050 (not used in collection/reservered for delete checkbox array)
      || ' FROM Cmp_Email '
      || ' WHERE cmp_cd= v(''P9_CMP_CD'') ';
    
      apex_collection.create_collection_from_query_b (
      p_collection_name => l_collection_name,
      p_query           => l_query
      );
    
    
      IF :REQUEST = 'ADD'
      THEN
      APEX_COLLECTION.ADD_MEMBER(p_collection_name => l_collection_name);
      END IF;
    
    END;
    

    2. tabular Guide

    Type: SQL query

    Source:

    SELECT apex_item.hidden(4,c047,NULL,'f04_'|| '#ROWNUM#')
      || apex_item.hidden(5,c048,NULL,'f05_'|| '#ROWNUM#')
      || apex_item.hidden(6,seq_id,NULL,'f06_'|| '#ROWNUM#')
      || apex_item.hidden(3,c003,NULL,'f03_'|| '#ROWNUM#')
      || apex_item.hidden(1,c001,NULL,'f01_'|| '#ROWNUM#')
      || apex_item.checkbox(
      7, 
      seq_id,
      NULL,
      CASE 
      WHEN c047 = 'D' THEN seq_id
      END,
      ':',
      'f07_' || '#ROWNUM#'
      ) AS delete_checkbox,
      apex_item.text(
      2,
      c002,
      20,
      50,
      NULL,
      'f02_' || '#ROWNUM#'
      ) AS email_id
    FROM apex_collections
    WHERE collection_name ='EMAILDETAILS'
    ORDER BY c002
    

    The buttons used:

    1. name button: ADD

    Action: send the Page

    2 button name: DELETE

    Action: send the Page

    3 Collection page

    Point process: present now - before the calculations and Validations

    Enforcement process: once a Page visit

    Source:

    DECLARE
    
    
      l_collection_name APEX_COLLECTIONS.COLLECTION_NAME%TYPE;
      l_original_md5    VARCHAR2(32);
      l_latest_md5      VARCHAR2(32);
    
    BEGIN
    
      l_collection_name := 'EMAILDETAILS';
    
      FOR x IN 1 .. apex_application.g_f06.count 
      LOOP         
      IF apex_application.g_f01(x) IS NOT NULL --ID exists, check to see if record was updated
      THEN
      SELECT c048 INTO l_original_md5
      FROM apex_collections
      WHERE collection_name = l_collection_name
      AND seq_id = apex_application.g_f06(x);
    
      l_latest_md5 := wwv_flow_item.md5(
      apex_application.g_f01(x),
      apex_application.g_f02(x),
      apex_application.g_f03(x)
      );
    
      IF l_original_md5 != l_latest_md5 
      THEN
      apex_collection.update_member(
      p_collection_name => l_collection_name,
      p_seq             => apex_application.g_f06(x),
      p_c001            => apex_application.g_f01(x),
      p_c002            => apex_application.g_f02(x),
      p_c003            => apex_application.g_f03(x),
      p_c047            => 'U',
      p_c048            => apex_application.g_f05(x)
      );
      END IF;
      ELSE --ID does not exist, must be new record
      apex_collection.update_member(
      p_collection_name => l_collection_name,
      p_seq             => apex_application.g_f06(x),
      p_c001            => apex_application.g_f01(x),
      p_c002            => apex_application.g_f02(x),
      p_c003            => apex_application.g_f03(x),
      p_c047            => 'N',
      p_c048            => apex_application.g_f05(x)
      );
      END IF;
      END LOOP;
    
      IF :REQUEST = 'DELETE' 
      THEN
      FOR x IN 1 .. apex_application.g_f07.count 
      LOOP
      apex_collection.update_member_attribute(
      p_collection_name => l_collection_name, 
      p_seq             => apex_application.g_f07(x), 
      p_attr_number     => '47', 
      p_attr_value      => 'D'
      );
      END LOOP;
      END IF;
       
    END;
    

    4. table collection

    Point process: submit now - after calculations and Validations

    Enforcement process: once a Page visit

    Source:

    DECLARE
      l_table_md5       VARCHAR2(32);
      l_collection_name APEX_COLLECTIONS.COLLECTION_NAME%TYPE;
      l_del_count       PLS_INTEGER := 0;
      l_upd_count       PLS_INTEGER := 0;
      l_ins_count       PLS_INTEGER := 0;
      l_success_message VARCHAR2(32767);
       
      CURSOR op_lock_check_cur (p_id IN NUMBER)
      IS
      SELECT wwv_flow_item.md5(cmp_cd, email, tab_seq_id)
      FROM Cmp_Email
      WHERE tab_seq_id = op_lock_check_cur.p_id
      FOR UPDATE;
    BEGIN
      l_collection_name := 'EMAILDETAILS';
    
    
      FOR x IN (
      SELECT *
      FROM apex_collections
      WHERE collection_name = l_collection_name
      AND c047 IN ('N','U','D')) 
      LOOP
      IF x.c047 = 'N'
      THEN
      INSERT INTO Cmp_Email(tab_seq_id,cmp_cd,email) 
      VALUES (cmp_email_seq.nextval,
      :P5_CMP_CD_HIDN, 
      x.c002
      );
    
      l_ins_count := l_ins_count + 1;
      ELSIF x.c047 = 'U'
      THEN
      OPEN op_lock_check_cur(x.c003);
      FETCH op_lock_check_cur INTO l_table_md5;
    
    
      IF l_table_md5 != x.c048 
      THEN
      raise_application_error(-20001,'Current version of data in database has changed since user initiated update process.');
      END IF;
    
      UPDATE Cmp_Email
      SET cmp_cd=:P5_CMP_CD_HIDN
      ,email = x.c002
      WHERE CURRENT OF op_lock_check_cur;
    
      CLOSE op_lock_check_cur;
    
      l_upd_count := l_upd_count + 1;
      ELSIF x.c047 = 'D'
      THEN
      DELETE FROM Cmp_Email
      WHERE tab_seq_id = x.c003;
    
      l_del_count := l_del_count + 1;
      END IF;
      END LOOP;
       
      apex_collection.delete_collection(p_collection_name => l_collection_name);
       
      l_success_message :=  
      l_ins_count || ' rows inserted, ' ||
      l_upd_count || ' rows updated, ' ||
      l_del_count || ' rows deleted';
    
      :P5_SUCCESS_MESSAGE:= l_success_message;
       
    END;
    

    When I press the ADD button, a new line must be added to the shape of the table and the data should be saved to the collection. , But currently, the page is being submitted to the database table when adding new lines in the form of tables. The data should only be saved in the database when the user clicks on the APPLY CHANGES button

    I searched the Forum about this issue and have found many discussions which suggested to use JavaScript to add new lines. As I have no knowledge of JavaScript, these solutions have been strange for me.

    Please help me solve this problem.

    Thanks in advance.

    Kind regards

    Aravind

    Hi Christophe,

    Follow the changes mentioned below

    1. remove this your Collections initialize

    IF :REQUEST = 'ADD'
    THEN
      APEX_COLLECTION.ADD_MEMBER(p_collection_name => l_collection_name);
    END IF;  
    

    2 condition your collection process initialize

    Modify your process-> conditions-> PLSQL Expressions->: REQUEST IS NULL

    3. create a process more onload I say Add new line to the collection

    DECLARE
        l_collection_name APEX_COLLECTIONS.COLLECTION_NAME%TYPE;
       BEGIN
          l_collection_name := 'EMAILDETAILS';
         IF apex_collection.collection_exists(l_collection_name)
          THEN
              APEX_COLLECTION.ADD_MEMBER(p_collection_name => l_collection_name);
              END IF;
       END;
    

    4 condition your Add new line to the collection

    Modify your process-> conditions-> request = Expression1-> ADD (this should be request ADD button)

    5. change your button-> Action addition-> redirect to this application page :-> page no (same page)->-> ADD APPLICATION

    6. check your through the process conditional Page collection

    Modify your process-> conditions-> PLSQL Expressions->: ASK IN ('ADD', 'APPLY_CHANGES', 'DELETE')

    7. check your subject to the process of Collection to Table under condition

    Modify your process-> conditions-> PLSQL Expressions->: ASK IN ('APPLY_CHANGES')

    8. for the whole process to remove the conditions when the button is pressed.

    If the problems persists, create a sample on apex.oracle.com and share the connection information with the name of workspace.

    Hope this helps you,

    Kind regards

    Jitendra

  • Added new line at the top of tabular form in APEX 5.0 and universal theme (topic 42)

    Hello Apex Experts,

    When the user clicks on the button 'Add Row' a tabular presentation, I would like the new line to be at the top of the report rather than the bottom.


    I followed the instructions from Added new line at the top of table in APEX 4.0 form and Denes Kubicek demo application. But it does nothing, always create new bottom line.


    Anyone have an idea or an idea?


    Your help would be appreciated.


    Kind regards

    Blabla

    Hi all

    This problem is now solved by following the new blogpost of Dene:

    http://www.deneskubicek.blogspot.de/2015/05/tabular-form-add-rows-top-universal.html

    Kind regards

    Blabla

  • APEX: Can we add additional items in tabular form existing

    Hi Experts,

    I built a nice tabular form with all the buttons and whistles.  All goes well until my request for the user to add another

    the point in the form of tables and here's my night Mare, I have this error code

    failed to parse SQL query: ORA-01403: no data found 

    I pinned it down to the process of the ApplyMRU or ApplyMRD; because once I delete these.

    I see the tabular presentation.

    But when I tried to manually recreate the SRM process, with the same criteria, I have the same error code

    Is this a Bug or just the way the behaviour of tabular presentation?

    What should I do to fix the error?

    Please don't tell me that I have to rebuild the tabular presentation.  :-(

    Hi JAS-Oracle,

    JAS-Oracle wrote:

    Hi Experts,

    I built a nice tabular form with all the buttons and whistles.  All goes well until my request for the user to add another

    the point in the form of tables and here's my night Mare, I have this error code

    failed to parse SQL query: ORA-01403: no data found
    

    I pinned it down to the process of the ApplyMRU or ApplyMRD; because once I delete these.

    I see the tabular presentation.

    But when I tried to manually recreate the SRM process, with the same criteria, I have the same error code

    Is this a Bug or just the way the behaviour of tabular presentation?

    What should I do to fix the error?

    Please don't tell me that I have to rebuild the tabular presentation.  :-(

    Here an other elements means another column in the form of tables... Right?

    This column to another is the same table on which you build your tabular presentation.

    If this is the case, then you must add the extra column in your select query and a few changes in the properties of this column, no need to do anything with the process of the MRU.

    for that go to report attributes-> change the newly added column-> slot of the attributes of tabular form

    The Table - name of the schema reference owner

    The Table name - name of the reference table

    Column name of the column in reference

    If this isn't the case then of additional information on the same.

    If the column is in the other table, to check out this blog: manipulate several tables in a tabular form

    or create the sample on the apex.oracle.com, allowing the user to resolve your issue quickly.

    ,

    Hope this helps you

    Kind regards

    Jitendra

  • Request Express 5.0.0.00.31/Tabular form/number of lines

    Hello

    I would like to ask how to configure the number of lines displayed per page.

    I did the below and also I tried to re-charge/reload, but impossible to get what I want.

    Implement a tabular form

    Set the presentation attributes of the State and the paging number of rows 50

    Registered and run this page, it shows still 15 ranks in this page.

    A I missed something? Or as a table don't allow no more than 15 lines be shown on 1 page?

    Thank you.

    Hello

    Pagination settings are cached for the duration of the session. This change is visible immediately, close the session, restart the brower and connect again or manually re - request the page from the browser's address bar, adding the ClearCache position 'RP' in the URL.

    Do not set anything in number of lines (point). This is used to identify an element of the page containing the number of lines to allow users to control this

    (Note: If you think it answers your question, please mark it as correct answer.) This will help other users in the community)

    Thank you

    Benhamdia

Maybe you are looking for