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

Similar Messages

  • 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

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

  • Multi-Row Hidden Column Submit Processing

    Hi,
    My attempts to select a hidden column value for use in Submit processing only works when I actually display the column in the report region. I want to store the column value in the array (htmldb_item.?????) without displaying it in the report region.
    I have tried using the following htmldb_item functions: hidden, display_and_save, text. When I use the hidden function and set the column attribute to "Show" then the heading displays, no column data displays, and the htmldb_application.g_f01 value is present for use in Submit processing. When I set various column attributes to cause the column to not display then the column value is not present during Submit processing.
    My code snippets for Region Select and Submit processing are:
    "select htmldb_item.hidden(1, sac.student_acad_cred_id) q_acad_cred_id,..."
    "BEGIN
    for i in 1..htmldb_application.g_f01.count
    loop..."
    Couldn't find answer with Forum search or in the Guide. Thanks for any help!

    Bernhard,
    There are two ways to build tabular forms (multi-row update forms). You can either use calls to the htmldb_item API in your query. Or you can use the built-in display types. The build-in types are generally the better option for a number of reasons, for example, the built-in form elements are only rendered for the rows you actually show on your current page. If you use the htmldb_item API and pagination with several pages, then you would make calls to PL/SQL for every row in your report, no matter whether they are shown or not.
    With the built-in display types you can choose the display type “Hidden”, which will actually append the hidden fields to the last column in your report, so the array is there, but you won’t have to deal with column headings and an empty column.
    When using the htmldb_item API, you should simply append the hidden column to a displayed column, e.g. select htmldb_item.text(…)||htmldb_item.hidden(…) [column alias], … from …
    Hope this helps
    Marc

  • Multi-Row Form Validations - Cannot Re-Use Phone Nos from select LOV

    1) I need some help with a "Multi-Row" data-entry form (page 9)...I have a select list of phone-no's that user picks from the drop-down lov list on a page multi-row select list-drop down - P9_PHONE_ID (has built in lov). The data form is built on 'site_phone_assign' table.
    However, I need to put a page-level validation where the user CANNOT select a pre-assigned phone id (reuse a phone) that's already been assigned (used) and a record exists in the site_phone_assign table. I built the following page level validation on the multi-row edit form which is built on 'site_phone_assign' table...NOT WORKING!
    PLEASE HELP WITH THE BEST WAY TO DO THIS..Thanks!
    --validation type: Function returning boolean
    <code>
    DECLARE
    v_count pls_integer default 1;
    BEGIN
    IF (:P9_PHONE_ID IS NOT NULL) THEN
    select count(*)
    into v_count
    from datahub.site_phone_assign s
    where s.phone_id = :P9_PHONE_ID
    and s.ASSIGN_START_DATE <= SYSDATE
    AND NVL(s.ASSIGN_END_DATE,SYSDATE+1) >= SYSDATE;
    END IF;
    IF (v_count) > 0 THEN
    RETURN (FALSE);
    ELSE
    RETURN (TRUE);
    END IF;
    END;
    </code>
    2) How can I apply validations on a multi-row edit form page where say - start_date is always less than end_date? Both start/end dates are date-picker type of items.
    3) Can ITEM NOT NULL validation be applied on a multi-row edit page? I guess its page-level validation right? Please advice.
    Edited by: Shravanv on Feb 18, 2010 1:50 PM

    Hello,
    In a Tabular Form you need to loop through the records on the screen, so doing a check on :P9_PHONE_ID doesn't work...
    Patrick Wolf made a general solution for this problem, you can read about it here: http://www.inside-oracle-apex.com/plug-play-tabular-form-handling/
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.sumneva.com/

  • 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

  • Custom Popup on a Tabular Form for Multi Row Operation

    I am trying to implement a custom popup on a tabular form that I can pass a value typed in to a text item like “Name” to the popup so it can filter a list of names on what was already typed in.
    Once a selection is made I need to have the selected name passed back to the text item.
    This is easily done when not using a Tabular Form. Any ideas would be great?

    Can someone please help me with this?
    I've read the Thread:
    "Custom Popup on a Tabular Form for Multi Row Operation",
    and have tried following the instructions provided by Willi Firulais.
    I've also tried to integrate the instructions provided by RWeide in response within the same Thread.
    I cannot get the passBack function to Pass the value to the Calling Page.
    (I've tried to organize the pertinent information as it pertains to my application,
    and have included it here below:)
    A. Calling Page (Page# 141)
    1. HTML Header: (Page# 141)
    <script> function callMyPopup(item) { var url;
    url = 'f?p=&APP_ID.:143:&APP_SESSION.::::P143_ITEM:'+ item;
    w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
    if (w.opener == null) w.opener = self; w.focus(); }
    </script>
    2. Region Definition: (Orders) - SQL Query (Updateable Report)
    a. Query:
    select
    'f01_'||to_char(rownum ,'FM0999') ITEM,
    "ID",
    "ID" ID_DISPLAY,
    "ID_PROJECT",
    "ID_SUPPLIER",
    "DESCRIPTION",
    "JOB_NO",
    "QUANTITY",
    "UNIT_PRICE",
    "EXTENDED_PRICE",
    "MANUFACTURER",
    "SUPPLIER",
    "PART_NO",
    "GROUP_LIST",
    "BILLED_PRICE",
    "DATE_NEEDED",
    "DATE_DELIVERED",
    "SUPPLIER_TYPE",
    rownum
    from "#OWNER#"."OAX_MAT_ORDER_ITEMS07"
    where job_no = :P141_JOB_NO
    3. Report Attributes: (ITEM) - URL
    javascript:callMyPopup('#ITEM#');
    B. PopUp Page (Page# 143)
    1. HTML Header: (Page# 143)
    <script language="JavaScript"> function passBack(passItem1, passVal1)
    { opener.document.forms["wwv_flow"].SUPPLIER[&P143_ITEM.].value = passVal1;
    close(); }
    </script>
    2. ITEMS:
    P143_ITEM
    3. Region Definition: (Suppliers) - SQL Query(Structured Query)
    OAX_SUPPLIERS.ID
    OAX_SUPPLIERS.NAME
    4. Report Attributes: (NAME) - URL
    javascript:passBack('&P143_ITEM.','#NAME#');
    Thank you in advance for you help!

  • Multi row tabular form

    can someone repost the instructions for tricking the master
    detail form into emulation a single table multi row form. I
    found someone who poited to an old posting that is no longer
    available

    repost

  • Multi Row Update for Tabular Form

    1) I'm trying to understand how the built-in MRU works for tabular forms: While running through every row, does it check for changes before issuing an UPDATE or does it blindly UPDATE every row in the current pagination range?
    2) If I need to write my own Multi Row Update process for tabular forms, could someone give me some tips on how to do that?
    Thanks,
    Pavel

    1) It stored a checksum for each row that it renders. It calculates the checksum again before processing the rows. The UPDATE statement it issues has a predicate like where old_checksum!=new_checksumSo, it only updates the rows that have at least 1 column value that is different (causing the row checksum to be different)
    2) See the howto at http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html

  • Change color multi-row highlite tabular form

    I would like specific instructions on a quick way to change the highlite color when the multi-row check
    box is chosen on a tabular form.
    Thanks,
    Sabrina

    Sabrina,
    To change the background color of the rows selected using the row selector, edit the report template you’re using, scroll down to row highlighting and type the color you like into the field labeled “Background color for checked row”. You can type in the name of the color or the code.
    Hope this helps,
    Marc

  • JSF multi row editable detail form -- moving backwards or forward

    Innocently trying to create an intuitive editable master detail JSF form. Similar to what you would want in any application and something that can be done in less than a minute in Oracle Forms
    The master form is a just a simple editable single master form based on the dept table. and the detail is the emp table. I have create the model using the wizard and made sure a link view is created.
    The details form is a multirow form with all the editable columns
    I added two button for the details form (create, remove)
    I entered the master record (no commit yet)
    then i moved the cursor to the details form and created a few records, i found an error in the second row in the detail form, therefore, innocently, i selected that row and pushed the Remove button. shocked to find out that the first row in the details form is deleted regardless of which row is selected. Additionally, when a row is created using the create button, the row is created above the first row of the details form (as if the first row in the details form is always current).
    Such requirement should be easily satisified by a Framework?
    Ammar Sajdi
    Oracle
    Amman

    thank you frank for your response
    Actually, my DETAILS form DOES include the Select Option, and i was really expecting (and accepting) the fact that i need to point to the row i need to delete. Actually, 20 years back i was 8080 assembly language programmer, and used to handle thing at very very low level. However, i do select a row, and i can see the Radio activated for that row, unfortunately though, the seemingly selected item in the DETAILS form is not the one that is removed, it is instead, the first row that is actually removed. It seems as if the form rows are not synchronized with the ROW selector you mentioned,, The first row is somehow internally selected (always)
    This is the interesting part.
    I created another project with a single multi row editable table (without master details) only a master, and guess what, it is working beautifully! exactly as you descirbed. Select a row, press delete and there you go, the record no longer exists
    Ammar Sajdi
    visit me
    www.e-ammar.com/Oracle.htm
    regards

  • How to re-query changed record in multi-row block after update in a called form

    Hi,
    I have a form that I use to perform searches, which is a multi-record block.
    The user can navigate to a record, press a button on call another form which provides
    more detail, and allows update of the record.
    If the user changes it, and returns to the original search form, how can I re-query the
    changed record to update the fields on the search form.
    Is there a way other than to re-query the
    whole block - a built-in to just update on record if it's changed on the database.
    If not, can I use globals to pass back the data (since only a few fields are updatable),
    and change the record without effecting its forms status.
    Many thanks
    Bernie

    BD,
    I haven't managed to look at a solution yet, but the block is a large multi-row block,
    with an ORDER BY, and since it can return a large number of records, there is a short
    delay. I was hoping there was a way of just
    re-querying the one record, which was displayed
    in the second form for update.
    I'll give the query a go, or might try and pass back some globals with the update values.
    By the way, DML Return Value is an excellent feature, but only works against Oracle 8.
    It basiclly adds the RETURNING clause to any DML statement (see SQL manual), so that if
    a trigger changes/adds values you didn't provide, it will return them back to you
    so the values in your form are correct.
    I use a trigger on the DB to populate history fields (create/update,who/when) and
    the PK sequence. Using this feature, those values are returned to the block and displayed.
    Regards
    Bernie

  • Multi-row form with button to save and add another row

    Can you have a button on a multi-row tabular form that would save the current changes, and than open a new row up on the fom for a new entry to be entered? This would combine the save and add a row button functions.

    Add Row button is doing exactly what you are asking for - it will save the chages you
    made and add a new row.
    Denes Kubicek

  • Multi Row Form and onload

    Hi,
    I've a wizard based Multi Row Form (MRF) based on a view (on 2 tables) with Instead of triggers to handle the DML. I have an onchange event on one particular Select List based item in each row that simply disables/enables other row items depending on the value. All this is working fine, but I need to repeat the disable/enable of items for each row once the page has loaded.
    My initial thought is to use an onload event in the Page definition, but can and should I be handling this in a Page Process instead (bear in mind that this is a wizard generated MRF)? Also, I need to ensure that new rows (via the Add Row button) are handled correctly. If I go down the onload event route, then is the simplest way just to get an array (getElementsById?) of the items and loop through them? Any thoughts would be most appreciated on the most efficient way to do this.
    Cheers,
    PaulB

    Hi,
    Yes, it appears the same as an onload but, fortunately, doesn't interfere with any existing onload code - you can only have one onload function call for the window object.
    You can loop through the items on the form using something like:
    function disableItems()
    var x = document.getElementsByName("f03");
    var y = document.getElementsByName("f04");
    for (int k = 0; k &lt; x.length; k++)
    if (x(k).value == 'A')
      y(k).disabled = true;
    else
      y(k).disabled = false;
    }This assumes that the select list is in column 3 (which should mean that the SELECT objects should have a name attribute of "f03") and that the item you want to disable/enable is in column 4 ("f04") - so adjust as necessary.
    As you have the same number of items in column 3 and column 4 - the above loops through the ones in column 3, checks the value selected and then disables/enables the item in the same row in column 4.
    Andy

  • Multi row portal form based on a single table or view

    Hi,
    I have to create a multi row (tabular format) portal form based on a single table. Please help.
    Thanks

    Hi,
    A workaround to create multi row for based on single table has been discussed in the following :
    http://forums.oracle.com/forums/message.jsp?id=469778
    Thanks
    Vineet

Maybe you are looking for

  • How to Disable Event firing while updating a list item using poweshell

    Hi All, I am working on a powershell code which updates most of the list items in the entire web application. I am using SystemUpdate($false) to update the items so that 'modified' and 'modified By' and versions are not changed. However event receive

  • COLUMN_RENAME IN ORACLE 8i

    IS THERE ANY WAY TO RENAME A COLUMN IN ORACLE 8i TABLE ?

  • Can't Burn Audio, MP3's skip

    Hello, I just upgraded to Itunes 7 and I can't burn audio cd's. My CD-R is listed as useable and I've used all of the troubleshooting options I could find to no avail. Anyone having this problem.......and what was your solution if fixed. Also, it wil

  • Apple password not recognized on new macbook pro

    I just bought a new macbook pro and used my time machine disk. All went fine until a message appeared that a device was incorrectly ejected. I clicked the message away and the transfer seemed to continue althpugh it suddenly needed twice the time as

  • Iso 8.1 is overheating my iphone 6 and dries the battery !

    I'm using an Iphone 6...since I upgraded to Iso 8.1 my device is overheating and the battery dies in half of the day! Apple we are waiting for a fix...or just downgrade back 8.02