Updating on a tabular form

hi, i have two extra column on my tabular form and one say 'UPDATED_BY" and the other says "DATE_UPDATED" i am trying to set the parameters so that every time someone adds a row to that column the system automatically displays the name of the user and the current date and time on the other column, both are read-only columns and i want the data to update on just the new row that was added, how would i go about doing this..

Hi,
The best option, in my opinion, is to use a database trigger.
Follow this topic to get how to instructions:
Passing SYSDATE between pages
Paulo Vale
http://apex-notes.blogspot.com

Similar Messages

  • Mass Update Column In Tabular Form

    Hi,
    I'm trying to create a tabular form that has a mass update column function. i.e. the tabular form will be displayed as normal but at the top of certain columns will be a text box or lov and what ever is entered into those boxes will be cascaded into the empty values in that column without refreshing the page.
    Hope that makes sense.
    I've search the forum but cant find reference, is this possible.
    Thanks Andy

    Hi,
    Just wondering if anyone had any thoughts on this.
    I can get the text to populate another cell e.g.
    http://mlw-mis-2/dev/apex/f?p=174:4
    But how can i get it to reference a column, this is what I'm using to reference another item
    onKeyUp="f_getTextUpper('P4_COL1','P4_TEXT')"
    and I've tried changing the P4_TEXT to other things like
    apex_application.g_f03 (vRow)
    apex_application.g_f03 (i)
    apex_application.g_f03
    But with no luck

  • Ora -20001 error coming while updating from a tabular form

    Hi
    I have a tabular form , which updates a table in the database.
    Whenever I update the record first time I getting an error as
    Error in MRU internal routine ORA-20001.Error in MRU:row=1,
    ORA-1403 no_data_found, update abc.sale_forcast_temp set "PK_ID"=:b1,"W27"=:b2
    Error unable to update process
    But when I press Ok return to the form and then again try to update , records gets successfully updated
    Regards
    Shashi

    Kamal,
    This will be the pseudocode.
    Procedure A()
    select * from EMP bulk collect into records_array; --Of type RECORD_ARRAY
    batch_count = (records_array.length) / batch_size;
    --batch_size is say 5000 rows and batch_count is the number of batches  
    for i in 1..(batch_count+1)
    B( records_array);
    C();
    commit;
    Procedure B(records_array in RECORD_ARRAY )
    INSERT /*+PARALLEL(EMP_DUMMY, 2) */
    INTO TABLE EMP_DUMMY
    SELECT * from TABLE(CAST(records_array as RECORD_ARRAY) ;
    Procedure C()
    Other operations which include reads on the EMP_DUMMY table;
    This is the top view of how it looks like. Actually the Select statement for the insert statement is very complex and I do a join on the records that are being passed in by casting it into a table. This query is taking about 40 minutes for 10,000 rows in the records_array. I need to parellelise this query because each row of the records_array yields a different row for the EMP_DUMMY table.
    I hope that I made it clear for you.
    Can you also tell me if procedure C in which I shall be doing a read on the EMP_DUMMY table, has any affect of the parallel insert
    Thanks for your help.

  • How to prevent update in a tabular form

    Hello,
    I have a tabular form table based.
    I need one cannot update rows, but just insert and delete.
    I'm working on Apex Application Express 4.1.0.00.32.
    How can i do?
    Thank you.

    If I get rid the Submit button, how could i submit the inserted rows?

  • Updating fields on Tabular Forms created with wizards

    I have created a Tabular Form using the creation wizard in version 2.0.
    When we update database records, we always place a date and a user ID into the record to track the last time updated.
    In HTML-DB I typically create an "After Submit" process called "Set Hidden" which updates my items LAST_UPDATE_DATE and LAST_UPDATED_BY.
    This works great on non-Tabular forms when I am dealing with one record at a time.
    How do I do this on a multi-row tabular form?
    Any help would be appreciated.

    Sorry, I assumed a basic familiarity with Oracle and HTML DB development concepts
    1. "v" is a HTML DB function to read session state
    2. v('APP_USER') will give you the authenticated username of the current session
    3. For some reason, if that is blank, the NVL will evaluate to USER which is a builtin Oracle keyword just like SYSDATE. USER evaluates to the userid for the currently connected Oracle user (typically HTMLDB_PUBLIC_USER)
    4. FOO is the function which will take the username and convert it to the internal id you seem to want.
    5. NVL is a function that evaluates both its arguments and returns the first non-null expression.

  • Unable to Update Collection from Tabular Form

    I have built several Tabular Forms where I have updated the apex_collection with the data entered into the form. Then I loop thru the collection and update the database.
    I now Copy a working form to create a new form using data from a different table. All I am doing is changing the underly apec_collection with a different select statement and give it a new collection name. The number of columns on the tabular form are the same as the working form.
    Now I run the form and I get ORA-01403: no data found Error UNABLE to UPDATE ROWS
    It is acting like it is not finding any data from the collection. But I put in the same selection critera for the update into a report below the tabular form and I see data just fine.
    Here is the code I am using to update the collection when the SAVE button is pressed (Process on Submit before Calculations).
    begin
    for c1 in (
    select seq_id from apex_collections
    where collection_name = 'IPR_MATRIX' and c001 = :P21_FACILITY
    and c002 = :P21_DEPT
    order by seq_id) loop
    c := c+1;
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>5,p_attr_value=>wwv_flow.g_f01(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>6,p_attr_value=>wwv_flow.g_f02(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>7,p_attr_value=>wwv_flow.g_f03(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>8,p_attr_value=>wwv_flow.g_f04(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>9,p_attr_value=>wwv_flow.g_f05(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>10,p_attr_value=>wwv_flow.g_f06(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>11,p_attr_value=>wwv_flow.g_f07(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>12,p_attr_value=>wwv_flow.g_f08(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>13,p_attr_value=>wwv_flow.g_f09(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>14,p_attr_value=>wwv_flow.g_f10(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>15,p_attr_value=>wwv_flow.g_f11(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>16,p_attr_value=>wwv_flow.g_f12(c));
    end loop;
    end;
    Any Ideas what I am doing wrong?

    c is set to 0
    It looks like I may have found my problem.
    There tabular form is limited by a where clause in the report to a subset of the collection. Making the collection match the same where clause seems to have fixed my problem.
    Not clear on why that works like that but it looks like I may have it working.

  • Record Updation Error in Tabular Form

    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 = "60B0A3BCA64C764FB47C46C02197B8A7", item checksum = "AB478B2987786CBC47D157BCDDF454AF"., update "DEMO"."BAK_SETUP" set "PHSICAL_NAME" = :b1, "START_TIME" = :b2, "END_TIME" = :b3, "INSTANCE" = :b4, "CONTENT" = :b5, "REMARKS" = :b6, "TAKEN_BY" = :b7

    Dear ,
    Yes, i am using Trigger to increment but my pk is S_NO and this increment via Sequence .
    My Trigger
    CREATE OR REPLACE TRIGGER  "AR_LINEID_1_TRG"
       before insert or update on AR_INVOICE_DTL_1
       for each row
    begin
    if inserting and :new.LINE_ID is null then
    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(LINE_ID, -5))), 0)+1, 5, '0') INTO :NEW.LINE_ID FROM AR_INVOICE_DTL_1  WHERE INVOICE_NO=:NEW.INVOICE_NO;
    end if;
        if inserting then
             :NEW.ENTERED_DATE := SYSDATE;
             :NEW.ENTERED_BY := nvl(v('APP_USER'),USER);
          end if;
          if updating then
             :NEW.MODIFIED_DATE := SYSDATE;
             :NEW.MODIFIED_BY := nvl(v('APP_USER'),USER);
          end if;
       end;
    /is trigger Problem.
    How to resolve it?
    Thanks
    Edited by: Vedant on Sep 4, 2011 10:20 PM

  • Does anyone know a way of making primary keys updatable in tabular forms

    Is there a way i can make my primary key updatable in a tabular form.
    I have two tables one called proposal details and one called student current details. Bascially you select one of your proposal details to become your current project this is done via the proposal id. The problem is that i cannot make this field editable in a tabular form. Does anyone know how i could make this primary key updatable?

    Hi Dan,
    One suggestion, perhaps, would be to base the tabular form on a View rather than directly off of the table. The view could include two instances of the proposal id field - the actual field and a second field called, say, PROPOSAL_ID_EDITABLE. You can then use an INSTEAD OF trigger on the view to update the actual table data with the value entered/selected in this second field.
    The reason why Apex will stop you updating primary keys is that it needs to be able to use these to get back to the original record to apply any changes. If you use a view instead, ensure that the primary key fields are not editable but allow the user to change a dummy field instead, the pk fields are available for Apex to get back to the data but the trigger will change the value instead.
    Regards
    Andy

  • 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

  • TABULAR FORM UPDATE ERROR CURRENT VERSION OF DATA IN DB HAS CHANGED...!

    Hi all Experts on Apex 423 and Oracle xe 11g r2...
    I'm getting a systematic error when updating a Apex Tabular form : the Oracle internal engine complaining that the row ID's are out of syncr?  I'm use ROWID instead of ID  ( trigger has been created but I think should not used ...!)
    Any advise.
    remark:  The  SIMPLE DATA APPLICATION has the same issue when trying to update the QUANTITY field on ORDERS... STRANGE NOT?
    MFOConsulting  Switzerland
    [email protected]

    Hi All Apex Experts,
    Détails  with Détails records  in a TABULAR FORM .
    I tranformed this program Master-Détails with Détails records  in FORM ( not tabular)  and this  error message is no more displayed on the screen.!!
    CONCLUSION:   there is a   SERIUOS  BUG in Apex 423.00.08   and 424.00.008!!
    I hope that People in Oracle Corporation is  working on this bug. and the next release of  Apex 5.0 will correct it.
    PS:   The SIMPLE DATA BASE installed   with any version of Apex... display this MSg .( update ORDERS  quantity of items and you recieve thiS fanny message!
    MFOConsulting Switzerland

  • Tabular form Update Error,"Current version of data in database has changed

    I'm getting an error when updating a Apex Tabular form. It's complaining that the row id's are out-of-sync. The error reads,' Current version of data in database has changed since user initiated update process. current row version identifier = "56DW5A8A7EBA3B42073AE6E71480A784" application row version identifier = "99B52A15F10E34647E9E18B6B7AE8C30" .
    Has anyone received this error? Any solutions? Note that the primary is being populated by a trigger. I have another tabular form for a different application that updates without issue, this however, uses a sequence to update the primary key.
    Thanks,
    James

    Make sure that the form is defined such that it "knows" that the PK is being set by a trigger. Do not try to set it in the form if the trigger is doing it. Pretty much if a trigger attempt to modify any column that also was editable (including hidden columns) in the form, the two will conflict.
    The other issue could be that do you have any items on the rows that are disabled? Disabled items are not sent to session state so Apex won't be able to properly compute the checksum and it'll find a discrepancy.

  • How to change postion of the field in a tabular form

    Hello Gurus,
    My Table is like .Please ignore dots they have been placed just for better readability
    Year.....product....w1_dt..........w1_qty....w2_dt..........w2_qty.....w3_dt...........w3_qty......w4_dt...........w4_qty
    2010....1.............4-jan-2010....1............11-jan-2010....2.............18-jan-2010.....3.............25-jan-2010....4
    2010....2.............4-jan-2010....4............11-jan-2010....5.............18-jan-2010.....7.............25-jan-2010....8
    I have to make a tabular form for updation only, the tabular form should look like this
    year......product......w1.................w2.................w3..................w4
    2010.....1..............4-jan-2010.......11-jan-2010.....18-jan-2010.....25-jan-2010........-----dates can't be eddited
    ............................1....................2....................3...................4.......................-----this is qty column user will update this qty column
    2010.....1..............4-jan-2010.......11-jan-2010.....18-jan-2010.....25-jan-2010........
    ............................4....................5....................7...................8......................
    Please tell how could I make date field to come over qty field
    Regards
    Shashi
    Edited by: user4285062 on Jul 22, 2010 1:03 AM
    Edited by: user4285062 on Jul 22, 2010 1:10 AM
    Edited by: user4285062 on Jul 22, 2010 1:12 AM

    Hi,
    For your scenario, you need to have two cellVariant as TableStandardCell (say successTSC & failTSC). Add tableCellEditors to these 2 TableStandardCell as you like. Mark there variantKey property as var1 & var2 respectively.
    Do change the cellDesign as you like the color for the TableStandardCell.
    Bind an attribute selectedVariant to your column selectedCellVariant property.
    Now in wdDoModify you can write:
    for(int i=0;i<wdContext.nodeCountries().size();i++){
    if(wdContext.nodeCountries().getCountriesElementAt(i).getStatus().equals("SUCC")){
    // Here node countries is the datasource of your table.
    wdContext.nodeCountries().getCountriesElementAt(i).setVariantKey("var1");
    } else if(wdContext.nodeCountries().getCountriesElementAt(i).getStatus().equals("FAIL")){
    wdContext.nodeCountries().getCountriesElementAt(i).setVariantKey("var2");
    The article below will definetly help you in your requirement.
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0310fd2-f40d-2a10-b288-bcbe0810a961]
    Hope this will surely solve your problem.
    thanks & regards,
    Manoj

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

  • Unable to delete row(s) from tabular form

    Hi!
    I created report with row selector, when I select one row I get tabular form regarding to the selected row from report. I can insert and update data from tabular form, but I have problem with deleting them. Error I get is ORA-01403: no data found (Row 207589)My tabular form is created by wizard and primary key is managed by database rowid, I use apex 4.1 an 10g database.
    Do you know for any solution for my problem?
    Regards,
    drama9346
    Add:
    For creating report and tabular form I use code and suggestion from this thread: {thread:id=2490862}
    Edited by: drama9346 on 28.1.2013 1:51

    Hi,
    I tried everything I know and I didn't solve my problem.
    Can anyone give me some clue?
    Regards,
    drama9346
    Add:
    I solve my problem.
    Edited by: drama9346 on 29.1.2013 1:52

  • Update process does not work on Tabular Form

    Hello,
    I have 2 tabular forms on one page, which are using manual update processes.
    First form is created using wizard, and therefore works perfectly.
    The update process is as follows:
    DECLARE
      lc_string VARCHAR2(4000);
    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_f01.COUNT
      LOOP
         lc_string := lc_string|| '[' ||APEX_APPLICATION.G_f*03*(i) || '|' || APEX_APPLICATION.G_f*04*(i) || ']';
      END LOOP;
      --Database processing using the concatenated string here
    END;Second form is created manually, using the following code:
    SELECT apex_item.checkbox (30,
                               '#ROWNUM#',
                               'onclick="highlight_row(this,' || '#ROWNUM#'|| ')"',
                               NULL,
                               'f30_' || '#ROWNUM#'
                              ) delete_checkbox,
           CATALOG_ID,
              apex_item.hidden (31, CATALOG_ID)
           || apex_item.text (32,
                              LANG,
                              80,
                              100,
                              'style="width:100px"',
                              'f32_' || '#ROWNUM#'
           || apex_item.hidden (33, wwv_flow_item.md5 (LANG, DESCRIPTION)) LANG,
           apex_item.text (34,
                           DESCRIPTION,
                           80,
                           100,
                           'style="width:255px"',
                           'f34_' || '#ROWNUM#'
                          ) DESCRIPTION
      FROM V_CATALOGS
    UNION ALL
    SELECT     apex_item.checkbox
                              (30,
                               TO_NUMBER(9900 + LEVEL),
                               'onclick="highlight_row(this,' || '#ROWNUM#' || ')"',
                               NULL,
                               'f30_' || TO_NUMBER (9900 + LEVEL)
                              ) delete_checkbox,
               NULL,
                  apex_item.hidden (31, NULL)
               || apex_item.text (32,
                                  NULL,
                                  80,
                                  100,
                                  'style="width:100px"',
                                  'f32_' || TO_NUMBER (9900 + LEVEL)
               || apex_item.hidden (33, NULL) LANG,
               apex_item.text
                                               (34,
                                                NULL,
                                                80,
                                                100,
                                                'style="width:255px" '  ,
                                                'f34_'
                                                || TO_NUMBER (9900 + LEVEL)
                                               ) DESCRIPTION
          FROM DUAL
         WHERE :P18_TEMP = 'ADD_ROWS1'
    CONNECT BY LEVEL <= 1However, the update process does not work on this form.
    I created it using the first one as an example, but with the id's of the second form:
    DECLARE
      lc_string VARCHAR2(4000);
    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_f*30*.COUNT
      LOOP
         lc_string := lc_string|| '[' ||APEX_APPLICATION.G_f*32*(i) || '|' || APEX_APPLICATION.G_f*34*(i) || ']';
      END LOOP;
      --Database processing using the concatenated string here
    END;Also, both forms are opening in a modal pop-up dialog window.
    I use a Dialog Region plug-in for that.
    Please advise, what is causing a problem with update?

    Sloger,
    if this is your tabular form
    SELECT apex_item.checkbox (30,
    ...and this is your update statement
    FOR i IN 1..APEX_APPLICATION.G_f*30*.COUNT
    ...Then you will only ever update records that have been checked. Unchecked checkboxes are not passed back in the global array. You need to have a hidden column with the ID's for the record and loop through that when you are updating/inserting. That is why the built in tabular form has a MRU and a MRD. the MRU loops through the hidden ID column. The MRD loops through the checkbox.
    Thanks,
    Tyson Jouglet

Maybe you are looking for

  • Dúvida sobre a fase de processamento em paralelo

    Boa tarde pessoal, Estou configurando / testando o processo de geração de XML em paralelo à NF modelo 1. Meu cenário aqui no cliente é a geração do XML no ECC 6.0, SP13, com a mensageria Mastersaf. Segui os passos descritos na documentação oficial da

  • Finder Cover Flow initial view

    How can I set the initial view settings when using cover flow within finder- the finder file/folder list at the bottom of the window is way too short and the cover flow file preview portion of the window is massive. Appreciate?

  • MessageConsumer receives no messages

    Hi, i successfully establish a connection to a remote SonicMQ message broker (from one of our custumers) and then call receive to ask the consumer for any messages in the queue, but i always get a NULL return result, indicating that the "MessageConsu

  • Illustrator CS3 crashes if join lines on different layers

    Sent in a crash report earlier, but didn't realize the source of the error at the time -- which was that the two lines I was attempting to join were located in separate sublayers. Illustrator did not give me an error message when I attempted to join

  • Trouble with Youtube using WRT54GL

    I'm not sure if this is a problem with the router, but I'm wondering if anyone can help with this situation. I'm using a WRT54GL with stock firmware and occasionally some videos on Youtube won't load. Although, they'll load at other times. My ISP is