Forms inserts rather update on commit_form when changes made in records

I have created a form in forms builder 10g. These are 3 tables.
1. Recovery_Shift (Production Shift Information) -- Parent Table
2. Recovery_Size (Many Size in one Production Shift) -- Child to Table- 1
3. Recovery_Size_Dtl (Details of the Size Recovered) -- Child to Table- 2
The form has been created using 3 datablocks correpsonding to the above tables in two canvases.
In second canvas I have a "Save" Push Button with code "Commit_Form". Whenever I am inserting first time it is ok. After pressing this push button if I make any changes in any record and press the Save button, forms shows unique constraint error. When I disable this constraint in table. The form inserts a new duplicate row in the table.
The problem is ==>if I make any changes in the form after pressing "Save" button (Commit_form) it inserts the whole row rather updating the row.
What could be the cause and solution. Please guide. The module is at implimentation stage. Thanks in advance for guidance.
Tables for your references.
Table - 1. Recovery_Shift
SHIFT_ID----------NUMBER(10,0)     --> PK
RECOVERY_DATE-----DATE     
SHIFT-------------VARCHAR2(1 Bytes)     
SHIFT_START_TIME--DATE     
SHIFT_END_TIME----DATE     
SUPERVISOR--------VARCHAR2(6 Bytes)     
OPT---------------VARCHAR2(6 Bytes)     
ENTRY_BY----------VARCHAR2(6 Bytes)     
ENTRY_DATE--------DATE     
VALIDATE_BY-------VARCHAR2(6 Bytes)     
VALIDATION_DATE---DATE     
SHIFT_MINUTE------NUMBER(10,0)     
Table - 1. Recovery_Size
SIZE_ID-----------NUMBER(10,0)     --> PK
SHIFT_ID----------NUMBER(10,0)     --> FK
REJ_STAGE---------VARCHAR2(2 Bytes)     
ITEM_SIZE---------NUMBER(7,2)     
ITEM_CLASS--------NUMBER(4,2)     
ITEM_GROUP--------VARCHAR2(2 Bytes)     
ITEM_QUALITY------VARCHAR2(3 Bytes)     
RECOVERED_MTR-----NUMBER(10,2)     
RECOVERED_TON-----NUMBER(10,3)     
AUCTION_MTR-------NUMBER(10,2)     
AUCTION_TON-------NUMBER(10,3)     
ITEM_SPEC---------NUMBER(2,0)     
Table - 1. Recovery_Size_Dtl
SIZE_ID-----------NUMBER(10,0)     --> FK
LEN_MIN-----------NUMBER(4,2)     
LEN_MAX-----------NUMBER(4,2)     
REC_AUC-----------VARCHAR2(1 Bytes)     
PCS---------------NUMBER(10,0)     
MTR---------------NUMBER(10,2)     
TON---------------NUMBER(10,3)     
SEGMENT-----------VARCHAR2(1 Bytes)
Message was edited by:
Vinay Pandey

for inserting a row it asks for commitThat is normal behavior. When you update or create a record in the Recovery_Size_Detail block, you must commit the record before working on another record.
I think it may be the cause of problem that there are already saved (commited)records in the form when i am entering more records in 2nd & 3rd table and commiting them.If you are creating new records after the commit, and these new records are duplicates in the database, then the unique constraint error is expected. If you want to ensure the user is not creating duplicate records before trying to commit, then see this:
http://sheikyerbouti.developpez.com/duplicates/duplicates.htm
You might try creating the form with just two blocks:
First block (master): Recovery_Shift
Second block (detail) Recovery_Size
Get that to work and test it by updating and creating records. After you are pleased that it works, save it and then add the 3rd block as a detail block for the the 2nd block. Then you have this:
Block1. Recovery_Shift (master)
Block2. Recovery_Size (detail for block 1 and master for block 3)
Block3. Recovery_Size_Detail (detail for block 2)

