Once more - tabular form / update only rows that have changed

I know it's been asked before, but I haven't seen an answer I like. :-)
I have a query that includes a single column the user can update, using APEX_ITEM.TEXT(10, updateable_field, 10, 10)
I have an additional APEX_ITEM.HIDDEN(21) and APEX_ITEM.HIDDEN(22) that hold the two fields of the composite primary key. In order to track whether my updateable_field had changed, I created APEX_ITEM.HIDDEN(11, updateable_field), which I expected would hold the OLD value of the field. See where I'm going with this? :-)
I'm attempting to loop through apex_application.g_f21, get the values for F10 (new) and F11 (old) and compare them. If they're different, I'll do the update.
It works fine if the old value (F11) is empty and I plug in a new value (to F10).
But if I change a field that had already has a value (in F11) and make it NULL, I notice that F11(i) doesn't exist. In that case, I set the value to NULL, and the compare fails because it thinks the row is unchanged.
Can someone suggest or point me to an alternate method that works?
Thanks as always,
Stew

Mike,
Thanks for the suggestion, which is a good one. But I had that one covered.
I have it working now, and I believe the fix was that I moved the APEX_ITEM.HIDDEN that contained the old value in the query. I'd had it concatenated with the column for the new value (which used APEX_ITEM.ITEM). I changed it to concatenate to a plain string value. And now the array has values in it, which I can properly compare.
Thanks again. That was really driving me nuts!
Stew

