Multiple Tabular Forms

Hello Friends,
i have multiple Tabular Forms in a page,[I have used Denes Kubicek's examples...they are very good, easy to understand and make copies:) . Thanks Denes, if you see this thread]
each of the tabular form has 2 buttons to ADD and SAVE [ ADD will add new rows and SAVE will SAVE the rows with a page process]. Since I have multiple tabular forms, when ADD button of 4th tabular form is clicked, the page refreshes and takes me to top of page. Instead, Is there a way, I can make APEX remember the button I clicked and take the page to same position.
Thanks for reading my question.Appreciate any help/directions in this regard.
Chaitu..

Hello,
This is still valid for the newer versions:
http://www.oracle.com/technology/products/database/application_express/howtos/howto_navigate_in_a_page-1.6.html
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
-------------------------------------------------------------------

Similar Messages

  • Manual tabular form (Multiple Tabular forms)

    Hi,
    I am using APEX v4.0.
    In my application, I am having a few issues with the generation of a manual tabular form. I need two tabular form on the page so I have created the first using a wizard and the second through the use of a collection using skillbuilders tutorial at http://www.skillbuilders.com/webinars/webinar.cfm/49?title=Manual%20Tabular%20Forms%20in%20Oracle%20APEX:%20A%20Methodology%20that%20Works
    Independently, they work as expected i.e. if I have a condition on the 1st tabular form to never display and only display the 2nd, it works fine and vice versa. However, if I try to try to display them both, I am getting errors.
    When both forms are displayed and I make a change to the form generated by the wizard, I am getting the error 'ORA-01403: no data found'.
    When both forms are displayed and I make a change to the form I generated manually, I am getting the error 'ORA-01722: invalid number'.
    Can someone please suggest where I should be looking as independently they are working fine, but when they are both on the page together, they are not.
    Thanks

    Hi Nicollette,
    I have got a bit further with it now thanks. The wizard form is now working when BOTH forms are displayed. I am still having a few issues with the manual one. When I try to insert a record I am getting:
    ORA-01410: invalid ROWID
         Error      
    It is now letting me delete and update though.
    I have the following as a before submit process:
    DECLARE
       l_collection_name APEX_COLLECTIONS.COLLECTION_NAME%TYPE;
       l_original_md5    VARCHAR2(32);
       l_latest_md5      VARCHAR2(32);
    BEGIN
       l_collection_name := 'QC_COMPLAINT_MODELS';
       FOR x IN 1 .. apex_application.g_f49.count
       LOOP        
          IF apex_application.g_f10(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_f49(x);
             l_latest_md5 := wwv_flow_item.md5(
                apex_application.g_f10(x),
                apex_application.g_f11(x),
                apex_application.g_f12(x),
                apex_application.g_f13(x),
                apex_application.g_f14(x)
             IF l_original_md5 != l_latest_md5
             THEN
                apex_collection.update_member(
                   p_collection_name => l_collection_name,
                   p_seq             => apex_application.g_f49(x),
                   p_c010            => apex_application.g_f10(x),
                   p_c011            => apex_application.g_f11(x),
                   p_c012            => apex_application.g_f12(x),
                   p_c013            => apex_application.g_f13(x),
                   p_c014            => apex_application.g_f14(x),
                   p_c047            => 'U',
                   p_c048            => apex_application.g_f48(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_f49(x),
                p_c010            => apex_application.g_f10(x),
                   p_c011            => apex_application.g_f11(x),
                   p_c012            => apex_application.g_f12(x),
                   p_c013            => apex_application.g_f13(x),
                   p_c014            => apex_application.g_f14(x),
                   p_c047            => 'U',
                   p_c048            => apex_application.g_f48(x)
          END IF;
       END LOOP;
       IF :REQUEST = 'DELETE_MOD'
       THEN
          FOR x IN 1 .. apex_application.g_f50.count
          LOOP
             apex_collection.update_member_attribute(
                p_collection_name => l_collection_name,
                p_seq             => apex_application.g_f50(x),
                p_attr_number     => '47',
                p_attr_value      => 'D'
          END LOOP;
       END IF;
    END;and this as an after submit process:
    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(cm_id, serial_number, fd_number, complaint_id, model_name)
          FROM XXMEL_QC_COMPLAINTS_MODELS
          WHERE cm_id = op_lock_check_cur.p_id
          FOR UPDATE;
    BEGIN
       l_collection_name := 'QC_COMPLAINT_MODELS';
       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 XXMEL_QC_COMPLAINTS_MODELS(
                cm_id,
                serial_number,           
                fd_number,
                complaint_id,
                model_name
             ) VALUES (
                XXMEL_QC_COMPLAINTS_MODELS_S.nextval,
                x.c011,
                x.c012,
                x.c013,
                x.c014
             l_ins_count := l_ins_count + 1;
          ELSIF x.c047 = 'U'
          THEN
             --Optimistic lock check
             --MD5 should be identical to collection initialization proc
             OPEN op_lock_check_cur(x.c010);
             FETCH op_lock_check_cur INTO l_table_md5;
             -- Compare the checksum values and if they are different, raise an error.
             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 XXMEL_QC_COMPLAINTS_MODELS
             SET serial_number = x.c011,
                fd_number = x.c012,
                complaint_id = x.c013,
                model_name = x.c014
             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 XXMEL_QC_COMPLAINTS_MODELS
             WHERE cm_id = x.c010;
             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';
       :P8_SUCCESS_MESSAGES := l_success_message;
    END;Thanks
    Edited by: Cashy on 17-Oct-2012 02:12

  • Possible for more than one tabular form?

    According to everything I have seen in the forum, in the past there has been no way to have multiple tabular forms on a page, even in different regions.
    Can anyone tell me if this has changed for ApEx 3.0?
    How can I create a page with multiple tabular forms or reports? If it is possible, please tell me what is the method to accomplish this.
    Thanks,
    Maggie

    Thanks Leo,
    I will try.
    I have a (master or parent) table, FEATURES. A FEATURE may be found at one or more LAT_LONG_LOCATIONS (detail or child table). A FEATURE may also be found located in one or more STATES (detail or child table).
    I was actually trying to use the Master-Detail Wizard. But, I needed more than one Detail on the Master. Was looking for a Master-Detail-Detail. So after using the Master-Detail Wizard, I created another region and put another tabular report in it. Got my Master-Detail-Detail form. But both tabular form reports would not work.

  • How to use Ajax Get Multiple Values in Tabular form?

    Hi All-
    I am trying to use AJAX to get multiple values in tabular form by using Denes Kubicek's example in the following link -
    http://apex.oracle.com/pls/otn/f?p=31517:239:9172467565606::NO:::
    Basically, I want to use the drop down list to populate rest of the values on the form.
    I have created the example(Ajax Get Multiple Values, application 54522) on Oracle site -
    http://apex.oracle.com/pls/apex/f?p=4550:1:0:::::
    Workspace: iConnect
    login: demo
    password: demo
    I was able to duplicate his example on page 1 (home page).
    However, I want to use system generate tabular form to finish this example, and was not able to populate the data correctly.
    Page 2 (method 2) is the one that I am having trouble to populate the column values. When I checked application item values in Session, and the values seems to be populated correctly.
    This is what I have done on this page:
    1. Create an Application Process On Demand - Set_Multi_Items_Tabular2:
    DECLARE
      v_subject my_book_store.subject%TYPE;
      v_price my_book_store.price%TYPE;
      v_author my_book_store.author%TYPE;
      v_qty NUMBER;
      CURSOR cur_c
      IS
      SELECT subject, price, author, 1 qty
      FROM my_book_store
      WHERE book_id = :temporary_application_item2;
    BEGIN
      FOR c IN cur_c
      LOOP
      v_subject := c.subject;
      v_price := c.price;
      v_author := c.author;
      v_qty := c.qty;
      END LOOP;
      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 ('<body>');
      HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
      HTP.prn ('<item id="f04_' || :t_rownum || '">' || v_subject || '</item>');
      HTP.prn ('<item id="f05_' || :t_rownum || '">' || v_price || '</item>');
      HTP.prn ('<item id="f06_' || :t_rownum || '">' || v_author || '</item>');
      HTP.prn ('<item id="f07_' || :t_rownum || '">' || v_qty || '</item>');
      HTP.prn ('</body>');
    END;
    2. Create two application items - TEMPORARY_APPLICATION_ITEM2, T_ROWNUM2
    3. Put the following in the Page Header:
    <script language="JavaScript" type="text/javascript">
    function f_set_multi_items_tabular2(pValue, pRow){
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Set_Multi_Items_Tabular2',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM2',pValue)
    get.add('T_ROWNUM2',pRow)
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM2','null')
        gReturn = get.get('XML');
        if(gReturn){
            var l_Count = gReturn.getElementsByTagName("item").length;
            for(var i = 0;i<l_Count;i++){
                var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
                var l_ID = l_Opt_Xml.getAttribute('id');
                var l_El = html_GetElement(l_ID);   
                if(l_Opt_Xml.firstChild){
                    var l_Value = l_Opt_Xml.firstChild.nodeValue;
                }else{
                    var l_Value = '';
                if(l_El){
                    if(l_El.tagName == 'INPUT'){
                        l_El.value = l_Value;
                    }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
                        l_El.parentNode.innerHTML = l_Value;
                        l_El.parentNode.id = l_ID;
                    }else{
                        l_El.innerHTML = l_Value;
        get = null;
    </script>
    Add the follwing to the end of the above JavaScript:
    <script language="JavaScript" type="text/javascript">
    function setLOV(filter, list2)
    var s = filter.id;
    var item = s.substring(3,8);
    var field2 = list2 + item;
    f_set_multi_items_tabular2(filter, field2);
    4. Tabular form query:
    select
    "BOOK_ID",
    "BOOK",
    "SUBJECT",
    "PRICE",
    "AUTHOR",
    "QTY",
    "BOOK_ID" BOOK_ID_DISPLAY
    from "#OWNER#"."MY_BOOK_STORE"
    5. In Book_ID_DISPLAY column attribute:
    Add the following code to element attributes: onchange="javascript:f_set_multi_items_tabular2(this.value,'#ROWNUM#');"
    Changed to -> onchange="javascript:setLOV(this,'f03');"
    Now,  T_ROWNUM2 returns value as f03_0001. But, TEMPORARY_APPLICATION_ITEM2 returns as [object HTMLSelectElement]...
    Please help me to see how I can populate the data with this tabular form format. Thanks a lot in advanced!!!
    Ling
    Updated code in Red..

    Ling
    Lets start with looking at what the javascript code is doing.
    function f_set_multi_items_tabular(pValue, pRow){
      /*This will initiate the url for the demand process to run*/
      var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
                              'APPLICATION_PROCESS=Set_Multi_Items_Tabular',0);
      if(pValue){
        /*If there is an value than submit item name with value*/
        get.add('TEMPORARY_APPLICATION_ITEM',pValue)
        get.add('T_ROWNUM',pRow)
      }else{
        /*Else set the item TEMPORARY_APPLICATION_ITEM to null*/
        get.add('TEMPORARY_APPLICATION_ITEM','null')
      /*Submit the url and te returned document is of type XML*/
      gReturn = get.get('XML');
      if(gReturn){
        /*There is something returned*/
        var l_Count = gReturn.getElementsByTagName("item").length;
        /*For all elements of the tag item*/
        for(var i = 0;i<l_Count;i++){
          /*Get the item out of the XML*/
          var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
          /*Get the id of the item*/
          var l_ID = l_Opt_Xml.getAttribute('id');
          /*Get the element in the original page with the same id as
          **the item we have in the XML produced by the ondemand process
          var l_El = html_GetElement(l_ID);
          /*Now get the value of the item form the XML*/
          if(l_Opt_Xml.firstChild){
            var l_Value = l_Opt_Xml.firstChild.nodeValue;
          }else{
            /*There is no value*/
            var l_Value = '';
          if(l_El){
            /*There is an element with the same id as the item we are processing*/
            if(l_El.tagName == 'INPUT'){
              /*The element is an input item just set the value*/
              l_El.value = l_Value;
            }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
              /*If it is a span elment and has the class grabber
              **Then set the innerHTML of the parent to the value
              **and the id of the parent to the id
              l_El.parentNode.innerHTML = l_Value;
              l_El.parentNode.id = l_ID;
            }else{
              /*Else set the value as innerHTML*/
              l_El.innerHTML = l_Value;
      get = null;
    Now where it went wrong in your initial post
    The XML that was returned by your XML process would be something like
    <body>
      <desc>this xml genericly sets multiple items</desc>
      <item id="f02_1">CSS Mastery</item>
      <item id="f03_1">22</item>
      <item id="f04_1">Andy Budd</item>
      <item id="f05_1">1</item>
    </body>
    When you don't use apex_item to create your tabular form a item in the table will look like
    <input id="f02_0001" type="text" value="CSS Mastery" maxlength="2000" size="16" name="f05" autocomplete="off">
    Notice the id's f02_1 and f02_0001 don't match.
    So to make it work the XML would have to look like
    <body>
      <desc>this xml genericly sets multiple items</desc>
      <item id="f02_0001">CSS Mastery</item>
      <item id="f03_0001">22</item>
      <item id="f04_0001">Andy Budd</item>
      <item id="f05_0001">1</item>
    </body>
    To do that simply use lpad in the ondemand process like
    HTP.prn ('<item id="f02_' || lpad(:t_rownum,4,'0') || '">' || v_subject || '</item>');
    HTP.prn ('<item id="f03_' || lpad(:t_rownum,4,'0') || '">' || v_price || '</item>');
    HTP.prn ('<item id="f04_' || lpad(:t_rownum,4,'0') || '">' || v_author || '</item>');
    HTP.prn ('<item id="f05_' || lpad(:t_rownum,4,'0') || '">' || v_qty || '</item>');
    Keep in mind that the above is based on your original post and #ROWNUM# not being lpadded with zero's.
    Nicolette

  • Password Masking & Background Color for Multiple Rows in Tabular Form

    Hi all,
    I have a requirement of making a column in Tabular form, having multiple rows, masked(password field). I also want to give bg color to this field indicating that its a mandatory field.
    I am unable to accomplish both at a time in my page. I am using Apex 3.2.
    Waiting for your valuable comments. Thanks,
    Regards,
    Sandeep

    APEX_ITEM API doesnot have a password function, but input fields of type password are available in HTML.
    So you would have to change the field type to password in JS
    That is from :
    <input type="text" ...change it to
    <input type="password" ...If you were using jQuery it would have been simpler, but to do it in native JS it is a bit more hard work.
    Anyway here goes (a quick check in a tabular form seens to work fine)
    var password_array=document.getElementsByName("f04");
    for(var i=0;i<password_array.length;i++)
       password_array.type = 'password';
    password_array[i].style.backgroundColor = 'RED';
    +Replace the "f04" with your password field's array name(use firebug to identify the field name)+
    Does that solve your problem ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to create multiple Tree Type Region In Tabular Form ?

    Dear Friends,
    i have to design tabular form to Distribute User Rioght to emp to access application
    eg if i have Three module in application
    1.Administration
    2.Attendance
    3.Accounts
    Module
    1 Administration have 5 Pages A,B,C,D,E.
    Module
    2 Attendance HAVE 4 Pages F,G,H,I
    Module
    3 Accounts HAVE 7 Pages J,K,L,M,N,O,P
    I need these three module divided into three section in tabular form as a tree Type like
    Module 1 Tree Open in Tabular Form like
    - (Tree Mark Open )
    =======================================================
    PAGE_ID-------------SUBPAGE_ID-------VIEW-------------------MODIFY-------------------CREATE----------------------------TABLE COLUMN NAME
    ========================================================          
    Administration-----------A------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------B------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------C------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------D------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------E------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    - (Tree Mark Open )
    Module 2 Tree Open in Tabular Form like
    Attendance-----------F------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Attendance-----------G------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Attendance-----------H------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Attendance-----------I------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    - (Tree Mark Open )
    Module 3 Tree Open in Tabular Form like
    Accounts-------------J------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------K------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------L------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------M------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------N------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------O------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------P------------------CHECK bOX------------CHECK BOX-------------CHECK BOXi need divided these three Module in Tabular form in three region as tree.
    Table APPLICATION_PAGE_DETAILS
    ID                   NUMBER
    PAGE_ID             NUMBER
    SUB_PAGE_ID          NUMBER
    ========================
    TABLE USER_RIGHT
    ======================
    ID                  NUMBER
    EMP_ID            NUMBER
    PAGE_ID            NUMBER
    SUB_PAGE_ID        NUMBER
    VIEW                    VARCHAR2(1)
    MODIFY                VARCHAR2(1)
    CREATE                VARCHAR2(1)How to create multiple Tree Type Region In Tabular Form ?
    How can i do this ?
    Thanks
    Edited by: Vedant on Oct 4, 2011 3:21 AM
    Edited by: Vedant on Oct 4, 2011 9:09 PM
    Edited by: Vedant on Oct 13, 2011 8:57 PM

    Well think of it I believe the scenario is too bird viewed hence the solution can't be exact.
    But thinking of a possible solution every time a child operation fails have a catch block where you you go back to system if the parent needs to be deleted if yes, call Delete Method on the parent.
    Note: Make sure that the decision on whether or not the parent record needs to be deleted will depends on the question "Does Parent Record already has several other children associated to it or not"
    Hope this clarifies.
    Regards,
    Messer

  • Processing mutliple records on multiple pages in a tabular form

    I'm a newbie to Apex (4.0). I have a tabular form displaying 500 rows records in multiple pages. The row selector is selected by defaulted ie. all rows have been checked. Upon unselecting items in multiple page, the Multi Row Delete (Post Processing Request) only deletes the records selected on the page. It seems like the ROW SELECTOR does not keep track of the checkboxes on other pages. Any thoughts on how to solve this would be helpful.
    Thank you.
    Ed.

    Sybrand,
    Thanks for the response. So in that case, how would I approach the following requirement:
    Tabular form that displays 500 records each in multiple pages. The Row Selector column is selected by default. The user will uncheck certain rows in certain pages. I would like to perform a Multi Row Delete for alll the records that were selected.
    Thanks,
    Ed.

  • Tabular Form to insert multiple rows at once

    Reading the forum I see I should use a tabular form to create an insert page to create multiple records at once. However is there a way to do this without loading records from the table so it will just be a plain create page?
    Any help is appreciated, thank you

    Hi Marc,
    That tutorial was pretty useful. And I have it somewhat working.
    Right now I have it auto displaying blank rows by default which is good and my collection is being created and everything. However, where I am having the problem now is updating the collection with the values from each field.
    Here is my script I am using:
    declare
    c pls_integer := 0;
    begin
    for c1 in (
    select seq_id from apex_collections
    where collection_name = 'INSERT_BLANK'
    order by seq_id)
    loop
    c := c+1;
    if apex_collection.collection_exists(p_collection_name => 'INSERT_BLANK') then
    for i in 1..apex_application.g_f01.count
    loop
    APEX_COLLECTION.UPDATE_MEMBER(
    p_collection_name => 'INSERT_BLANK',
    p_seq => c1.seq_id,
    p_c001 => nvl(apex_application.g_f01(c),''),
    p_c002 => nvl(apex_application.g_f02(c),''),
    p_c003 => nvl(apex_application.g_f03(c),''),
    p_c004 => nvl(apex_application.g_f04(c),''),
    p_c005 => nvl(apex_application.g_f05(c),''),
    p_c006 => nvl(apex_application.g_f06(c),''),
    p_c007 => nvl(apex_application.g_f07(c),''));
    end loop;
    end if;
    end loop;
    end
    I made a process On Submit Before Computation with this and another one that inserts the data in to the table:
    for i in 1..apex_application.g_f01.count
    loop
    if apex_application.g_f02(i) is not null then
    insert into pinfo_t
    (id,
    name,
    start_date,
    end_date,
    value,
    database_id,
    host_id)
    values
    (apex_application.g_f02(i),
    apex_application.g_f03(i),
    apex_application.g_f04(i),
    apex_application.g_f06(i),
    apex_application.g_f07(i),
    apex_application.g_f08(i),
    apex_application.g_f09(i));
    end if;
    end loop;
    It keeps coming back with "ORA-01403: no data found "
    Any ideas?

  • Multiple Users - Tabular Forms - Multi Row Update.....

    Greetings All,
    Any comments, assistance, links, or even answers on the following situation would be much appreciated....
    I have a Application Express 4.0 (Could upgrade to 4.1 if it would help this issue)
    I have a wizard generated tabular form on a table, the form will show up to 600 records (rows) on a page.
    Part 1:
    The situation:
    User 1: Opens the form and brings up latest data set.
    User 2: Opens the form and brings up the latest data set.
    User 1: Changes data for record 1
    User 1: Hits submit. The data is saved.
    User 2: Changes data for record 1
    User 2: Changes data for record 2
    User 2: Hits submit. The following error is produced:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "3EE15D666E9DBDC59D34CE4CFB3950C0", item checksum = "922DA12AE1E3D8856695745C4D2830D2"., update "<Removed> Error Unable to process update.
    When this error occurs no updates get made to the table.
    I understand that row 1 can not be updated, however I would like row 2 (and all other rows where there is no conflict) to be updated. I would then like to be able to highlight in the form the rows that failed to update (And reload the data in them from the DB).
    Is this something I can achieve using my own MRU procedure, or in another way?
    Can anyone point me to a good example, tutorial or book showing how to do this.
    Thanks!

    Thanks for the comments guys.
    I have solved my issue in two different ways. Way one was not so clever, but worked, involving writing my own process for handling multi-row updates and would allow a user to fill in data for multiple rows (say 10) and have only the row with changed data rejected. V2 takes a very different approach, it uses Javascript, AJAX and the DOM model of the form to check when data is changed / updated by the user. Essentially, when a user enters an updateable form element, a AJAX request checks if the data has been changed. If it has, the value in the form is updated, and the color changed to blue to alert the user. When the user updates the data item, and AJAX request posts the new value to the database, where it is inserted. I had to build a bit of a framework to make this useable, and have to use dynamic sql in the database packages, but it work really well for what my users need! There are limitations (Currently it only supports date fields, text fields and drop down lists) but it works for me. It also involves traffic back and forth with the server each time a user moves the focus to a new form element, but it is a very light request and the work to do the select / updates in oracle is all based on a primary ke, so is ver quick.
    Solution 1: (Would need to be made much more elegant):
    1: Create a new text Item called P5_MESSAGE (To display error / success messages)
    2: Create a new process:
    DECLARE
    l_cks wwv_flow_global.vc_arr2;
    j pls_integer := 1;
    vUpdatedCount number := 0;
    vErrorCount number:=0;
    vMessage varchar2(4000):='';
    BEGIN
    select wwv_flow_item.md5(firstname,lastname,age) cks
    BULK COLLECT INTO
    l_cks
    from VA_TEST1 ;
    for i in 1..l_cks.count
    loop
    if htmldb_application.g_fcs(i) != l_cks(i) then
    -- Log error
    vErrorCount:=vErrorCount+1;
    vMessage:=vMessage||'Could not update row with ID:' || htmldb_application.g_f01(i) || '. This data has been updated by another user since you retrieved the data.<br>';
    else
    -- Do insert
    vUpdatedCount:=vUpdatedCount+1;
    update VA_TEST1
    set
    FIRSTNAME = replace(htmldb_application.g_f02(i),'%'||'null%',NULL)
    ,LASTNAME = replace(htmldb_application.g_f03(i),'%'||'null%',NULL)
    ,AGE = replace(htmldb_application.g_f04(i),'%'||'null%',NULL)
    where ID = htmldb_application.g_f01(i);
    end if;
    end loop;
    :P5_MESSAGE := vMessage;
    end;
    Note, this currently updates every row, even if the data is unchanged, this could be fixed by comparing the checksum of the data to be inserted with the checksum of the data in the table, if the same then no need to insert.
    Solution 2:
    Too complex to explain in detail here, if you need to implement this then let me know.

  • Tabular Form in multiple Sections?

    Hi,
    Does anyone know how to split up a tabular form into multiple sections?
    Example, I have a table with 10 columns
    SELECT VALUE1, VALUE2, VALUE3, VALUE4, VALUE5, VALUE6, VALUE7, VALUE8, VALUE9, VALUE10 FROM TABLE;
    And I need the following to be displayed:
    VALUE1 | VALUE2 | VALUE3 | VALUE4 | VALUE5
    12 13 14 15 16
    22 23 24 25 26
    VALUE6 | VALUE7 | VALUE8 | VALUE9 | VALUE10
    17 18 19 20 21
    27 28 29 30 31
    I realize I can do this by creating 2 separate tabular forms but the idea is to have the update button capable of updating all entries.
    Any ideas?

    You can have two tabular forms on one page only if you create it manually. See this example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:163
    With standard tabular forms, you have only one form allowed per page.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Bug in Tabular form Not Exist Validation, fails when creating multiple rows

    Hi,
    I have a Not Exist validation created for a Tabular form:
       select 1 from my_table where col1 = :col1 and col2 = :col2Execution State: For created and Modified Rows
    which is working fine when a row already there in DB
    and I am trying to enter a new row with same data.
    but when there's no data and I enter two rows with same data, validation does not fire, first row should allowed to enter
    but for second row it should give error that data already exists, which is not happening.
    for example,
    let's say I have a row in DB with: 1, 2, 3
    when I try to add a new row with same data ie. 1, 2, 3 validation fires and showing error, which is fine.
    but let's say there's no data in DB and I am entering two rows with:
    1, 2, 3
    1, 2, 3
    validation is not working this time, it is allowing to enter both the rows.
    do I need to create a manual validation for this or what?
    Apex 4.1.1.00.23
    Regards,
    Tauceef
    Edited by: Tauceef on Dec 6, 2012 10:09 AM
    Edited by: Tauceef on Dec 6, 2012 11:22 AM
    Edited by: Tauceef on Dec 6, 2012 11:27 AM

    Hello Tauceef,
    >> Now I got it, I was under impression that it will validate one by one row before insertion,
    >> but it's going to check all the rows first, then do the insertion.
    Just to clear things up, the APEX engine works exactly as you describe, but this is your problem.
    The APEX engine do check\validate all the rows first, one row at a time, and only if all the rows pass validation, the DML processes kick in. The DML processes work on the entire Tabular Form record set (per page view, of course).
    In order for your type of validation to work (the one that queries the database), as you want it, the validation and DML actions have to run together, row by row. This is not how things work, because it’s less efficient/optimal, and may lead to a situation where a certain row can fail validation, but other row(s) already been inserted/updated/deleted into/from the database. This could be a very tricky situation.
    Vikram has suggested to rely on a database constraint, and control the APEX error message. This is possible, although I’m not sure that in this case, the Tabular Form will retain all the user changes, in case of validation error. You should check it.
    Another option, which Marc hinted on, is to manipulate the G_Fxx arrays. In your case, you should loop through the new rows, compute their MD5, and make sure that all the rows have different MD5 values. This is on top of the current validation, which makes sure that the new rows do not already exist in the database.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • Multiple select lists in tabular form

    Hi,
    I created a tabular form with two select lists (Queries are same for both the select list and results around 300 records in the SQL).
    I am getting the following error:
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    If I changed Select list to POP list, I am not getting error.
    Please suggest how to user select list in this case.
    Regards,
    Meda

    LnTInfotech wrote:
    I created a tabular form with two select lists (Queries are same for both the select list and results around 300 records in the SQL).
    I am getting the following error:
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    If I changed Select list to POP list, I am not getting error.
    Please suggest how to user select list in this case.It is not possible. There is a 32K limit on the HTML generated for select list items. (As a type of report, tabular forms are also subject to the 32K limit on the size of a report row.)
    In terms of usability 200 options is about the maximum size I would consider sensible for a select list ( and for select lists in tabular forms, much, much fewer!)
    Use Popup Key LOVs.

  • URGENT: tabular form based on multiple tables

    Hi All,
    Its very urgent.......Can anybody tell me how to create a single tabular form to insert/update values from different tables.
    I want to create a tabular form with 3 cols. 1st col should be from one table and another two cols from other table.Please help.........
    Thank You
    Regards,
    Vinaya.

    You can use iframes in your page: (an iframe is a frame in your page. In this frame you can load another page) that way you can create three pages. The first page is the master page. The second and third page which also have tabular forms, are loaded as iframes in the first page
    The iframe is created as follows on your first page:
    1.create a html region
    2 create the tabular form on the second and third page
    3.reference the pages by entereing  the following code in the regions that will be used for displaying them:
    <iframe name="Your_region_name"   id="123" frameborder = "0" src=the page referenced width="580 px" height="250px" scrolling = "auto"></iframe>
    for example:
    <iframe name="Charge_Region"   id="123" frameborder = "0" src="f?p=&APP_ID.:14:&SESSION." width="580 px" height="250px" scrolling = "auto"></iframe>

  • Tabular form on multiple tables

    Hi there,
    I'm hoping to create a Tabular Form which is based on either a view or a join, whichever is easier.
    We have two tables - Division and Targets. Division references Targets on target_id. The tables share a one-to-one relationship. I was originally told to simply merge the 36 fields in Targets to the Division table, however, we're likely going to have other tables (such as Department and Section) which also share a one-to-one relationship with Targets.
    Is there a way to accomplish this with the Wizard, and if not, does anyone have any tutorials/advice on how to create PL/SQL to handle this?
    Thanks,
    Andrew

    Mike
    "Just for querying the data and making it appear in a single tabular form"
    ... hum so you would have to create a custom process anyway for the update - in which case, why have the view in the first place, there's no point.
    >
    What are the odds of moving the rows :P works for me anyways =P.
    >
    I'm not saying it's likely, but it can happen. As a developer you should take this into consideration when designing applications.
    So
    CREATE TABLE rowid_test
      pk_col             NUMBER PRIMARY KEY,
      col1               NUMBER,
      col2               VARCHAR2(6 CHAR)
    TABLESPACE DAT_DATA;
    CREATE SEQUENCE rowid_test_seq
      START WITH 1
      MAXVALUE 999999999999999999999999999
      MINVALUE 1
      NOCYCLE
      CACHE 20
      NOORDER;
    BEGIN
      FOR i IN 1 .. 150
      LOOP
        INSERT INTO rowid_test
        (pk_col,
         col1,
         col2)
        VALUES
        (rowid_test_seq.nextval,
         ROUND(DBMS_RANDOM.VALUE(0, 100000), 2),
         DBMS_RANDOM.STRING('x', 6));
      END LOOP;
      COMMIT;
    END;
    CREATE OR REPLACE FORCE VIEW rowid_view AS
    (SELECT rowid the_id, t.*
    FROM rowid_test t);
    SELECT *
    FROM (SELECT /*+ FIRST_ROWS(n) */
                 a.*, ROWNUM rnum
          FROM(SELECT *
               FROM rowid_view
               ORDER BY pk_col) a
          WHERE ROWNUM <= 30)
    WHERE rnum  >= 15;
    DELETE FROM rowid_test
    WHERE pk_col = 17;
    COMMIT;
    INSERT INTO rowid_test
               (pk_col,
                col1,
                col2)
         VALUES
               (17,
                ROUND(DBMS_RANDOM.VALUE(0, 100000), 2),
                DBMS_RANDOM.STRING('x', 6));
    COMMIT;
    SELECT *
    FROM (SELECT /*+ FIRST_ROWS(n) */
                 a.*, ROWNUM rnum
          FROM(SELECT *
               FROM rowid_view
               ORDER BY pk_col) a
          WHERE ROWNUM <= 30)
    WHERE rnum  >= 15;So row 17 could have a different rowid in the tabular form to the table itself.
    If the rowid is used to update then it could either not find the row or find a different row (ludicriously unlikely but you never know).
    So the next option would be to combine it with a primary key - very safe but you may not always find your row. So why not just use the primary key? Well, in this case we have two tables involved so we do not have a single PK on which to base the update... So we'll have to write a custom update procedure as APEX will base it upon the primary key... so not having a primary key is no longer an issue.
    Either way, your query is ambiguos
    CREATE OR REPLACE VIEW "HIHI" AS
    SELECT ROWID unique_rowid, d.Dep "Department", t.goal "Sales Goal"
    FROM Division d, Target t
    WHERE d.target_id = t.target_idWhich table is the rowid coming from??? This couldn't work.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)
    Edited by: Munky on Aug 28, 2009 10:53 AM

  • RemoveAtt by column in Tabular Form

    Hi guys. This is my problem:
    I have a tabular with "select list" fields. I disable this fields on Load Page if pk is not null, so user can't modify value of this fields. But when I insert new row in tabular form i have an error from MRU (because select list fields are disable). So how can i remove attribute "disable" before submit pages from column with "select list" disabled?
    Thanks for help.

    You just need to modify this code slightly and have it execute on page submit
    if (document.wwv_flow.f25) { // Check to see at least one present
    var l = document.wwv_flow.f25.length;
    if (l == undefined) { // Have only one record
       var curr_id = document.wwv_flow.f25.id;
       document.wwv_flow.f25.disabled = false;
    else { // Having multiple records
       for (var i = 0; i < l; i++) {
                document.wwv_flow.f25.disabled = false;
    varad
    Edited by: varad acharya on Apr 22, 2011 6:27 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Icon instead of image preview in PDF portfolio

    We are creating a lot of PDF portfolio using Acrobat X Pro. Part of files included in these portfolios are simple JPEG images. On one of our machines - the one with Acrobat X Pro installed - we have a problem that inside portfolios these JPEG files a

  • I can't connect to itunes music store ..

    my music store won't work. for a few weeks now i've been getting an error message saying "Itunes could not connect to the Music Store. An unknown error has occured [-3221]." i've redownloaded itunes && the first few times the store worked but now not

  • Freight charge with tax in sales order

    Hi all my company must implement a particular management of freight charges: in some cases to the customer sales order my company, a part the product cost, add the freight charges (made by a carrier vendor which will send after a vendor invoice to my

  • Contacts not displaying properly in video iPod, need help

    My contacts do not display properly on my video iPod. The phone numbers sometimes have dashes and sometimes do not in the iPod but the phone numbers always have the dashes in my address book on my G4 desktop. Example: iPod 555 555 1212 or 5555551212

  • Dispute case against closed invoice / without invoice reference

    Dear experts, We are currently implementing SAP and FSCM in an EMEA enviroment and one of the issues we are encountering with FSCM is that you can't (according to my advisors) raise a dispute case within FSCM against an invoice that has already been