How to Multi Row Update function in Manual Tabular Form

Hi All,
In my application I am using manual tabular form, for Update and insert i have written pl/sql process,
but i want to make use of MULTI_ROW_UPDATE function for update and insert operations.
How can I implement default tabular form behaviour in manual tabular form.
I am using:
Oracle Database 11g
ApEx Version 4.0
please help me, it's urgent.
thanks
MR

Hi Joao,
First Can u pl let us know your view is based on how many
tables?
If it is a simple view ,you can open the form in update mode
passing a parameter to it thru a procedure or thru a url or what
ever you feel like(form to form,etc)..I will give you an example
on how to open the form in update mode like below..
1.develop a form based on a simple view
2.Call that form Thru a simple URL
3.In the above you are opening a form with module id
ex:1234567890 in update mode and change portal30 to suit
accordingly..
4.You are passing a parameter called "ABCDEF" TO "NAME" Field to
that form for querrying..
5.Now the form will be opened in update mode and all the fields
are pertaining to the parameter "ABCDEF" and you can update the
fields....
II..Now regarding the check boxes i need to know which version
of the portal are u using..As for as my knowledge goes (up to
3.0.6) there are lot of bugs with the check boxes and check box
checked value is always "yes"(if u want to insert in to the data
base).So try not to depend on checkboxes and instead Combo is
the right answer till oracle portal is free of bugs.
No triggers are required for your requirement....
Hope i have answered your problem ...If any please revert back
with full details
Thanks
Vishnu Singireddy