Similar Messages

  • Apex_Item.radiogroup in a Tabular Form (Update Only, no Insert)

    Hi,
    I'd like to use a radiogroup on a tabular Form. The Form will modify only existing records.
    I've seen some more elaborate examples for Tab Forms that allow Insert.
    But I am trying to use the APEX_Item.radiogroup function for an example like:
    "Select Chairperson_Name, Approve_Status FROM Chairperson_Approval"
    The Approve_Status column can be 'A' for Accept, or 'R' for Reject, and is the only updateable column in the Tabular Form.
    So I should be able to create a Tabular Form (for Update Only) on the table Chairperson_Approval with the wizard.
    Then I want to be able to go into the Source and change the SELECT statement to something like:
    "Select Chairperson_Name, APEX_Item.radiogroup(1,approve_status,.....) FROM Chairperson_Approval"
    and then let the automatic APEX processing (generated by the wizard) do the rest. Right? Can
    anybody give me an exact example for APEX_Item.radiogroup. My documentation is not clear enough on this function.
    Thank you very much, in advance.
    Carol

    Hi Andy,
    Why do you get & set TEST attribute of the radiobutton?
    What is a TEST attribute?
    getAttribute("TEST") == 'Y')
    setAttribute("TEST","Y");So I was thinking I should incorporate this toggle me function with my radiobutton and have the following inside the toggleMe function.
    $x(''P24_SECONDARY_TASK'').value=' || ad.task_id || '"')
    {code}
    Am I right?
    Cheers
    -Joel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to use RichCopy to copy only files that have changed?

    I am using RichCopy to copy files and folders from one system to another on a weekly basis.  RichCopy is working fine, but it is copying 100% of the data every time.  I am looking for a way to use RichCopy where it will compare files/folders from
    the source and only copy what data has changed to the destination.  I cannot find the option to do that.
    Any help would be greatly appreciated...
    Thank you.

    RichCopy is not a Windows 7 feature and it is an obsolete utility and there is no support for RichCopy.
    Info found @ http://en.wikipedia.org/wiki/RichCopy
    RichCopy is not supported by Microsoft.<sup class="reference" id="cite_ref-technet200904_1-1">[1]</sup> The program has
    not been updated since approximately June 2009, despite numerous users requesting for bug fixes.<sup class="reference" id="cite_ref-4">[4]</sup>
    Duplicates functionality already in
    Robocopy
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

  • Tabular Form - Read only condition for certain users

    Is it possible to make a select list field in a tabular form read-only to certain users? Here's the situation:
    The tabular form lists the users who need to select "Approve" or "Reject" in that field (they are approving or rejecting an engineering change)
    I want all of them to see the approval/rejection of their team, but only have access to edit the select list associated with their record.
    Thanks in advance.
    Apex 4.0.0.00.46

    You could use either "authorisations" tab or "conditional display" for the relevant column attribute.
    Report Attributes->Column Attributes->authorisationsIt would be better to have some more detail about what you are trying to get (maybe a quick mock up of the form, for example) but, I can envision something along the lines of the following:
    For each approval/rejection field:
    1. Create an authorisation appropriate for access to to each approval/rejection field e.g. authorisation scheme "FOO"
    2. In the relevant fields column attributes, set the authorisation to "FOO"
    3. now create a read only "public" copy of the above field, using the "display as text (based on LOV does not save state)" - set the authorisation for this field as "{NOT FOO}"
    (if you don't want to use authorisations, you could build an equivalent using "conditional display" instead, which is basically the same thing, except column specific)
    The downside is of course that you're duplicating fields in your query, which creates a bit of redundancy. There may be better ways to achieve this (maybe you could make use of the APEX_ITEM api, for example) but this is fairly easy to set up IMO.

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

  • Displaying the rows that have been updated....

    SQL> select * from spr;
    EMP_NAME EMP_no age sex
    hry 45353 42 M
    spt 43436 34 M
    pen 34533 21 M
    aen 65475 33 M
    SQL> select * from sprfac;
    EMP_NAME EMP_no age sex Appraisal Extra_Time
    hry 45353 N N
    spt 43436 N N
    pen 34533 N N
    aen 65475 N N
    I have a problem regarding updating the sprfac table.
    What i need is to satisfy the following conditions and update the second table with values in the second table.
    I need to upadate the second table when:
    1. The emp_name and emp_no of first table matches with the second table and
    2. The Appraisal field and extra_time field should be 'N' in the second table and
    3. only if the values of age and sex are NULL.
    Let me explain in detail.
    My original table is sprfac. spr is Temporary Table.
    I have some data in flat files and i have loaded all the data into a temporary table using sqlloader. Now i need to update the second table.
    Originally the age and sex fields in the sprfac table are NULL. Once i update the age and sex fields in the sprfac table again if i do update it should not update the rows which have data in age and sex columns.
    Suggest me how to update multiple columns simultaneously or send me the code for the update statement if possible.
    NOTE: I have changed the tablenames and column names since i cannot keep the original tables here.
    And i got the following reply........
    update sprfac a
    set (a.age, a.sex) = (select b.age, b.sex from spr b
    where a.emp_name = b.emp_name
    and a.emp_no = b.emp_no
    and appraisal = 'N'
    and extra_time = 'N')
    where a.age is null
    and a.sex is null;
    Everything is working fine.
    Is there any way to send the name and age fields which have been updated of sprfac to a file.
    should i use cursors....
    Send me the code if possible....
    Thanks..........

    You can try similar to this, if you have oracle 9i. In 8i merge does not work. In that case u have cursor.
    merge into EMP e1
    using akg_emp e2
    on ( e2.empno = e1.empno AND e1.sal > 1000 AND <whatever condition on e1>)
    when matched then
    update set e1.sal = 100
    when not matched then
    insert ( empno, ename, job, mgr, hiredate, sal, comm, deptno )
    values ( e2.empno, e2.ename, e2.job, e2.mgr, e2.hiredate, e2.sal, e2.comm,
    e2.deptno )

  • Can a workflow e-mail notif. only show fields that have changed?

    I'd like to send an e-mail to an end user whenever any field in a Solution has changed. The e-mail notification workflow for my Solution works and starts out like this:
    (PRE('<ModifiedDate>') &lt;&gt; [<ModifiedDate>]) AND...
    However, I run into max character limitation in the e-mail message body. (will look at ToChar next) What I tried to do was display the new and previous values for the fields. This worked till I reached the char limits. Even if I could key in all the lines of characters necessary for this, the mail recipient would have to carefully go through all the fields and compare them to see which one(s) has changed. This takes too much time for the end user to do.
    Is there I way (using a single workflow) to display in an e-mail only the fields that have changed? I've looked through the posts and have not yet found an answer. Thanks.
    Edited by: user11167975 on Jun 16, 2009 1:34 PM

    You can resolve this by creating One workflow for each field or a small group of fields you want to track. Only thing is the user may receive more than one email reguarding the same Solution.

  • How could I update my apps that have my old Apple ID and how could I use face time

    How could I update my apps that have my old Apple ID n how could I use face time

    I can't help you if you don't know your Apple ID and/or password. You can change your password at: Manage My Apple ID. You will need to know the answers to your security questions. If you don't know those, then see the following:
    Alternatives for Help Resetting Security Questions and Rescue Mail
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Customer Service: Contacting Apple for support in your
              country and ask to speak to Account Security.
    How to Manage your Apple ID: Manage My Apple ID

  • I have just purchased a Mac Book Pro. I would like to find the list of all updates and downloads that have occurred since purchase. Where can I find that info?

    I have just purchased a Mac Book Pro. I would like to find the list of all updates and downloads that have occurred since purchase. Where can I find that info?

    I know how to do the updates. What I dont know is what size each update that I have completed was. I am having a data usage disagreement with my Telco and want to prove to them that this computer did not download the amount of data they are claiming it did.

  • I recently just bought a Toshiba 3TB External Hard Drive.  I am trying to partition it on my macbook, but it keeps returning and error message.  The only thing I have changed is renamed easy drive.

    I recently just bought a Toshiba 3TB External Hard Drive.  I am trying to partition it on my macbook, but it keeps returning and error message.  The only thing I have changed is renamed easy drive.

    Your problem is not Boot Camp, in fact, is your optical drive. Win XP requires indeed sp2, but also the internal drive, does not work from external optical drive.
    For other possible tricks, please use the appropriate Boot Camp forum, not here. Mac OS X may be installed from both external and internal optical drive and/or internal/external partition of a disk, any disk. Windows is not so generous.

  • How do I update iCloud when I have changed my Apple id?

    How do I update iCloud when I have changed my Apple id with a new e-mail address?

    Fatinc97 wrote:
    Bt I Cnt Get His Password
    We are sorry for your loss. You will need to repurchase the app under your Apple ID. There is no way around it.
    Umm I Cant Change This Habbit Of Typing
    Yes, you can. Habits are made. They can be broken. Unless, of course, you're too lazy to try?

  • Custom tabular form for multi-row not saving data

    Ok, before anyone asks, yes, I did read the how-to:-)
    I have a custom tabular form, which I did cause I need to use popups and the popups that you can use in the wizard tabular form does not display the text but rather the value underneath it.
    It returns data rather nicely and when I go and update values I can tell it is changing the fields underneath. I put a process in that will display the values in text fields on the form (for one row only) and I see them changing from what is already there and with the proper values.
    However, when I do that the data that is displayed then gets reverted back to what it was previous to the update but reports that the process was successful.
    I have also tried to insert but that is basically doing the same thing. Can anyone guide me.
    SQL to generate the tablular form...
    SELECT x.sak_release_db
    , x.sak_object
    , x.sak_release
    , x.sak_participant
    , x.sak_csr
    FROM
    (SELECT htmldb_item.hidden(1,sak_release_db) sak_release_db
    , htmldb_item.popupkey_from_query(2, sak_object,
    'SELECT b.nam_schema||''.''||a.nam_technical as table_name , b.sak_object
    FROM system_object a
    , database_table b
    WHERE a.sak_object = b.sak_object') as sak_object
    , htmldb_item.hidden(4,sak_release) sak_release
    , htmldb_item.popupkey_from_query(5, sak_participant,
    'SELECT nam_first || '' '' || nam_last as name, sak_participant FROM co_participant') sak_participant
    , htmldb_item.popupkey_from_query(7, sak_csr,
    'SELECT external_id|| ''-''||id_split as co, sak_csr FROM co') sak_csr
    FROM release_db_xref
    UNION ALL
    SELECT htmldb_item.hidden(1,NULL) sak_release_db
    , htmldb_item.popupkey_from_query(2, NULL,
    'SELECT b.nam_schema||''.''||a.nam_technical as table_name , b.sak_object
    FROM system_object a
    , database_table b
    WHERE a.sak_object = b.sak_object') as sak_object
    , htmldb_item.hidden(4,NULL) sak_release
    , htmldb_item.popupkey_from_query(5, NULL,
    'SELECT nam_first || '' '' || nam_last as name, sak_participant FROM co_participant') sak_participant
    , htmldb_item.popupkey_from_query(7, NULL,
    'SELECT external_id|| ''-''||id_split as co, sak_csr FROM co') sak_csr
    FROM dual) x
    Process to verify that I have the correct global fields: (Type: PL/SQL anonymous block, Process Point: On Submit - After Computations and Validations)
    begin
    :P3_2 := replace(htmldb_application.g_f02(1),'%'||'null%',NULL);
    :P3_5 := replace(htmldb_application.g_f05(1),'%'||'null%',NULL);
    :P3_7 := replace(htmldb_application.g_f07(1),'%'||'null%',NULL);
    end;
    Process to do the insert/update. Note, I hardcoded the value in the where clause but I was originally using the global value for g_f01 (i also tried putting a commit in there for fun) (Type: PL/SQL anonymous block, Process Point: On Submit - After Computations and Validations):
    -- Update the RELEASE_DB_XREF table
    FOR i IN 1..htmldb_application.g_f01.count
    LOOP
    IF htmldb_application.g_f01(i) IS NOT NULL THEN
    UPDATE release_db_xref
    SET sak_object = replace(htmldb_application.g_f02(i),'%'||'null%',NULL)
    , sak_participant = replace(htmldb_application.g_f05(i),'%'||'null%',NULL)
    , sak_csr = replace(htmldb_application.g_f07(i),'%'||'null%',NULL)
    WHERE sak_release_db = 22;
    ELSE
    IF htmldb_application.g_f02(i) IS NOT NULL THEN
    INSERT INTO release_db_xref
    (sak_object
    ,sak_release
    ,sak_participant
    ,sak_csr)
    VALUES
    (replace(htmldb_application.g_f02(i),'%'||'null%',NULL)
    ,htmldb_application.g_f04(i)
    ,replace(htmldb_application.g_f05(i),'%'||'null%',NULL)
    ,replace(htmldb_application.g_f07(i),'%'||'null%',NULL));
    END IF;
    END IF;
    END LOOP;

    Florian,
    Checkboxes are different from other HTML form items. When you have a text box for example, there's always a value send to the server when submitting. Even if that value is NULL. When you have a checkbox however, you only get the value if the checkbox is checked. It's not posted to the server when it is not checked. That's the general behavior of HTML forms and not specific to Oracle HTML DB.
    When working with tabular forms in HTML DB, you can access your form values using the htmldb_application.g_f0x arrays. Now if you have for example 10 rows in your form, then you'll get ten elements in your array for text boxes, select lists, etc. For checkboxes however you'll only get as many elements as you have rows checked. If I read your update and insert code correctly, you're trying to use the checkbox arrays the same way you use the arrays based on other item types. My recommendation would be to use Yes/No select lists instead of checkboxes or at least use select lists initially to get it working and then work on properly processing the checkboxes.
    Some general information about working with checkboxes in tabuar forms can be found here:
    http://www.oracle.com/technology/products/database/htmldb/howtos/checkbox.html#CHECKBOX_IN_REPORT
    Hope this helps,
    Marc

  • Not a tabular form, but getting row version identifier error.

    APEX 4.1.0, Oracle 10g
    Error is: Current version of data in database has changed since user initiated update process. current row version identifier = "47FAF7A2C1A5E49E0CF90D1320CCFC50" application row version identifier = "0"
    I've seen this error in the forums for tabular forms, but my form is just a normal apex page with a standard fetch and a standard insert/update/delete process. It isn't a tabular form or a master/detail, just a simple form. There is not another person using the data. This happens on an update or delete and on several different pages for several different tables!
    I've tried using debug, and from debug, I see that the error comes right after this:
    ...Execute Statement: begin begin select "NARR_ID","TEXT","PRJ_PROJ_ID","NARR_TYPE_PROJ"
    into wwv_flow.g_column_values(1),wwv_flow.g_column_values(2),wwv_flow.g_column_values(3),wwv_flow.g_column_values(4)
    from "BASIS"."NARRATIVES" where "NARR_ID" = :p_rowid for update ; end; end;
    I more or less understand what the error is intended for. APEX produces a checksum of the table row values at some earlier point (maybe at the fetch?) and then produces another checksum of the table row values just before the update or delete. APEX then compares the two checksums.
    Based on the error message, one of the checksums is "0". I'm not sure if the "application row version identifier" is the first checksum or the second checksum, but either way it shouldn't be zero. Right? So, why would this checksum be zero?
    Edited by: JackieW on Apr 29, 2013 8:42 AM

    I upgraded to JDev 3.2 and rewrote my code to extend the new
    version of EditCurrentRecord. Now when I deploy to 9ias I get a new error:
    Error Message: java.lang.NullPointerException: I'm following the online help
    to deploy but I must be missing something cause it works in JDev. Any
    suggestions?

  • 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

    Hi everyone,
    I am working on apex 4.1, oracle 11g database.
    I have a tabular form with a first column of checkboxes.
    I want to check all the rows taht interest me, and update them with a value from a select list.
    It is exactly as if i wanted to delete the checked rows, only that i want to update them all with a value.
    Can anyone help me with this?
    I can't seem to find a way to select the rows that are checked.
    Thank you,
    Alex.

    See this http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_app.htm#CHDICJDA

Maybe you are looking for

  • Show all versions of an item in a list view SharePoint 2010

    Hi, I created a task list and a view.  The list has a comments field which is set up to append new comments.  In the view, the comments are coming up with a link "View Entries".  How can I get the view to show all of the comments for each item in a v

  • Best Way To speed up stereo mix 2bpm

    i tried universal and didn't do very well. i'm assuming the rest won't do much better. so is there another program that could do a better job at time and pitch? also could i make the whole mix into a apple loop and speed it up that way? can never fig

  • Deleting entire site from Database

    Hi Everyone, In SAP ME 4.2, how to delete the site and its entire related information from database. And how to fetch the entire information of site from Database. Regards, Rajiv

  • Bridge crash while scrolling on Win 8.1!

    has anyone been experiencing a crash while scrolling in bridge. here's the infor from the reliability monitor in 8.1. TIA Faulting Application Path: C:\Program Files\Adobe\Adobe Bridge CC (64 Bit)\Bridge.exe Problem Event Name: APPCRASH Application N

  • Business Object Infoview very slow on my PC

    We are using BO XI3.0 on a Windows server with an oracle database on a unix platform. We have build severall dashboard for data analysis, each one with "interactive metric trend" and multidimensional queries analysis. We found Infoview very slow to d