Error in my tabular form

Hello
I'm getting an error on my tabular form, it is layed out as so:
  [ ]  Title      Lastname   Firstname   Company   Email
[ ]  Mr/Ms/Mrs  [       ]  [        ]  [      ]  [        ]-first column is a checkbox
-'title' is a select list default value "Mr"
-the rest are normal text boxes
-Validation:Lastname cannot be null
-validation Firstname cannot be null
Now the error occurs in only 1 situation:When you click the 'add row' button, but don't edit any boxes before you click 'save'.
If you do that you get an error saying cannot enter NULL into LASTNAME (which is because the database its going into doesn't allow a null value for that column)
If you change anything the validations stop you from advancing if lastname or firstname is null...so why don't the validations kick in until you change something? and why does the MRU process not ignore the empty row like the validations seem to?
It seems strange that they don't both act the same towards it...
My assumption is that it has something to do with the select list having a default value because I have several other tabular forms in my app and another has 4 select lists and it has the same error, but the ones that don't have a select list have no error...
So yeh any help/thoughts appreciated

Sorted this out a while ago...figured I'd just update:
The value the select lists were showing by default, wasn't actually a default value as such. I had set it to 'do not show null value' so of course it had to show something, which was just the first value in the list which doesn't really count as a default value. So all I did was set the default value of the list to the value that was displayed automatically.

Similar Messages

  • Error when modifying tabular form

    Hi
    In Apex 3, I created a tabular form based on the query below:
    select user_id /* PK */, name, dob
    from users
    It works perfectly well; I am able to update the name and dob fields.
    Then I changed the query to:
    select user_id /* PK */, name, null dob
    from users
    ...(i.e. not interested in the dob column anymore but want to keep the report column) and cleared the properties reference table owner/name/column name of the dob report column.
    However, when I try to update the name of a user, I get the error:
    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 = "7C3CD9C5DA0B5AF45AE616959020A0AA",
    item checksum = "6910D5C7015D84773A9E8F65299991F6".,
    update "SCHEMA"."USERS" set "USER_ID" = :b1, "NAME" = :b2, "DOB" = :b3Why is dob still being included in the update statement?
    Did I miss something?
    Thanks,
    Luis

    Since the DOB was one of the columns specified when you created the tabular form, the internal PL/SQL process that it uses for making updates is still trying to update that column. As you have now modified the underlying query for the form and are passing a NULL for your DOB, you will find that any update made using this form would set the DOB to NULL, so beware!
    Unfortunately, once you have created a tabular form, you cannot make changes to the process that it uses for manipulating data. Another drawback of the tabular form is that it uses the primary key of the table as a way of knowing which record it is updating when it processes the changes. As a result, you cannot modify the primary key value itself - and that is why you are getting the error.
    Generally speaking it is not a good idea to edit primary key values. If this piece of information does require editing, I would suggest you find another candidate for the primary key - perhaps a standard sequence-populated column that could act as a surrogate key?
    Cheers,
    Colin

  • Error when creating tabular form with wizard Apex 4.01

    Hi,
    I just created a tabular form using the page creation wizard on a table and am showing 50 rows at a time and am getting error:
    mod_plsql: /pls/apex/wwv_flow.accept HTTP-400 Too many arguments passed in. Got 2225 parameters. Upper limit is 2000
    It doesn't matter how much data I put in --even just a couple rows updated.  I also reduced rows to 20 and still get same message.
    Anyone else seen this error?
    Pat

    Hi Jari,
    It returns about 1100 records which i think is not much.
    But even when i narrow the amount of records the problem is not solved.
    it this a bug?
    Best
    Hugo

  • Error 20001 in Tabular Form, possible bug?

    Hi everybody.
    I've got the error
    "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."
    using a built-in tabular form with normal MRU process.
    The problem occur when i apply a format mask or a css style to a single element (i.e. "999G999G999G999G990D00" and "class=grey disabled" in element attributes)
    Whitout formatting, the submit process works fine.
    I think that this could be correct for the mask, in effect we "change" data received from query. But why we have error also adding only CSS style?
    In any case, it's possible to apply a format in a tabular form and have the submit process working fine?
    Thanks.
    Roberto
    Some more info:
    if i put "style="background-color:#D4D4D4;" in element attribute it's all ok.
    if i write "class=grey disabled" calling a css class from an uploaded css file i got the error.
    Bye
    Edited by: pnnrrt64 on 25-mar-2009 15.05
    Edited by: pnnrrt64 on 25-mar-2009 16.28

    Hi,
    This is not a bug, but a "feature" of browsers. When input items are disabled, they are not submitted with the form. This causes problems with the checksums that are performed when the page is loaded and when the records are checked to see which records need updating - as there are a different number of fields, the checksums are always different, hence the error message.
    The way around this, assuming that you need disabled items, is to enable them immediately before the submit takes place. Have a look at the enableItems() part of: Re: A better method of handling tabular forms with variable column type?
    Andy

  • Page process throwing No data found error when deleting tabular form item

    Hi guys,
    I am trying to run a page process just before the Tabular form's MRU process and it's throwing a no data found error. Here is my code:
    BEGIN
         for i in 1..apex_application.g_f02.count LOOP     
              IF apex_application.g_f01(i) is not null THEN
                   UPDATE STOCK
                        SET PRODUCT_QUANTITY = PRODUCT_QUANTITY+apex_application.g_f08(i)
                   WHERE site_id = :P21_SITE_ID and product_id = apex_application.g_f02(i);
                   COMMIT;
              END IF;
         END LOOP;
    END;Here f01 is the checkbox column and the if-statement is causing the problem because if I get rid of the update statement (leaving just the commit) then it still throws the error.
    When I click on a checkbox and hit delete button which fires off both this process and then MRU I get the no data found error.
    Would be grateful if someone could shed some light on this. Many thanks.
    Edited by: taepodong on Jul 1, 2012 7:54 AM

    Hi,
    >
    I am trying to run a page process just before the Tabular form's MRU process and it's throwing a no data found error. Here is my code:
    BEGIN
         for i in 1..apex_application.g_f02.count LOOP     
              IF apex_application.g_f01(i) is not null THEN
                   UPDATE STOCK
                        SET PRODUCT_QUANTITY = PRODUCT_QUANTITY+apex_application.g_f08(i)
                   WHERE site_id = :P21_SITE_ID and product_id = apex_application.g_f02(i);
                   COMMIT;
              END IF;
         END LOOP;
    END;Here f01 is the checkbox column and the if-statement is causing the problem because if I get rid of the update statement (leaving just the commit) then it still throws the error.
    When I click on a checkbox and hit delete button which fires off both this process and then MRU I get the no data found error.
    >
    You are iterating on the f02 and checking for f01 not null. That is wrong usage of the the checkbox item. Please see these links . especially the OnSubmit Process examples.
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_item.htm#CHDDCHAF
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_app.htm#AEAPI215
    Regards,
    PS : This is what you need to understand
    >
    <b>Note that check boxes displayed using APEX_ITEM.CHECKBOX will only contain values in the APEX_APPLICATION arrays for those rows which are checked. Unlike other items (TEXT, TEXTAREA, and DATE_POPUP) which can contain an entry in the corresponding APEX_APPLICATION array for every row submitted, a check box will only have an entry in the APEX_APPLICATION array if it is selected.</b>
    >
    Edited by: Prabodh on Jul 2, 2012 9:44 AM

  • ORA-20001 error when creating Tabular Form or Form and Report

    Whenever I try and add a Tabular Form or Form and Report to my application i am getting the following error at the end of the Wizard.
    ORA-20001: Unable to create updateable report. ORA-20001: Error creating shortcut id="" ORA-00001: unique constraint (APEX_030200.WWV_FLOW_SHORTCUT_IDX1) violatedIt's not a problem I have seen when building other apps and clearly I have managed to corrupt this application somehow.
    I have loaded the problem onto apex.oracle.com for those that have access. The application number is 20325.
    Any help would be very much appreciated.
    Cheers Shunt

    Thanks! Never thought of that.
    --Andy                                                                                                                                                                                                                       

  • "Page cannot be found" error when submitting tabular form

    One of our developers has used a wizard to create a tabular form with the intent or providing an interface for updating one of our tables. The page runs correctly up until the point when the user clicks the Submit button. The user is then re-directed to a "page cannot be found" error page. I checked the apache error log and I'm seeing this error (ip addresses hidden):
    [Wed Oct 13 06:37:59 2004] [error] [client x.xxx.xxx.xxx] [ecid: 1097674679:x.xx.xxx.xx:7286:0:23738,0] mod_plsql: /pls/htmldb/wwv_flow.accept HTTP-400 Too many arguments passed in. Got 2009 parameters. Upper limit is 2000
    We have pages in other applications that were built the same way, and can't figure out why we are seeing these errors.
    Any ideas?
    Thanks.
    Matt

    Sorry I didn't want to take the time to import the application, create the data structure and populate it, when the page is now working. However it seems like you should be able to easily re-create the situation. All I did was go through the wizard for a tabular form. It was based on a view and displayed all the columns, most of them updatable. It seems like what makes it fail (error when either CANCEL or SUBMIT is clicked) is just having a lot of fields on one screen. I base this conclusion on the error message from the Apache error log (mod_plsql: /pls/htmldb/wwv_flow.accept HTTP-400 Too many arguments passed in. Got 2134 parameters. Upper limit is 2000) and on the fix of reducing the number of rows on one screen, using pagination.

  • Checksum error in Manual Tabular Form

    Hi everyone,
    I have created 2 (manual tabular forms) on a same page but i am getting checksum error for one of the tabular form.
    Here is my code:
    1 st Tabular Form:
    select
    x.del,
    x.ECGEXST_ID,
    x.LEAD_CD,
    x.ST_ID,
    x.ENTERED_DTS,
    X.ENTERED_BY_NM,
    X.UPDATED_DTS,
    X.UPDATED_BY_NM,
    x.cks
    from (
    select
    htmldb_item.checkbox(1,ECGEXST_ID) del,
    htmldb_item.hidden(2,ECGEXST_ID) ECGEXST_ID,
    htmldb_item.select_list_from_query (3, LEAD_CD,'select lead_cd , lead_cd from lslead order by display_seq ',15) LEAD_CD,
    htmldb_item.select_list_from_query(5,ST_ID,'select lkup_dsc,lkup_id from lkup where lkup_grp_id = 17',25) ST_ID,
    wwv_flow_item.display_and_save(6,to_char(ENTERED_DTS,'MM/DD/YYYY')) ENTERED_DTS,
    au.LAST_NM || ', ' || au.FIRST_NM ENTERED_BY_NM,
    wwv_flow_item.display_and_save(7,to_char(UPDATED_DTS,'MM/DD/YYYY')) UPDATED_DTS,
    au1.LAST_NM || ', ' || au1.FIRST_NM UPDATED_BY_NM,
    htmldb_item.md5_checksum(ECGEXDT_ID,LEAD_CD,ST_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    from ECGEXST,
    app_user au,app_user au1 where au.MSPR_ID(+) = ECGEXST.ENTERED_BY_MSPR_ID and au1.MSPR_ID(+) = ECGEXST.UPDATED_BY_MSPR_ID
    and ECGEXDT_ID = :P65_ECGEXDT_ID
    union all
    select
    htmldb_item.checkbox(1,null) del,
    htmldb_item.hidden(2,null) ECGEXST_ID,
    htmldb_item.select_list_from_query (3,null,'select lead_cd , lead_cd from lslead order by display_seq ',15) LEAD_CD,
    htmldb_item.select_list_from_query(5,null,'select lkup_dsc,lkup_id from lkup where lkup_grp_id = 17',25) ST_ID,
    wwv_flow_item.display_and_save(6,null) ENTERED_DTS,
    null ENTERED_BY_NM,
    wwv_flow_item.display_and_save(7,null) UPDATED_DTS,
    null UPDATED_BY_NM,
    htmldb_item.md5_checksum(null,null,null,null,null) cks
    from dual) x
    UPDATE PROCESS:
    declare
    l_cks wwv_flow_global.vc_arr2;
    j pls_integer := 1;
    val1 varchar2(100);
    val2 varchar2(100);
    begin
    -- Get original MD5 checksum
    select wwv_flow_item.md5(ECGEXDT_ID,LEAD_CD,ST_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    BULK COLLECT INTO
    l_cks
    from ECGEXST where ECGEXDT_ID = :P65_ECGEXDT_ID;
    -- Compare the original checksum, l_cks,
    -- with submitted checksum, htmldb_application.g_fcs.
    -- If they are different, raise an error.
    for i in 1..l_cks.count
    loop
    if htmldb_application.g_fcs(i) != l_cks(i) then
    rollback;
    raise_application_error(
              -20001,
         'Current version of data in database has changed '||
              'since user initiated update process.');
    -- return;
    end if;
    end loop;
    -- update ECGRSTST
    for i in 1..htmldb_application.g_f02.count
    loop
    if htmldb_application.g_f02(i) is not null then
    update ECGEXST
    set
    ECGEXDT_ID = :P65_ECGEXDT_ID,
    LEAD_CD = replace(htmldb_application.g_f03(i),'%'||'null%',NULL),
    ST_ID = replace(htmldb_application.g_f05(i),'%'||'null%',NULL)
    where ECGEXST_ID = htmldb_application.g_f02(i);
    else
    if htmldb_application.g_f03(i) is not null then
    insert into ECGEXST
    (ECGEXST_ID ,
    ECGEXDT_ID,
    LEAD_CD,
    ST_ID)
    values
    (ECGEXST_SEQ.nextval,
    :P65_ECGEXDT_ID,
    replace(htmldb_application.g_f03(i),'%'||'null%',NULL),
    replace(htmldb_application.g_f05(i),'%'||'null%',NULL));
    end if;
    end if;
    end loop;
    end;
    The first tabular form is working fine.But for the second tabular form i am getting the checksum error.I have created a test table and checked the checksum values.The checksum values are changing.
    Here is the code of my 2nd tabularform:
    select
    x.del,
    x.ECGEXT_ID,
    x.LEAD_CD,
    x.T_ID,
    x.ENTERED_DTS,
    X.ENTERED_BY_NM,
    X.UPDATED_DTS,
    X.UPDATED_BY_NM,
    x.cks
    from (
    select
    htmldb_item.checkbox(11,ECGEXT_ID) del,
    htmldb_item.hidden(12,ECGEXT_ID) ECGEXT_ID,
    htmldb_item.select_list_from_query (13, LEAD_CD,'select lead_cd , lead_cd from lslead order by display_seq ',15) LEAD_CD,
    htmldb_item.select_list_from_query(15,T_ID,'select lkup_dsc,lkup_id from lkup where lkup_grp_id = 18',25) T_ID,
    wwv_flow_item.display_and_save(16,to_char(ENTERED_DTS,'MM/DD/YYYY')) ENTERED_DTS,
    au.LAST_NM || ', ' || au.FIRST_NM ENTERED_BY_NM,
    wwv_flow_item.display_and_save(17,to_char(UPDATED_DTS,'MM/DD/YYYY')) UPDATED_DTS,
    au1.LAST_NM || ', ' || au1.FIRST_NM UPDATED_BY_NM,
    htmldb_item.md5_checksum(ECGEXDT_ID,LEAD_CD,T_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    from ECGEXT,
    app_user au,app_user au1 where au.MSPR_ID(+) = ECGEXT.ENTERED_BY_MSPR_ID and au1.MSPR_ID(+) = ECGEXT.UPDATED_BY_MSPR_ID
    and ECGEXDT_ID = :P65_ECGEXDT_ID
    union all
    select
    htmldb_item.checkbox(11,null) del,
    htmldb_item.hidden(12,null) ECGEXT_ID,
    htmldb_item.select_list_from_query (13,null,'select lead_cd , lead_cd from lslead order by display_seq ',15) LEAD_CD,
    htmldb_item.select_list_from_query(15,null,'select lkup_dsc,lkup_id from lkup where lkup_grp_id = 18',25) T_ID,
    wwv_flow_item.display_and_save(16,null) ENTERED_DTS,
    null ENTERED_BY_NM,
    wwv_flow_item.display_and_save(17,null) UPDATED_DTS,
    null UPDATED_BY_NM,
    htmldb_item.md5_checksum(null,null,null,null,null) cks
    from dual) x
    UPDATE PROCESS:
    declare
    l_cks wwv_flow_global.vc_arr2;
    j pls_integer := 1;
    val1 varchar2(100);
    val2 varchar2(100);
    begin
    -- Get original MD5 checksum
    select wwv_flow_item.md5(ECGEXDT_ID,LEAD_CD,T_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    BULK COLLECT INTO l_cks
    from ECGEXT where ECGEXDT_ID = :P65_ECGEXDT_ID;
    -- Compare the original checksum, l_cks,
    -- with submitted checksum, htmldb_application.g_fcs.
    -- If they are different, raise an error.
    for i in 1..l_cks.count
    loop
    if htmldb_application.g_fcs(i) != l_cks(i) then
    -- val1 := htmldb_application.g_fcs(i);
    -- val2 := l_cks(i);
    -- insert into test2 (val_1,val_2) values (val1,val2);
    rollback;
    raise_application_error(
         -20001,
         'Current version of data in database has changed '||
         'since user initiated update process.');
    return;
    end if;
    end loop;
    -- update ECGRSTST
    for i in 1..htmldb_application.g_f12.count
    loop
    if htmldb_application.g_f12(i) is not null then
    update ECGEXT
    set
    ECGEXDT_ID = :P65_ECGEXDT_ID,
    LEAD_CD = replace(htmldb_application.g_f13(i),'%'||'null%',NULL),
    T_ID = replace(htmldb_application.g_f15(i),'%'||'null%',NULL)
    where ECGEXT_ID = htmldb_application.g_f12(i);
    else
    if htmldb_application.g_f13(i) is not null then
    insert into ECGEXT
    (ECGEXT_ID ,
    ECGEXDT_ID,
    LEAD_CD,
    T_ID)
    values
    (ECGEXT_SEQ.nextval,
    :P65_ECGEXDT_ID,
    replace(htmldb_application.g_f13(i),'%'||'null%',NULL),
    replace(htmldb_application.g_f15(i),'%'||'null%',NULL));
    end if;
    end if;
    end loop;
    end;
    please help me in solving this.The same code its good for one tabular form and for the other it giving the checksum error.
    Thanks in advance
    phani

    Hi patrick,
    Thanks for the reply i am getting the checksum error even if i used my primary key in the select statement of the MD5 checksum.
    My primary key in the second tabular form is
    htmldb_item.hidden(12,ECGEXT_ID) ECGEXT_ID
    so i changed the process to:
    for i in 1..htmldb_application.g_f12.count
    loop
    if htmldb_application.g_f12(i) is not null
    then
    select wwv_flow_item.md5(ECGEXDT_ID,LEAD_CD,T_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    BULK COLLECT INTO l_cks
    from ECGEXT where ECGEXT_ID = htmldb_application.g_f12(i);
    -- Compare the original checksum, l_cks,
    -- with submitted checksum, htmldb_application.g_fcs.
    -- If they are different, raise an error.
    if htmldb_application.g_fcs(i) != l_cks(i) then
    -- val1 := htmldb_application.g_fcs(i);
    -- val2 := l_cks(i);
    -- insert into test2 (val_1,val_2) values (val1,val2);
    rollback;
    raise_application_error(
         -20001,
         'Current version of data in database has changed '||
         'since user initiated update process.');
    end if;
    end if;
    end loop;
    It's not possible to use BULK COLLECT to get the MD5 checksum of all >>>rows. Because the index positions in the MD5 array and the >>>apex_application.g_fxx array index will probably not match, especially if you >>>don't order or if you are on a second page.How come the first tabular form is running i used the bulk collect in the first tabular form
    HERE IS THE CODE FOR THE FIRST TABULAR FORM:
    -- Get original MD5 checksum
    select wwv_flow_item.md5(ECGEXDT_ID,LEAD_CD,ST_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    BULK COLLECT INTO
    l_cks
    from ECGEXST where ECGEXDT_ID = :P65_ECGEXDT_ID;
    -- Compare the original checksum, l_cks,
    -- with submitted checksum, htmldb_application.g_fcs.
    -- If they are different, raise an error.
    for i in 1..l_cks.count
    loop
    if htmldb_application.g_fcs(i) != l_cks(i) then
    rollback;
    raise_application_error(
              -20001,
         'Current version of data in database has changed '||
         'since user initiated update process.');
    -- return;
    end if;
    end loop;

  • APEXLIB error in updateable tabular form

    We are using APEXLIB to validate / make updates using a tabular form and we are getting the following error.
    ORA-06550: line 2, column 27: PLS-00302: component 'APEXLIB_TABFORM' must be declared ORA-06550: line 2, column 4: PL/SQL: Statement ignored ORA-06550: line 93, column 16: PLS-00302: component 'APEXLIB_ERROR' must be declared ORA-06550: line 93, column 1: PL/SQL: Statement ignored
    ERR-1024 Unable to run "function body returning text" validation.
    Can anyone help with this error?

    I think you need to post this question to the owner of APEXLIB at http://apexlib.oracleapex.info/. APEXLIB is not written by Oracle.

  • Error handling on Tabular form

    Hi -
    I need to perform some validation on insert and update. Just simple ones: not null.
    (HTMLDB Version 2).
    Please, do not think that I have not done my research on this issue. I went
    through all forums and documentation; I followed with all how-to’s. I created a
    validation on the page level, but it does not work. For some reason MRU it just
    skips this validation and performs update with nulls even I have a validation NOT NULL created.
    I ended up with validation through db trigger. But here is another problem:
    it shows the whole error stack as I would like to see only my own error message.
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20100: PROJECT TASK must have some value. ORA-06512: at "JENNY.VALIDATE_UPDATE", line 10 ORA-04088: error during execution of trigger 'JENNY.VALIDATE_UPDATE', update "JENNY"."STATUS_PROJECT_TRACKING" set "RECNO" = :b1, "EMPNO" = :b2, "PROJECT_ID" = :b3, "YEAR" = :b4, "WEEK_NUMBER" = :b5, "PROJECT_NAME" = :b6, "PROJECT_TASK" = :b7, "ORIGINAL_DUE_DATE" = :b8, "CURRENT_DUE_DATE" = :b9, "PROGRESS_ISSUES_RISKS" = :b10, "ACTIVITY_RISK_MITIGATION" = :b11, "WEEKLY_MONTHLY" =
    I would like to see only my message in bold.
    I was doing this last 3 days and I think I exhausted my resources. Please,
    help me to set up proper validations.
    Thanks,
    Jenny

    Vikas -
    It works! But ... Sorry, for this.
    I have actually 3 fields which must not be null. Can I incorporate same logic?
    I did:
    function:
    <script>
    function foo()
    var th_comm=html_GetElement('PROJECT_TASK');
    var t=html_CascadeUpTill(th_comm,'TABLE');
    var l_index=th_comm.cellIndex;
    var th_progr=html_GetElement('PROGRESS_ISSUES_RISKS');
    var t1=html_CascadeUpTill(th_progr,'TABLE');
    var l1_index=th_progr.cellIndex;
    for (var j=1;j<t.rows.length;j++) {
    var l_row=t.rows[j];
    var l_comm=l_row.cells[l_index].getElementsByTagName('input')[0].value;
    if (l_comm=="") {
    alert('PROJECT TASK must be entered');
    return false;
    exit; --- IS IT VALID in JAVA?
    for (var j=1;j<t1.rows.length;j++) {
    var l_row=t1.rows[j];
    var l_comm=l_row.cells[l1_index].getElementsByTagName('input')[0].value;
    if (l_comm=="") {
    alert('PROGRESS ISSUES RISKS must be entered');
    return false;
    exit; --- IS IT VALID in JAVA?
    return true;
    </script>
    2. In SUBMIT:
    javascript:if (foo()) doSubmit('SUBMIT');
    For the 1 validation (your script)- it works perfectly.
    function with 2 loops - does not executes at all. Something is wrong with the syntax.
    Thank you very much,
    Jenny.

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

  • Tabular Form and Link to document and No Data Found error

    I have used this numerous times in an INTERACTIVE REPORT to link records out from the report to a document in a folder on our server and it works beautifully thanks to one of you guys who helped me a couple of years ago. In the column for which I want to use as a link I do the following:
    LINK TEST #ISO_NUMBER#
    LINK ATTRIBUTES a href=#DOC_LINK#; TARGET="_BLANK"
    URL #DOC_LINK#
    I've been banging my head against the wall trying to figure out why I keep getting a 'No data found' error in my TABULAR FORM. The good news is I figured out why it's happening. The bad news is I do need to link out to the documents listed in my tabular form that are saved on the server.
    Is there any other way to do this?
    Application Express 4.0.0.00.46
    TIA,
    Alexandra

    Finally back...
    I have a tabular form that lists documents stored on one of our servers. In an interactive report I can set up a link to those docs using the document number column in the IR. I can't get it to work in the same way on the tabular form. Hopefully the steps of the catalog process will shed light on what may be the problem:
    Step One
    1. User1 catalogs doument using standard form (page 3) on DOC_INFO table.
    2. Button on form redirects to Approval Tabular Form (for this example, page 100). This tabular form displays DOCUMENT_NUMBER (display as text saves state), APPROVER (select list), APPROVED(select list), RELEASED (select list) fields among others from DOC_APPRV_DOC table
    3. Add Row adds fields in #2 above and other fields
    4. User1 selects APPROVER in select list and Adds Row for all additional APPROVERS required
    5. User1 hits SUBMIT button
    Step Two
    1. User2 opens different page but Approval Tabular Form (for this example, page 200) on same DOC_APPRV_DOC table, restricted to :P101_USERNAME
    2. User2 uses APPROVED select list to approve or reject
    3. User2 hits SUBMIT button
    Step Three
    1. User1 opens Approval Tabular Form (page 100) with User2 (and all other documents requiring approval) results
    2. If rejected User1 uses Reset Approval checkbox and select list on User2's tabular form is reset
    3. If approved User1 uses Released submit list and and record is deleted from User2's tabular form
    The Problem
    User2 ought to be able to review each of these documents on the server. In other parts of my application, an interactive report is used, I've got a case statement in the report creating the link, and have the column itself setup up so that User2 merely clicks on the DOCUMENT_NUMBER on the report and he's redirected to the document itself.
    This works fine when set up the same way on the tabular form ONLY THE FIRST TIME a row is added. If I ADD ROW for any additional documents the DOCUMENT_NUMBER field on the tabular form does not populate on User1's form.
    The entire process works beautifully if the link is not set up.
    Note that from the standard form, the DOCUMENT_NUMBER is sent to a hidden item (default = :P3_DOCUMENT_NUMBER) in a region above the tabular form (page 100). This is then used to populate the DOCUMENT_NUMBER on the tabular form as the default value (:P200_DOCUMENT_NUMBER).
    Your thoughts? Thanks in advance!
    Alexandra

  • Custom errors in tabular form

    Hi,
    I am getting oracle errors in a tabular form if entering some illegal values. For example i am getting below oracle error
    when giving an invalid date in a date field
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: Found invalid date value, please verify
    date format., insert into "PE_DIP"."CORRELATION_ELIGIBILITY"
    ( "ID", "CUSTOMER_ID", "SITE_ID", "EQUIPMENT_ID", "TERMINATION_ID", "CORRELATION_ELIGIBILITY", "LAST_MO
    DIFIED_BY", "LAST_MODIFIED_ON") values ( :b1, :b2, :b3, :b4, :b5, :b6, :b7, :b8)i just need the message
    Found invalid date value, please verify date formatand like this, for each errors i just need the error message and that will be dispalyed in the notification area and not in
    other page. Is this possible?. Plz help,
    Thanks,
    TJ

    Hi TJ,
    You could write a JavaScript function to do that for you. Just call it onChange or onBlur. I have the following javascript functions that I use. These display the error next to the item though, so you may need to play around with it to display it where you want it to. (Pls note: I have a few validation functions like the notNull one below that all call the setError function.)
    //This function checks to see if the object sent in is null and if so displays an error message
    //back to the user. This is useful when doing client side validations on tabular forms in APEX.
    //It takes in the ID of the object we want to do this check for and prints out an error
    //just after the cell where the error occurred.
    function notNull(object, errObj) {
    var val = $x(object).value;
    setError(object, (val == "" || val == null), "This field cannot be empty ", errObj);
    //Function to display an error in a tabular form. The error will be displayed next to the field associated
    //with the object parameter, using div tags. In addition to the object parameter, the function also takes in
    //the err object to use as id in the div tag, a boolean variable to indicate if there is an error and the error string
    //to display
    function setError(object, isErr, errStr, errObj) {
    //ensure you have the name for the error string to be displayed
    if (!errObj) {
    errObj = "err_".concat(object.id);
    //if there was a prior error displayed, first delete that, so we do not have duplicate messages shown
    $x_Remove(errObj);
    if (isErr) {
    if (!$x(errObj)) {
    $x_Style(object, 'border', '1px solid red');
    var errStr = ('<div name="err" id="').concat(errObj).concat('" style="color:red;">').concat(errStr).concat(' </div>');
    object.parentNode.innerHTML += errStr;
    $x("Back").focus();
    $x(object.id).focus();
    } else {
    $x_Style(object, 'border', "1px solid #C8C8C8");
    $x_Remove(errObj);
    In the report item attributes page, I call the above function as onBlur="notNull(this);" in the element attribute field.
    HTH,
    Chandini

  • HTTP 400 - Bad request Page cannot be found while submitting tabular form

    Hi,
    My Apex application has sql report for summary and tabular form in a single page.
    This page is working fine when the number of rows per screen is upto 130.
    When we sets the maximum number of rows as more than 130, it displays the record but if we click button to submit the page to save
    it shows page cannot be found.
    HTTP 400 - Bad request
    URL shows apex URL followed by /wwv_flow.accept
    Is there any maximum limits to show number of records in a page in apex.
    Since number of rows selection is not there in tabular form I created a select list with submit item with values 10,20,50,100,500,1000.
    default value is '15'.
    My tabular form has 15 columns and out of them 12 are editable.
    Apex version is 3.1.

    Sounds like you're submitting too many parameters (15 * 130 = 1950), very close to 2000
    Check this post our regarding PlsqlMaxParameters
    "Page cannot be found" error when submitting tabular form
    Scott

  • Custom error message in a tabular form

    Hello,
    I try to implement a solution for a custom error message in a tabular form.
    My intention is, that a error message about a foreign key constraint violation should told the end user what happens in a friendly way.
    So I try to implement my own delete-process, where I can catch the exception and display my own error message.
    In the process I use the following code to delete the selected row:
    begin
    for i in 1..apex_application.g_f01.count loop
    delete from d_cmp_campaign
    where campaign_id = apex_application.g_f02(i);
    end loop;
    end;
    And this is the select of the tabular form:
    select
    "CAMPAIGN_ID",
    "CAMPAIGN_ID" CAMPAIGN_ID_DISPLAY,
    "NAME",
    "CAMPAIGN_NO",
    "DWH_DEF_TIME",
    "DWH_DEF_USER"
    from "#OWNER#"."D_CMP_CAMPAIGN"
    The problem is, that the first row is deleted always, whatever row is selected.
    Can anyone help me with that issue?
    Thank you,
    Tim

    Every checkbox has a value which is the corresponding row. You got to get the row number
    first and based on that you select the record. For example, if you click the rows 1 and 5,
    you first need to know which rows are selected. Then, you would loop twice and get the
    first and the fifth array values.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

Maybe you are looking for