Similar Messages

  • Delete Functionality in manual tabular form

    Hi everyone,
    I have created 2 tabular forms on the same page.everthing is working fine.Both the tabular form are able to insert and update.I am getting problem to implement the DELETE functionality in those tabular form.
    I inserted this code htmldb_item.checkbox(6, id) del in the region and i created a delete process.But i am getting (no data found) error.
    could anyone help me in solving this.
    thanks
    phani
    ===========================================================
    DELETE PROCESS:
    FOR i in 1..HTMLDB_APPLICATION.G_F01.count
    LOOP
    DELETE FROM (TABLE NAME)
    WHERE id = HTMLDB_APPLICATION.G_F06(i);
    END LOOP;
    =============================================================
    TABULAR FORM 1:
    REGION:
    select x.column1,
    x.column2,
    x.column3,
    x.column4,
    x.column5,
    x.del,
    x.cks
    from (
    select htmldb_item.hidden(1,column1) column1,
    htmldb_item.text(2,column2,10) column2,
    htmldb_item.text(3,column3,10) column3,
    htmldb_item.text(4,column4,10) column4,
    wwv_flow_item.date_popup(5,null,column5) column5,
    htmldb_item.checkbox(6,column1) del,
    htmldb_item.md5_checksum(column2,column3,column4,column5) cks
    from TABLENAME
    union all
    select htmldb_item.hidden(1,null) column1,
    htmldb_item.text(2,null,10) column2,
    htmldb_item.text(3,null,10) column3,
    htmldb_item.text(4,null,10) column4,
    wwv_flow_item.date_popup(5,null,null) column5,
    htmldb_item.checkbox(6,null) del,
    htmldb_item.md5_checksum(null,null,null,null) cks
    from dual) x
    ==================================================================
    PROCESS:
    declare
    l_cks wwv_flow_global.vc_arr2;
    j pls_integer := 1;
    begin
    -- Get original MD5 checksum
    select wwv_flow_item.md5(column2,column3,column4,column5) cks
    BULK COLLECT INTO
    l_cks
    from TABLE;
    -- 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
    for i in 1..htmldb_application.g_f01.count
    loop
    if htmldb_application.g_f01(i) is not null then
    update TABLENAME
    set column2= htmldb_application.g_f02(i),
    column3 = htmldb_application.g_f03(i),
    column4 = htmldb_application.g_f04(i),
    column5 = htmldb_application.g_f05(i)
    where column1 = htmldb_application.g_f01(i);
    else
    if htmldb_application.g_f03(i) is not null then
    insert into TABLE
    (column2,
    column3,
    column4,
    column5
    values
    (htmldb_application.g_f02(i),
    htmldb_application.g_f03(i),
    htmldb_application.g_f04(i),
    htmldb_application.g_f05(i));
    end if;
    end if;
    end loop;
    end;
    I created the other tabular form on the same page with
    htmldb_application.g_f11(i)
    htmldb_application.g_f12(i)
    htmldb_application.g_f13(i)
    htmldb_application.g_f14(i)
    used the same code.

    Have you got any response on this? I would like to know how to do it too. I am trying to implement a manual tabular form on a page and need this functionality.
    I do know one thing. After attending the ODTUG conference last week, Raj said something about you have to process check boxes and radio groups separately from the rest of the form.
    Thanks,
    Michelle

  • Manual Tabular Form Formatting Questions

    Hello, this is my first time using a tabular form and am now trying to tackle creating a manual tabular form. So, now I have some questions on formatting.
    1. Is it proper on this forum to lump several similar questions together or should these be separate postings?
    2. I have a hidden column that I do not want to display on the screen at all. However, I need access to the column later when saving. I am currently using the htmldb_item.hidden function to retrieve the field. This works. However, the column still displays but the value does not display. I then tried to uncheck the show attribute for the column to unchecked. Unfortunately, if this is not selected, when using the htmldb_application.g_f01 function, I would receive an error as if the column did not exist. How do I make the column totally hidden so that it does not display at all?
    3. I have a number column where I want the column to display in dollars (i.e. $100, 000). I tried to set the number format on the column in the report attributes. However, no luck. To retrieve the column, I am using the function htmldb_item.text to retrieve the column. I am not sure if I should be able to format the column in the report attributes or if the htmldb_item.text function has a parameter that I could use for formatting. Suggestions?
    4. Similarily, I would like to right justify this column. How is this accomplished?
    Thanks

    Hi everyone,
    Is there any way to not to display the hidden columns in the manual tabular forms,when we create the manual tabular form using htmldb_item.hidden.
    But need to refer that column in the process.
    In the wizard generated tabular form if the column is of type HIDDEN we dont see that column on the report.
    How can i achieve the same in manual tabular forms..
    Thanks

  • More than one multi row update region on one page - how ?

    Hi.
    I have a page on which i want to use two multi row update regions ( updateable report with three buttons like new/delete/save ).
    But i do not find a setting for the MRU-Process oder "Add-New-Line" Process that lets me reference this process to a specific region.
    The problemm is, that after adding the second region to the page, the "Add-New-Line" - process only adds the new line to the second region and not to the first region anymore.
    How can i make two processes where one adds a line to region1 and the second adds to region2. Same question is with updates too. How can i say that process on updates the changes in region1 and the other process updates the changes in region2 ?
    Thanks for help.
    greetings
    bernd

    Unfortunately, the builtin MRU process supports only 1 updatable region per page.

  • Need to perform multi-row update/delete

    Gday,
    I have a request to have one update button for a multi-row form. Also needed will be a checkbox as part of the row.
    The check boxes only purpose is to signify the record should be deleted. Thus I am assuming I cannot use default
    apex functionality and must manually build the multi-row form. I guess I would loop through and check to see if a
    record is checked delete otherwise loop through and update all columns for that record? I am assuming I should
    use the examples in http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html
    is that all still valid for apex 3.2.1?
    Cheers

    Hello:
    You could also do the following
    Generate the tabular form page using the wizard
    Delete or not display the 'Delete' button
    Delete or not execute the 'ApplyMRD' process
    Create a new page process with a sequence higher than the standard MRU processes. Make this process conditional on the 'Submit' button. Use code similar to the one below for this page processfor i in 1..apex_application.g_f01.count loop   --- f01 is the selector checbox, f02 is the hidden column with the table's PK
      delete from emp where empno=apex_application.g_f02(apex_application.g_f01(i));
    end loop;Now, when you click 'Submit' records with their selector checkbox checked will be deleted by the newly added page process. The rest of the functionality of the tabular form remains the same.
    varad

  • 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

  • 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

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

  • About Multi Row Update...

    APEX support Multi Row Update, but it is only support have two or fewer columns making up the primary key. now i want to use 3 columns as primary key to update datas, i how to implement it in APEX? thanks
    · Table Owner: The schema name for the owner of the table.
    · Table Name: Enter the table name or view. MRD’s and MRU’s can only dynamically build SQL statements for a single table or view.
    · Primary Key Column: This is the first column of the primary key for the table. It is used for building the WHERE clause for the dynamic statement.
    · Second Key Column: This is the column name for the second database column making up the primary key for the table. The MRU and MRD processes can only be used for tables that have two or fewer columns making up the primary key.
    Edited by: user8016603 on 2011-3-14 上午1:51

    check {message:id=9369070}

  • Query for create manual tabular form using apex collection add row button functionality

    Hello everyone
    My requirement is i created a tabular form manually using apex collection but if i click on add row button then previously selected data refreshed and added new row in this form it is fine.but i don't want to refreshed previously selected data and click on add row button then add new row .how it is possible? plz help
    Thanks & Regards,
    Ujwala

    Ujwala
    Instead of starting a new thread with the same question as Query for create manual tabular form using apex collection add row button functionality.
    Could you answer the question about what you see while debug the javascript code.
    If you don't understand the question or have trouble debug javascript let us know.
    Nicolette

  • Conditional Select List in a Report maintained using a Multi Row Update

    I have a SQL Report that is maintained with a "Multi Row Update" process. One of the columns needs to be ether a "Select List" based on a named LOV or just "Text" (Read Only) based on the value in the column. I have the UI working using a case statement and apex_items in me SQL but the Report Column is not marked "Edit" and the "Multi Row Update" process just ignores changes.
    Any help would be great!

    Just curious, why is the first parameter to in third TEXT_FROM_ITEM invocation NULL instead of 20? Also check your first parameter in your ELSE. Shouldn't it be a global number as well?
    Did you try adding a hidden item to your SELECT statement? Something like:
    (case
    when CSSN.KTTR_BILL_STAT_UID = KT_UTIL_PKG.get_kttr_uid_from_ref_val('SESSION_BILL_STAT','SESSION_BILL_STAT_1') then
    apex_item.select_list_from_lov(20,CSSN.KTTR_BILL_STAT_UID,'KTTR_SESSION_BILL_STAT_PRPR','','NO')
    when CSSN.KTTR_BILL_STAT_UID = KT_UTIL_PKG.get_kttr_uid_from_ref_val('SESSION_BILL_STAT','SESSION_BILL_STAT_2') then
    apex_item.select_list_from_lov(20,CSSN.KTTR_BILL_STAT_UID,'KTTR_SESSION_BILL_STAT_PRPR','','NO')
    when CSSN.KTTR_BILL_STAT_UID is null then
    apex_item.text_from_lov(20,'KTTR_SESSION_BILL_STAT')
    else
    apex_item.text_from_lov(20,CSSN.KTTR_BILL_STAT_UID,'KTTR_SESSION_BILL_STAT')
    end) as KTTR_BILL_STAT_DISP,
    apex_item.hidden(30,CSSN.KTTR_BILL_STAT_UID) MIRRORThen in either an Javascript onBlur event on KTTR_BILL_STAT_DISP or in a Page Process assign the value of KTTR_BILL_STAT_DISP to MIRROR.
    Mike

  • Multi row update not occuring

    I have created a tabular form using the wizard. This form will show three columns (and in addition a checkbox). I would like this form to be updateable in only certain instances. Because of that, I select the columns twice. I make one of them updateable, and the other read-only. Then I have a conditional display for the columns, so that the updateable columns are shown if a status variable in my page is 'EDIT' and the read-only columns are shown otherwise.
    The problem is that the multi row update does not occur. If I show one of the read-only columns when in the edit mode, the update is done. Also it is executed if I show one of the editable fields when the page is not in edit mode. But when I show only the editable fields in edit mode, and only the read-only fields when in read-only mode, the process is not run.
    What can I do about this? Why doesn't the multi row update occur?

    An alternative is to control the updates by controlling the buttons. Only show the submit/update button if the status on the page is "EDIT".

  • How to Enable Auto Update functionality in  adobe AIR application?

    Hi All,
         How to Enable Auto Update functionality in  adobe AIR application and ask for new version to install to user.
         Please provide some informarion regarding above topic.
    Thanks,
    Sunil Rana

    Hi All,,
    Got solution. call checkUpdate() function in application level initialize event.
    private function checkUpdate() : void
                    appUpdater.updateURL = "http://www.aa.com/flex/aa/NativeUpdater.xml";
                    appUpdater.addEventListener(UpdateEvent.INITIALIZED, updater_initializedHandler);
                    //we can hide the dialog asking for permission for checking for a new update;
                    //if you want to see it just leave the default value (or set true).
                    appUpdater.isCheckForUpdateVisible = false;               
                    //we initialize the updater
                    appUpdater.initialize();   
                 * Handler function for updater_initializedHandler events triggered by the ApplicationUpdater.INITIALIZED
                 * @param updater_initializedHandler
                protected function updater_initializedHandler(event:UpdateEvent):void
                    //initializeHandler();
                    appUpdater.checkNow();
    In NativeUpdater.xml
    <?xml version="1.0" encoding="utf-8" ?>
    <update xmlns="http://ns.adobe.com/air/framework/update/description/1.0">
         <version>2.0</version>
          <url>http://www.aa.com/flex/aa/AutoUpdate.air</url>
         <description>
         <![CDATA[                 * This a Win update
          ]]>
          </description>
    </update>
    Upload NativeUpdater.xml file on your Server. When you open your old .air file it will ask for replace with new version.
    Thanks,
    Sunil Rana

  • Multi Row update using pl/sql anonymous block process

    Does anyone have an example of multi row update using a pl/sql anonymous block process?
    The reason I can not use the apex mru process is that the table in questions has a five field key.
    My attempts have failed with a bad number.
    Thanks,
    Gary

    Hi Gary,
    can y<ou pls send the definition of thet table and the UPDATE sql.
    It is a littel difficult like this.
    We need more info.
    BR,
    Lutz
    =;-)

  • Multi-Row Update form with wrapped fields

    Hi,
    I have a multi-row update form with too many fields to fit on the screen without having to scroll. Is it possible to wrap the extra fields onto a 2nd line.
    So each DB record will actually span 2 srceen rows and fit nicely into my browser ??
    Thanks for any help,
    Brandon

    It is possible, but would require some serious work on the report template, to create a custom row template.
    I started to do this at http://htmldb.oracle.com/pls/otn/f?p=24317:191 but realized that it is hard work. Also, where would you show the headings for the second part of the row (split onto the next line)?
    Instead, I would use the Show/Hide columns technique (client-side scripting) to reduce the number of columns shown. Search for it on this forum. Carl and I have some good examples out there.

Maybe you are looking for