Tabular form - Multi row delete error

Apex 4.0.2
We have a simple CRUD type of application on a bunch of tables built using Apex v1.6 that has, over the years, been upgraded to v4.0.2 and it is working mostly fine. It uses all out-of-the-box standard components, forms, classic reports, nothing too fancy. Recently one of the tabular forms started to misbehave, the multi-row-delete process raises a No Data Found error. The tabular form is based on a view with a INSTEAD OF trigger to handle the DML. Manually deleting the row in SQL*Plus works fine delete from mytab here pk_id = :pk_id but selecting the same row in Apex and clicking Delete raises the error.
How does one go about troubleshooting & fixing this sort of thing? I tried re-saving the region in the Builder, exporting/importing the entire app, nothing. Running in Debug mode doesn't really provide any additional information, just that the MRD process failed. Tabular forms are the most frustrating, opaque component in Apex, wish they were easier to troubleshoot.
Any ideas?

Hello Vikas,
>> How does one go about troubleshooting & fixing this sort of thing?
By given us a bit more information :)
• Is it a manual Tabular Form (using the ITEM API) or a wizard created one?
• Are the Insert/Update operations work correctly? If not, what is the type of your PK column(s)?
• If the problem is limited to the Delete operation, maybe the problem lies with the checkbox column. Are you sure that on page it is rendered as the f01 column?
• As triggers are involved, can you save the PK that the trigger sees? Is it the expected value?
• Are there any other processes that are fired before the DML process? If so, maybe the problem is with them. You can temporarily disable them and see if it change anything.
>> Tabular forms are the most frustrating, opaque component in Apex, wish they were easier to troubleshoot
Yes, I agree. However, I believe that 4.1 made some serious advancement where Tabular Form is concerned. Having simplified Tabular Form related Validations and Process should make things easier, and as a result, prone to less errors. Still, the main problem is that the type of error you are talking about is usually the result of metadata problems and these are indeed very hard to track.
Regards,
Arie.
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Author of Oracle Application Express 3.2 – The Essentials and More