Similar Messages

  • [Bug?] Defer Panel Update not working when changing scale property

    Hi,
    I found that Defer Panel Update [when True] does not work properly when changing the scale fit property of an intensity graph.
    Try the VI.
    When Defer Panel Update is True, and you change the Numeric controls, the Intensity graph is not updated (as expected).
    But now change the "Z Scale.Scale Fit" button and.... the Intensity graph is updated (only the Z-color, not the axis).
    This looks to be a bug to me!
    Nicolas
    Attachments:
    [Bug] Defer Panel Update not working when changing scale property.vi ‏27 KB

    Hi Nicolas,
    This indeed looks like a bug. I will do more research on it and file a bug report if it's not already filed.  Thank you for posting this information!
    Yi Y.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Automatically update a 'Last Updated By' field when changes are made a database record.

    Basically I'm building a database app using mySQL and PHP.
    I'm from a design background, rather than a techie one, so I'm far
    more comfortable using the DW and phpMyAdmin parts, but less so
    with any code.
    We want to have a 'Last Updated By' field that automatically
    populates with whoever created or last edited a record.
    What's the best way of achieving this?
    I've looked at some mySQL stuff, but all looks a bit over my
    head to be honest. Have a table of Users in phpMyAdmin - not one as
    part of the database, but under privileges - so where 'root' is,
    plus another couple I've added.
    In the web directory, I just have a standard connection file
    that looks like :
    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_connDevelopments = "localhost";
    $database_connDevelopments = "developments";
    $username_connDevelopments = "root";
    $password_connDevelopments = "password";
    $connDevelopments =
    mysql_pconnect($hostname_connDevelopments,
    $username_connDevelopments, $password_connDevelopments) or
    trigger_error(mysql_error(),E_USER_ERROR);
    ?>
    But how do I do it so that people log in to the database?
    Alternatively, can I just use DW's log in (ie log in to
    particular pages, rather than users log in to the database, using
    database privileges?
    And from there have a hidden field in my insert and update
    pages that's set to the current user, and that value can then be
    inserted in the table?
    Any help or pointers with this greatly appreciated.
    Cheers.

    Thanks David. That sounds about right - the last app I did
    was an online photo library, and used the Log In stuff for that.
    With this one, we want to track changes, as we'll follow the
    progress of the developments from early info right through to
    completion - hence last updated, and last updated by fields.
    So I figured it should be do-able as an extension of the log
    in stuff, ie pass the stored current user somewhere.
    Regarding security - this is just a local app running on an
    internal server, rather than out there in the wild.
    To test it out, I've added a 'LastUpdatedBy' field to my
    other app, and added in a hidden field in my update page :
    <input name="LastUpdatedBy" type="hidden"
    id="LastUpdatedBy" value="$_SESSION['MM_Username']">
    I have the code that does the inserting :
    if ((isset($_POST["MM_update"])) &&
    ($_POST["MM_update"] == "form1")) {
    $updateSQL = sprintf("UPDATE Photos SET Link_ID=%s,
    Title=%s, Rights=%s, Rights_Details=%s, Credit=%s, Width=%s,
    Height=%s, Year=%s, Supplier=%s, Photo_File=%s, Orientation=%s,
    Admin=%s, Region=%s, Country=%s, Easting=%s, Northing=%s,
    LastUpdatedBy=%s WHERE Photo_ID=%s",
    GetSQLValueString($_POST['Link_ID'], "text"),
    GetSQLValueString($_POST['Title'], "text"),
    GetSQLValueString($_POST['Rights'], "text"),
    GetSQLValueString($_POST['Rights_Details'], "text"),
    GetSQLValueString($_POST['Credit'], "text"),
    GetSQLValueString($_POST['Width'], "text"),
    GetSQLValueString($_POST['Height'], "text"),
    GetSQLValueString($_POST['Year'], "text"),
    GetSQLValueString($_POST['Supplier'], "text"),
    GetSQLValueString($_POST['Photo_File'], "text"),
    GetSQLValueString($_POST['Orientation'], "text"),
    GetSQLValueString($_POST['Admin'], "text"),
    GetSQLValueString($_POST['Region'], "text"),
    GetSQLValueString($_POST['Country'], "text"),
    GetSQLValueString($_POST['Easting'], "text"),
    GetSQLValueString($_POST['Northing'], "text"),
    GetSQLValueString($_POST['textfield'], "int"),
    GetSQLValueString($_POST['LastUpdatedBy'], "text"));
    The bits in bold I've added for the LastUpdatedBy - but no
    joy - that's entering $_SESSION['MM_username'] into the table.
    What should the syntax be?

  • How to update the table when change list item in classic report

    hi ,
    i worked with apex 4.2 and i create normal classic report with one select list(named loved)Column ,now i want to update table when user change the list with new value ,i can't create dynamic action to do this,i create check box with primary key and loop for check item to update the table but i can't get the value of list item. and for more speed the user want to do this when change the list value.
    my question
    1- how to do this by javascript and get the value from list item and update the table with new value
    2- is i must use API to create list item so i can get the value of item in report or what.
    Thanks
    Ahmed

    I coded the following to give you direction:
    1. In the "Element Attributes" section of the DEPTNO column, I call a javascript function as:
    onchange = "javascript:updateTable(this);"2. I wrote a simple javascript function that shows an alert when the user changes the select list as:
    <script language="JavaScript" type="text/javascript">
    function updateTable(pThis)
        var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
        alert('Row# - '+ vRow + ' has the value - ' + pThis.value);
    </script>Now, you can call a AJAX on-demand process inside the javascript function to update the database value.

  • Auto update of time when changing time zones - PLEASE help.

    I travel for a living and I can't figure out how to get this 8310 to auto update the time when I fly from one time zone to another. Can anyone help me with this? Thank you so much in advance!

    I'm sorry to inform you that the blackberry does not have a feature like this yet. You can read this FAQ and it will give you some tips though.
    Why doesn't my time update correctly when I change Time Zones? - BlackBerryFAQ.com
    You would need to set that manually and enter the meeting times in accordingly.
    Sorry!

  • Approval Procedure to be sent when changes made in Purchase Order

    Hi Everyone,
    Can anyone help me with query for approval terms as follows:
    I want an approval to be triggered when the changes are made in Purchase Order & Updated. Not when new PO is created but at the time of when once the PO is created & then its edited by purchase employee and again gets updated then approval should be triggered to Accounting Department.
    Regards,
    Jai

    Hi,
    You have to develope an own ABAP report for this, based on the change tables CDHDR and CDPOS
    CDHDR - Header Change
    CDPOS - Item Change
    EREV - Version Change
    Check the link
    Purchase order change log
    Regards
    KK
    Edited by: Kishore Kumar Galla on Apr 5, 2010 1:16 PM

  • HT1386 devices not updating after sync and changes made in itunes not happening?

    Hi, I think my ITunes is corrupt and may need to be reinstalled? Changes made on the Mac in Itunes to playlist do not sync to either our 5 or 4S. other issues in Itunes I've noticed is that adding songs to playlists only works if I drag them...using the drop-down menu and 'add to' doesn't make the change occur.  Any suggestions?

    How is your iPod configured to sync with your iTunes library?  Automatically or manually?  In other words, what options do you have enabled from under the iPod's Music and Summary tabs?
    Syncing music to iPod or iPhone
    B-rock

  • Avoid start/stop tomcat when changes made in servlet

    How can I make changes made in servlet available without redeploying the application to tomcat.
    I am using tomcat 4.xx and running a web application under it, and I do not want to stop/start tomcat everytime I make changes in servlets and compile them....any ideas I remember there is solution,,but dont remember the solution itself..:)

    Look for defaultcontext tag in your server.xml in conf directory. set "reloadable" attribute if this tag to true...
    <DefaultContext reloadable="true"/>

  • Error in Adobe form based in a xml interface when changing data element

    The adobe form is called from a web dynpro.
    The adobe form contain a page and subforms (positioned y flowered).
    The form worked out perfectally.
    Then edited a descriptive text in a data element, from se11.  The form continues worked out correctelly.
    Then modify a fixed text from the form.  The form is activated.
    Since this modification, the form stopped to work out, informing the following message:
    "WebDynpro Exception: The ADS call has failed. You can find information about the cause in the error.pdf on the application server".
    I have updated the nodes of the web dynpro, the xml interface of the form, is all activated and this is still not working.
    Someone could help me? Does anyone know what it could be happened?
    Is there a way to re-generate the form?
    Thanks you very much.
    Regards,

    The data element is char 4.  I have only changed descriptive texts.
    I have take take all the objects to the previous version (data element, wd view, interface xml, adobe form), and the form is still not working.
    Do you have another posible solution for this?
    Thanks you for your answer.
    Kind regards,

  • How to update old POs when changing a supplier name?

    Hi,
    Can anyone advise on how to update supplier details on old POs when we update a supplier name?
    Thanks.

    Hi,
    You dont want to do any updation in Old PO even its in Approved and Closed status.
    System will automatically update the name in All PO when you update the supplier name in Suppliers form.
    Thank you
    Regards
    M.R.Sivasooriyan

  • Table update visible only when changing table selection

    I'm running java 1.6.0_07 on Linux and I'm experiencing a strange problem: I've got a table model that extends AbstractTableModel and when I selectes a row and then change such row data (thru the setData() and fireTableDataChanged() methods) I don't see the row update. If I reclick on the row or select another row in the table, the table refreshes and I can see the row updated. Is it a problem of the Java version or what? Should I change my code and force a table update in any way? Any suggestion?
    Thanks,
    Luca

    I've got a table model that extends AbstractTableModel Why? Whats wrong with the DefaultTableModel?
    Is it a problem of the Java version or what?So you've written custom code and it doesn't work so the problem must be with the Java version?
    Any suggestion?Use the DefaultTableModel.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • How can I force pages to update images to reflect changes made in external editor?

    I have added a number of (psd if that's relevant) images to a Pages '09 document (drag & drop from Finder) which have since been updated in an external editor.  Pages is not reflecting these changes dynamically, even on closing and re-opening the document.
    Is there a simple way to force this to occur, or am I forced to re-import the images and hence have to re-size and re-position them accordingly?
    -M

    Mike,
    This won't happen automatically in Pages. You can save some of the work by setting your current versions of embedded images as Media Placeholders. Then when you drag new copies into those places the sizes and perhaps other features will be retained.
    Format > Advanced > Define as Media Placeholder.
    Jerry

  • Changes made in book file are not reflected in RH when book is updated

    I'm using RH7 in TCS1.  (I know, I know, everybody else is on RH8 in TCS2). I've added a book file by reference to my project. Then I made a few changes to titles in my FM book, then updated my project, but none of the changes have been made in RH.
    Any ideas?

    You're not the only one using TCS1. I, too, must endure Adobe's initial FM-RH Integration software offering with its limited patches and multiple workarounds (I don't sound bitter, do I?).
    Do you have the latest patches?
    When you say you modified titles in your FM book, did you modify the document titles from the book file, thereby changing the file names? Or did you change heading styles within a FM document/chapter?
    If you changed the file name in any way, verify in the RH Project Manager that all links to the referenced FM files are not broken. If any file links are broken, you can resolve them in the RH Project Manager.
    Changing a heading name within a FM document should not cause you this grief, as long as the file links between FM and RH remain intact.
    As I don't know your level of experience, I'll make an suggestion to someone new to FM-RH integration (although, since you're using TCS1, I presume you are an experienced user). When updating the RH project, are you selecting Force Update or Update All. Force Update applies changes made in FM to your RH project. Update All only applies changes made in RH.
    Also, RH has a feature that allows you to select specific topics to ignore when running a Force Update (i.e. changes in FM won't be applied to the selected topics). Make sure no topics are selected for this purpose.
    If all else fails (and I don't recommend this unless you tried every other possibility), delete and re-import the book. There's another thread that helps you through this process without you having to manually reapply your settings.
    Good luck!

  • Changes made in Book Module do not "stick" when the book has been duplicated

    Lr 5.2 stand-alone version (not CC) – Win 7 64-bit
    I had made a duplicate of the book (right-click the book Collection and select <Duplicate>). Then I made changes to the original book – changed the font for captions and for body; changed the wording of the body text; changed the padding for images. At some point in the process these changes did not '”stick” anymore. The changes were visible as long as I worked in the Book Module. But the changes were gone and the book reverted to the previous state as soon as I went to the Library and back to the Book Module. Same thing happened when I closed Lr and re-opened it.
    Replacing the Preference File did not change this behavior. But when I deleted the duplicate book the behavior of Lr went back to “normal”, i.e. the changes now “stick”.
    In my opinion there must be a bug that prevents that changes “stick” when after a Duplicate of a book has been created.

    You're not the only one using TCS1. I, too, must endure Adobe's initial FM-RH Integration software offering with its limited patches and multiple workarounds (I don't sound bitter, do I?).
    Do you have the latest patches?
    When you say you modified titles in your FM book, did you modify the document titles from the book file, thereby changing the file names? Or did you change heading styles within a FM document/chapter?
    If you changed the file name in any way, verify in the RH Project Manager that all links to the referenced FM files are not broken. If any file links are broken, you can resolve them in the RH Project Manager.
    Changing a heading name within a FM document should not cause you this grief, as long as the file links between FM and RH remain intact.
    As I don't know your level of experience, I'll make an suggestion to someone new to FM-RH integration (although, since you're using TCS1, I presume you are an experienced user). When updating the RH project, are you selecting Force Update or Update All. Force Update applies changes made in FM to your RH project. Update All only applies changes made in RH.
    Also, RH has a feature that allows you to select specific topics to ignore when running a Force Update (i.e. changes in FM won't be applied to the selected topics). Make sure no topics are selected for this purpose.
    If all else fails (and I don't recommend this unless you tried every other possibility), delete and re-import the book. There's another thread that helps you through this process without you having to manually reapply your settings.
    Good luck!

  • How to insert or update multiple values into a records of diff fields

    Hai All
    I have to insert or update or multiple values into a single records of diff fields from one to another table.
    Table1 has 3 fields
    Barcode bardate bartime
    0011 01-02-10 0815
    0022 01-02-10 0820
    0011 01-02-10 1130
    0022 01-02-10 1145
    0011 01-02-10 1230
    0022 01-02-10 1235
    0011 01-02-10 1645
    0022 01-02-10 1650
    these are the times that comes in at 0815 and goes break at 1130 and comes in at 1230 and goes home at 1645
    from these table i have to insert into another table called table2
    and the fields are barcode, date,timein intrin,introut,tiomout
    And the output want to like this
    barcode timein intrin introut timeout date
    0011 0815 1130 1230 1645 01-02-10
    0022 0820 1145 1235 1650 01-02-10
    If any give some good answer it will be help full..
    Thanks & Regards
    Srikkanth.M

    SQL> with table1 as (
      2  select '0011' Barcode,'01-02-10' bardate,'0815' bartime from dual union
      3  select '0022','01-02-10','0820' from dual union
      4  select '0011','01-02-10','1130' from dual union
      5  select '0022','01-02-10','1145' from dual union
      6  select '0011','01-02-10','1230' from dual union
      7  select '0022','01-02-10','1235' from dual union
      8  select '0011','01-02-10','1645' from dual union
      9  select '0022','01-02-10','1650' from dual
    10  )
    11  select barcode, bardate,
    12         max(decode(rn,1,bartime,null)) timein,
    13         max(decode(rn,2,bartime,null)) intrin,
    14         max(decode(rn,3,bartime,null)) introut,
    15         max(decode(rn,4,bartime,null)) timeout from (
    16                          select barcode, bardate, bartime,
    17                                 row_number() over (partition by barcode, bardate
    18                                                    order by bartime) rn
    19                            from table1)
    20  group by barcode, bardate;
    BARC BARDATE  TIME INTR INTR TIME
    0011 01-02-10 0815 1130 1230 1645
    0022 01-02-10 0820 1145 1235 1650Max
    http://oracleitalia.wordpress.com

Maybe you are looking for

  • Cannot Filled in Form to Excel

    I am running Adobe X Standard. I am trying to export a PDF form with fillable fields to excel.   I have tired serveral methods shown on the site. Every time I get the form saved, the but data that was entered into the form is not exported to excel (o

  • How to display Calender Please help

    Hello i am new to Java Programming not much experienced. Actually i wanna display a calender on screen. The basic idea is to find what day of the week the first of the month is and print blank columns for the days of the week before the month begins.

  • Another Netbeans Victim

    I'm running netbeans 5 with sdk 1.5 and am having what seems like a common problem running java outside of nb. Of course the code runs fine within nb. The code has a package, my.mosclient.pkg. Within the folder /my/mosclient/pkg are the class files,

  • Can't find the Expand-function

    Hi! Can anyone help me. I'm using the 16.0.0 version of Illustrator CS6 and i'm really new to it. Under the Object menu, I cannot find any Expand-function that I've been told should be found there. Anyone experiencing the same problem? Is this option

  • MDT 2013 capture error

    Litetouch.wsf runs but after the sysprep reboot get error that can't connect to deploymentshare$ - but I have ip address and can map to share.  Hope someone has seen this error before.