Similar Messages

  • Multi Row Delete Error

    Hi,
    Am trying to do a multi row delete on a report. Have added a [row selector] to the report and a 'multi row delete' process. Copied this from a sample app i got, but when i try and delete a row(s) i get the following error message:
    Unexpected error, unable to find item name at application or page level.
    ERR-1002 Unable to find item ID for item "P2_ROWS" in application "120".
    Can anyone give me any hints as to why this might be happeneing?
    Best regards
    Simon

    Simon,
    Are you still having trouble with this?
    Scott

  • 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.

  • ORA-20001: Error in multi row delete operation: ORA-01403: no data

    Whenever I attempt a multi-row delete on my master detail page, I recieve the error:
    ORA-20001: Error in multi row delete operation: ORA-01403: no dataI have seen in other threads that the primary key attribute of the underlying table needs to be set to 'Show' in the report attributes. I have tried this both with it displaying as 'Hidden' ('Show' is unchecked) and with it displaying as text. Either way still gives me the same error.
    Is there anything else not mentioned in the other threads that could be causing this error for me?
    Thanks.
    BoilerUP

    Jimmy,
    In your multi row delete process you specify schema name, table and column name. Your report needs to be of type “SQL query (Updateable report)”. And your report needs to include the primary key column of your table. The column or alias name of that report column needs to correspond with the actual column name of your table.
    Marc

  • Multi-row Delete (MRD) on a view?

    All,
    I created a tabular form on a view, using an instead of trigger to encapsulate the logic for the data manipulations. Works great--until someone checks a row and hits the delete button, at which point APEX throws this error:
    ORA-20001: Error in multi row delete operation: row= 107970-18527, ORA-06502: PL/SQL: numeric or value error: character to number conversion error,
    Error     multi row operation failedAs far as I can tell, it's not even getting to the trigger; I commented out the body of the instead of delete trigger (replacing it with null), and I'm still getting the same error. I have no validations or processes on the page at this point.
    The underlying data of the view requires three columns for a unique identifier, so I've concatenated two of them together as an extra column in the view (creating a varchar2 column), and told the MRD to use the calculated column and the third column as the primary key columns. But even using two of the three numeric columns (tweaking the trigger to use a hard-coded value for the third) as an ID fails miserably.
    Any idea what's going on?
    Thanks,
    -David
    (In case it makes a difference, we're on APEX 4.0.1.)

    Hi David,
    This might help:
    http://oraclequirks.blogspot.com/2011/07/ora-20001-error-in-multi-row-delete.html
    Hope it helps!
    Regards,
    Kiran

  • Validation in a Multi Row Delete

    Hi all,
    i made a page with an updateable report region - all works fine.
    But now i want to do a validation in the process 'Multi Row Delete'.
    The aim is to guarantee that the specific row is not deleted if the validation for that row fails.
    How can i achieve that?
    Any feedback is welcome.
    Best regards
    Martin

    Hi,
    many thanks for your reply.
    Yes in my case it is a tabular form and the validation should be done vor 'multi row delete'. Accordingly to the article you mentioned i created a validation with the following PL/SQL code:
    DECLARE
    vRow PLS_INTEGER;
    BEGIN
    FOR i in 1..apex_application.g_f01.COUNT LOOP
    IF apex_application.g_f01(i) IS NOT NULL THEN
    vRow := TO_NUMBER(apex_application.g_f01(i));
    IF lpkom_api.checkPersonAssigned(apex_application.g_f03(vRow)) THEN
    RETURN 'Delete is not allowed for this row.';
    END IF;
    END IF;
    END LOOP;
    END;
    Best regards
    Martin

  • Multi Row Delete and then I get a unique contraint violation on my PK

    I have a simple table with 2 columns, one a PK. I have a checkbox style, multi-row delete function setup on this (to be honest, APEX set this up automatically).
    I removed the add/edit functionality to keep just the delete button and delete procedure.
    When I select an item, and then click delete, I get a unique constraint violation that I'm violating my Primary Key.
    How can I fix this, or see what it's doing when it tries to delete the row?

    Hi,
    It sounds as though you haven't properly removed all of the add/edit functionality or that you still have some form of validation and/or computation in place or that you have a trigger that is trying to insert records into, for example, a history table (is the constraint on the table you are deleting from - the error message should tell you this?)
    Check that the only process you have is ApplyMRD and that this is pointing to the correct table and has the correct primary key set. Ensure that this has Conditional Processing set for a Request of "MULTI_ROW_DELETE".
    Check for any validations - there is no need to perform validations if your user can not insert or update data unless you want to check that they've ticked one or more checkboxes.
    Check for processes that could run if the user clicks the Delete button. Validations and processes could be conditional on either the button click or on request = "MULTI_ROW_DELETE".
    Review any triggers that you have on the table to ensure that deletions do not try to insert records into another table where the primary key on that table is not being populated.
    Regards
    Andy

  • Problem with multi row delete

    Hi, I'm new in apex and I tried to build master detail report on some view. Everything is cool but "delete checked" doesn't work.
    "ORA-20001: Error in multi row delete operation: row= , ORA-06502: PL/SQL: numeric or value error: NULL index table key value,"
    the problem is that I don't know what is wrong :), I have a special trigger "instead of delete on MY_VIEW", but in this error problem is not explained.
    Anybody knows what can be wrong? It is probably a problem with trigger or multi row doesn't work with views? I couldn't find how MRD knows what kind of statement use to delete rows so I don't know if the statement that program used is correct. In debug it lokks that:
    0.32: ...Do not run process "ApplyMRU", process point=AFTER_SUBMIT, condition type=REQUEST_IN_CONDITION, when button pressed=
    0.32: ...Process "ApplyMRD": MULTI_ROW_DELETE (AFTER_SUBMIT) #OWNER#:MY_VIEW:ITEM1:ITEM2
    0.33: Show ERROR page...
    0.33: Performing rollback...
    thanks for any help
    //sorry for english mistakes
    edit: it doesn't matter if I use in trigger delete from ... where item1=:OLD.item1 ; or if I use item1=:P4_item1 (which actually saves correct values)
    Edited by: user5931224 on 2009-06-13 08:55

    I realised that this is not a problem with trigger, I changed trigger to "NULL;" and problem is the same. Maybe sb used master detail on view not only on tables and know what can be wrong in this situation?

  • Forms Multi-row validation

    Forms Multi-row validation
    I have a requirement to show a validation error at form ‘At least one reviewer should have more than zero amount limit'. So we need identify highest amount limit entered in multiple rows, that highest amount limit should be >=1 if not show an error.
    Level Reviewer Amt limit
    1 ABC 0
    2 MNP 0
    3 XYZ 0
    In the above case I need show an error msg. I tried pre-insert. It didn’t work because built-in not supports pre-inserts.
    Pls advice the best methodology to has shown error in this kind of scenario.

    Hi,
    Create a Summary item based on Amt limit.
    Then in pre-insert check the value of summary item. If it is < 1 then, raise error .
    Regards

  • Multi Row Delete & Row selector in 1.5

    Hi All,
    Please forgive my ignorance.
    But, are these processes (Multi Row Delete, Row selector) not available for HTML DB 1.5.
    What is the other way to do this.
    Thanks
    Monika

    Hi Monika,
    It's been a while since I used 1.5 so I can't answer that, however whilst I'm not generally in favour of upgrading just for the sake of it, is there a reason why you wouldn't consider upgrading to a later release?

  • Multi-Row Delete from a table via a button without submitting the page

    Hi,
    I have a simple page based on a (temporary) table. There is a submit button that calls a PL/SQL process. However, I would like to have an 'Abort' button that deletes all rows from the table belonging to a specific user.
    I had a look at 'Processes -> Data Manipulation --> Multi Row Delete' but this can only be linked to a page level event such as onSubmit. My onSubmit is linked to another process so this is not an option for me.
    I thought of creating a PL/SQL function for the deletion and calling it from Javascript linked to a button. I have done the PL/SQL and the button but don't know how to call PL/SQL from JS. And is this the correct way of doing something like a deletion? Any documents that show how can this be done will be much appreciated....
    I had a look at the forum and the documentation but could not find anything for multil-row deletion triggered from a button.
    Your help is appreciated as I'm a newbie :-)
    Thanks
    Angela

    Hi,
    I actually found the solution. I created a button (that submits) and a computation that calls the PL/SQL function conditional on that button being pressed. Initially I got confused because I already had another PL/SQL function attached to different button. I didn't think that having two buttons that submit the page and call different functions was possible.
    Thanks
    Angela

  • BI Bean that displays the data in tabular layout (multi-row)

    Hi,
    I know there isn't a graphic type in BI Beans that can display data in multi-row tabular layout as one graphic object. Oracle Forms can actually display this layout but they want to display everything in one page without scrollbars (without the need to scroll for the other records that isn't displayed yet in the screen). Is this at all possible in Oracle Forms using BI Beans? Are there other possible approaches aside from BI Beans?
    Thanks in advance.
    Anthony
    Philippines

    Hello Vikas,
    >> How does one go about troubleshooting & fixing this sort of thing?
    By given us a bit more information :)
    • Is it a manual Tabular Form (using the ITEM API) or a wizard created one?
    • Are the Insert/Update operations work correctly? If not, what is the type of your PK column(s)?
    • If the problem is limited to the Delete operation, maybe the problem lies with the checkbox column. Are you sure that on page it is rendered as the f01 column?
    • As triggers are involved, can you save the PK that the trigger sees? Is it the expected value?
    • Are there any other processes that are fired before the DML process? If so, maybe the problem is with them. You can temporarily disable them and see if it change anything.
    >> Tabular forms are the most frustrating, opaque component in Apex, wish they were easier to troubleshoot
    Yes, I agree. However, I believe that 4.1 made some serious advancement where Tabular Form is concerned. Having simplified Tabular Form related Validations and Process should make things easier, and as a result, prone to less errors. Still, the main problem is that the type of error you are talking about is usually the result of metadata problems and these are indeed very hard to track.
    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

  • Multi-row delete

    Hello,
    I want to display a checkbox in a multi-row query for deletion.
    when the user will submit, I want to delete all checked record.
    I've tried to do it by creating a checkbox in the select statement of the query (select HTMLDB_ITEM.CHECKBOX (1, 'Y') checkbox, ...) and create a process to do the delete. Here my process code:
    declare
    l_val_rows varchar2(400) default null;
    begin
    for i in 1..htmldb_application.g_f01.count loop
    if instr(nvl(htmldb_application.g_f01(i),0),1) > 0 then
    delete gsr_corporates where id = htmldb_application.g_f02(i);
    end if;
    end loop;
    end;
    2 problems:
    1)
    When I submit, if my checkbox is not checked, I get error "Error in mru internal routine: ORA-20001: no data found in tabular form". If checked, it is working.
    2)
    When checked, I get the error "Error in mru internal routine: ORA-20001: Checksum column ("FCS") is required and was not supplied".
    So, is it a good way to do what I want? If yes, what's wrong? If no, what is your suggestion?
    Thank you
    Jean

    Jean,
    Please take a look at this example:
    http://www.oracle.com/technology/products/database/htmldb/howtos/checkbox.html#HANDLE
    The problem is that when a checkbox is not checked, there is no corresponding entry in the array. Thus, the array indexes for f01 and f02 will be out of sync. To fix this, make the value of a checkbox, when checked, the primary key of the row you want deleted. Then you can simply walk through one array and delete every row that corresponds to an entry in it.
    Sergio

  • Manual tabular form -- add rows

    Hi everybody, I am making a manually tabular form following the Denes Kubicek tutorials:
    http://apex.oracle.com/pls/otn/f?p=31517:170:1304244099066416::NO
    and
    http://apex.oracle.com/pls/otn/f?p=31517:190:1304244099066416::NO
    The SQL for the tabular form is:
    SELECT apex_item.checkbox (31,
    idint,
    'onclick="highlight_row(this,' || ROWNUM || ')"',
    NULL,
    'f31_' || LPAD (ROWNUM, 4, '0')
    ) delete_checkbox,
    idint,
    apex_item.text (32,
    tipus_modif,
    1,
    1,
    'style="width:20px" ',
    'f32_' || LPAD (ROWNUM, 4, '0')
    ) tipus
    FROM GPPC_DETALLS_ESMENA_PROP_V
    where esmena_idint = :P18_IDINT
    and tipus_modif ='A'
    The Report is created correct. Now I modify the "Form Region" template like this:
    <table class="t6FormRegion" id="MY_TAB" border="0" cellpadding="0" #REGION_ATTRIBUTES# summary="">
    <tr><td class="t6Header">#TITLE#</td></tr>
    <tr><td class="t6ButtonHolder">#CLOSE#   #PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</td></tr>
    <tr><td class="t6Body">#BODY#</td></tr>
    <tr><td><img src="#IMAGE_PREFIX#themes/theme_6/t.gif" width="400" height="1" alt="" /></td></tr>
    </table>
    Now I add a Button URL with the code:
    javascript:va_AddTableRow(this,'MY_TAB',1);
    and add this Javascript in the region header of the SQL Report
    <script>
    function va_AddTableRow(pThis,pThat,pNum){
    var tt = html_GetElement(pThat);
    for(i=0;i<pNum;i++){
    var ogTR = tt.rows[1];
    var trClone = ogTR.cloneNode(true);
    trClone.firstChild.innerHTML='(null)';
    var last_child=trClone.lastChild.getElementsByTagName('input')
    for (var j=0;j<last_child.length;j++)
    if (last_child[j].type=="hidden" && last_child[j].name=="f01")
    last_child[j].value="";
    if(document.all){
    myNewRow = tt.insertRow(tt.rows.length);
    oReplace = myNewRow.replaceNode(trClone);
    }else{
    tt.appendChild(trClone);
    </script>
    In this moment, when I push the botton appears the text (nulll) in the same region but not as a new line in the SQL report, what is the problem??
    Thank you for your help

    Alberto,
    When you get a chance, see if maybe this (old version) of my app does something similar to what you need/want.
    [http://apex.oracle.com/pls/otn/f?p=26115:3]
    It's not working right now though, I keep getting the Oracle error:
    ORA-01116: error in opening database file 17252 ORA-01110: data file 17252: '/u03/oradata/marvlprd/MARVLPRD/datafile/o1_mf_flow_172_23qtsjpr_.dbf' ORA-27041: unable to open file Linux Error: 23: Too many open files in system Additional information: 3
    So, as way of an explanation (until Joel gets the Linux process fixed), I have a simple little screen that I use for letting the users specifiy search criteria. Each line has four columns, what field they want to search, a condition (equals or not equals), the text to search for, and an optional 'And/or' argument. If the 'And/Or' gets populated, a new blank line automatically gets created. There is also a red 'X' on each line so they users can delete a line if they want.
    Not sure if this is what you need, but this page uses the same set of javascript code, so perhaps when it's working again, you can see if there are any similarities or differences.
    Also, for reference, so you can see the code and variables, etc., the workspace is wbfergus, and the id and password are both htmldb-apex.
    Bill Ferguson

  • Multi Row Update Error

    Hello Everyone
    I get the following error when attempting to perform a multi row update. Is anyone able to advise what the issue is?
    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 = "F71A42E70B86E7C8A14343633169264E", item checksum = "43A7146FE322237B683C4139D66E4DC5"., update "CSS_PRODUCTIVITY"."CENTREDATAASSOCIATIONS_TEST" set "MONTH" = :b1, "TM1_PREMISE_NAME" = :b2,

    hi oolite
    i can't help you with your problem
    but i have one suggestion
    i don't know whether you created your tabular form with the wizard or manually
    when you use the wizard
    i would suggest that you try to build a tabular form manully
    in fact it is a little bit more work but i think all what you have done by yourself
    is more transparent and errors should be found easier
    other suggestions take a look
    Error in mru internal routine: Error in MRU
    Error in mru internal routine
    or search for error on mru
    sorry that i can't tell you more

Maybe you are looking for