How to get the new Primary Key after the Automatic Row Processing (DML)

Hi,
I have a nice master detail form.
I want, immediately after submitting the page when creating a new record in the master table, that the user may input the associated table (the detail table). For that I have created a branch that goes back to the very same page after creating the record (ie submitting the page with the button Create). In the Action of the branch, i have put P30_FICHE_ID (the item containing the primary key of the master table) with its value : &P30_FICHE_ID.
Unfortunately I see that the item is not populated with the very new primary key. it seems normal becaus after submitting the page the tiem is not populated. This is my question : how to retrieve the newly created primary into the item P30_FICHE_ID in order to begin immediately to add rows to the detail table ?
Hope I'm clear. My english not perfect.
Thank you for your kind help !
Christian
Edited by: Christian from France on Oct 16, 2009 6:36 AM

Christian,
After creating Master-detail form, goto your Detail page. In this page you can see one conditonal brach which will point to 'Master' page.
Edit this branch and here you can see this branch fires when request is in 'SAVE,DELETE,CREATE' (in Expression1). Now change the value in Expression1 to 'SAVE,DELETE'. This will do the needful :-)
Cheers
Hari
Edited by: Hari_639 on Oct 16, 2009 8:02 PM

Similar Messages

  • How to copy a record with an Automatic Row Processing (DML) ?

    Hi,
    I want to duplicate (to copy) a record.
    I have a form, with an Automatic Row Processing (DML), looking for the PK stored into an item named P26_ID and populating the values into the corresponding items of the form.
    I have an Automatic Row Processing (DML) which permit to update, delete and modify the row.
    So far so good.
    I thought it would be good if I calculate a new value for the PK and stored it into the P26_ID.
    Then I thought the Automatic Row Processing (DML) would see that it is a new value for the PK and would "decide" insert a new record.
    But it does not work like that. I thought it was because the item P26_ID is database column type; so I switched to another item named P26_ID_NEW and put this new pk into this item. I then created another Automatic Row Processing (DML), triggered by this button, and which will look into this new item. It does not work either.
    Where do i go wrong ?
    Thank you for your kind help !
    Christian

    Christian:
    Assuming that the 'Duplicate' function is available only when the page is in 'Edit' mode, ie. a record has already been loaded into the form you can do the following to duplicate this record
    1) Define a button named 'Duplicate'
    2) Set the target of this button to be 'URL'
    3) Set the URL for this button to be
    javascript:duplicate();
    4) Add this bit of JS into the page HTML header<script>
    function duplicate() {
    $s('<name_of_PK_page_item>','');
    doSubmit('CREATE');
    </script>Varad

  • Hello, I have transferred my Acrobat XI Pro from old MAC to the new one. After the transfer can not open any PDF file. Any idea how to solve this?

    Hello, I have transferred my Acrobat XI Pro from old MAC to the new one. After the transfer can not open any PDF file. Any idea how to solve this?

    Hey ilyaz20360341,
    Could you please specify how exactly did you transfer Acrobat from one MAC to other.
    You might need to deactivate the software from your old machine and then activate it on the new one with the same serial number (for Acrobat license) or Adobe credentials (for Acrobat subscription).
    If you have done the same way, then let me know if you are able to open Acrobat itself.
    Do you get any specific error message while opening a PDF?
    Hope to get your response.
    Regards,
    Anubha

  • Automatic Row Processing (DML) process is not updating the record

    Hi all,
    I have an application which was working fine last week and tested and backuped to new application. This Monday, one of the form in that application is not updating the data all of a sudden. I debug that by having page 0 variable and assign the value from the column variable to page 0 variable. Whatever value I changed to the column variable was getting updated to page 0 variable. But it is not updated in the database. So, I changed the success message of the "Automatic Row Processing (DML) process" and I can see the success message on the page, but the column value does not get updated. But when I go back and checked my backup application, that page is working fine. For now, I copy that from the backup application, but I would like to know why this is happening?
    Thanks
    SHY

    Hi Scott,
    Thank you very much for your response. Because of the database complexity, I can't create/import the application on the apex.oracle.com. I am just wondering why this is happening. One of my coworker said same thing happened to her in one of her project and it gets resolved once she restart the server. I am not able to restart the server to check and see if this resolved as the application is on the client server. Do we need to clean up any log file? Thanks.
    SHY

  • Automatic Row Processing (DML) - Return Key Into Item

    Hello,
    This question is on Apex 4.2:
    I'm Displaying the [UNIKEY] column value after the record is inserted into the table using :
    page process > process row table_name > Source: Automatic Row Processing (DML) > Return Key Into Item > "Item Name"
    This works fine while inserting records, my question is why this does not respond on update / delete ?
    ϯ LT

    LT
    Check your branches.
    What might be happening is that on insert and update an other branch is followed.
    Where the branch of the insert either isn't clearing the cache of the page or is setting the item with it's own value.
    The branch on the update on the other hand is clearing the cache of the page and not setting the item.
    With a delete there is a clear cache process generate by the wizard. Check if this process is only running on the delete and not on the update.
    From memory the process is called something with reset.
    If the above doesn't help try to replicate the problem on apex.oracle.com and give access with a guest developer account so we can have a look.
    Nicolette

  • HT201109 My shape mask is starting off screen (too far for me even to grab) and I was wondering if anyone knows how to get it back. Happened after the update to 10.1.1

    After updating to FCPX 10.1.1 my shape mask starts waaaay off screen. Too far for me even to grab the center fully zoomed out. My friends mac had the same problem after the update. Anyone have an idea on what to do? Thanks

    Make an appointment at the genius bar of your local Qpple Store. An out of warranty replacement will cost you $269.

  • How do you change the value of the primary key in the CMP?

    Hi,
    The cmp that I built has the phone as the Prikey field.
    The bean has the get/set methods. The servlet invokes the cmp
    to change the phone number. How could I do that?
    The setXXX for the priKey can not be called outside of the ejbCreate() so
    how would I change the prikey value of a particular row of the table. Do I have
    to remove the bean then create the new bean with the new priKey value?
    Please help,
    Thanks

    Thanks Mona
    Tom.
    Mona Ramlawi <[email protected]> wrote:
    Hi TOM,
    The primary key is the unique identifier of an Entity Bean.
    To change it, you have to remove the bean instance = database delete
    then you have to create a new one with the new primary-key value =
    database insert.
    Hard luck tom, maybe you should consider changing your primary key. You
    can easily change it to an AutoNum
    Tom wrote:
    Hi,
    The cmp that I built has the phone as the Prikey field.
    The bean has the get/set methods. The servlet invokes the cmp
    to change the phone number. How could I do that?
    The setXXX for the priKey can not be called outside of the ejbCreate()so
    how would I change the prikey value of a particular row of the table.Do I have
    to remove the bean then create the new bean with the new priKey value?
    Please help,
    Thanks

  • DBMS_CDC find only the columns that are changed along with the primary key in the table

    Hello,
    We are having a requirement to find the change data in the production environment.
    We are planning to use the DBMS_CDC utility.
    But for  example in the create change table 1 picked emp_id,ename, address, salary,dob.
    I have a sample data of
    empid
    ename
    address
    salary
    DOB
    1
    test1
    24 test street
    2000
    20-Jan-98
    2
    test2
    25 test street
    2500
    15-Aug-97
    if ename for empid 1 is changed to test1_test3 from test1.
    My CDC is capturing  the values in the old and new values in the 5 columns.
    But i need to get only the empid (primary key of the source table) and the ename column as only that's been updated not the rest of the 3 columns.
    Can i accomplish this.
    Please advice.

    Hello,
    Thanks for the information.
    but if i change the change table  then i will miss the other columns right?
    I want to get the columns( empid and ename) only if ename is changed. i.e when ever any column in emp table changes i need to get all the columns where the data is changed along with the primary key columns empid.
    Is there any way i can tweak the parameters so that i can achieve this or is there any other way using the cdc i can get this data.
    Thanks

  • Adding a new field to an Automatic Row Processing form

    Hi,
    I have a form that I built through the form Wizard which has an automatic row processing function. It is working very well, except that any new fields I add to the form are not being updated in the database when the row is processed. I have set up the field exactly the same as other fields which are working and were originaly created by the wizard. I have deleted and recreated the row processing Page Process, but nothing seems to make it work. Have I missed anything? I don't want to recreate my page from scratch each time I want to add a new field.
    Thanks,
    Steve

    if you're positive that your new fields/columns update correctly when you use Text Field items and not when you use Select List ones, i'd check to see what your select lists are returning. a good way to see exactly what your form got from your select list items is to check the session state for your select list items right after you submit your page (clicking the "Session" link in your developer toolbar in your runtime environment is a good way to get to this info). also, even though you said your added Text Fields work and your Select Lists don't, i'd still check the "Source Type" and "Source value or expression" fields of your select list items to make sure they're set correctly. for form items to work with your table in htmldb auto-dml processing, you need to set the "Source Type" to "Database Column" and the "Source value or expression" to the case-sensitive name of your db column.
    hope this helps,
    raj

  • I have a new mac and want my old photoshop on it , how get i the old serial key for the new ?

    I have a new mac and want my old photoshop on it , how get i the old serial key for the new ? My old mac is deleted ...

    We would need to know the version of Mac OS you are running and the version of Photoshop you want to install.
    The serial number is the tricky part. If you have no idea where you placed it and did not register your product with Adobe, your chances are very low of retrieving it.

  • My mac recently got stolen, after getting a new one i had to reinstall logic studio, but after moving house i have lost the serial number, does anyone know how to get a new one?

    my mac recently got stolen, after getting a new one i had to reinstall logic studio, but after moving house i have lost the serial number, does anyone know how to get a new one?

    Here:
    http://support.apple.com/kb/HT1861

  • In FF 7.0.1, the New Tab button on the Tab Strip disappeared after clicking the Tab Group icon and trying to return, so I'm looking for advice on how to get the New Tab to reappear on the Tab Strip.

    In Windows Vista, FF 7.0.1, I selected the Tab Group button to try it out. However, when I selected the Tab Group button again to close that view, the New Tab button in the Tab Strip no longer appears. I'm requesting help to restore the New Tab button (has the "+" sign on it) on the Tab Strip just to the right of the currently open tabs.

    You can find the New Tab button showing as a '+' on the Tab bar.
    You can open the Customize window and drag the New Tab button that shows as a plus sign (+) from the Tab bar on another toolbar and it will become a regular toolbar button like the New Tab button that you have in Firefox 3 versions.<br />
    Open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout"
    If you can't find the New Tab button then click the "Restore Default Set" button in the Customize window.
    If you want the New Tab button at the far right end of the Tab bar then place a flexible space to the left of it.

  • How can labview update the string control (text-edit box) after we have pressed the carriage return key on the keyboard during text-editing within that box?

    Dear readers,
    I have been trying to work out how to get labview to detect the event when a 'string' control has been modified, where the user has finished editing the string either by 1) pressing the enter key on the keyboard, or by 2) taking the focus away from the string control again. For example.. if I use the mouse to click on the string control and then I type 1234 into the box, I would like to have a routine that does something once the user hits the Enter key of the keyboard, or when the user takes the focus away from the string control again by clicking on something else. I would like the routine to respond even when the user didn't change anything in the text box (such as when we mouse-click on the edit box to go into edit mode, and then mouse-click on something else to remove the focus with no changes to the contents in edit-box).
    The purpose of my routine is to have a edit-box for a user to change for example the centre-frequency of a vector network analyser, so that the centre-frequency of the network analyser can change once the user finishes entering a new value in the text-edit box by hitting Enter key after the number is keyed in. Even if the user has clicked on the edit box, but changes their mind by mouse-clicking on something else to remove focus from the edit box, I would still like labview to detect the event when the control loses focus, so that the centre frequency can be updated anyway (to the same value that was already in the edit box).
    So far, I've tried set the string control option to 'limit to single line', so that I can try to scan for a carriage return .. '\n' ... pattern in the string. Unfortunately this doesn't work because labview doesn't seem to attach the '\n' to the end of that single line.
    Could someone please suggest ways to set a flag when a user hits Enter during text-edit mode of a string control, or when focus has been removed from the string control?
    While I've only described my problem for controlling a single control parameter on the gpib device, I'd like to make this feature work so that I can do the same kind of thing with other control parameters as well.
    Thanks so much in advance.
    Kenny

    Hi Kenny,
    instead of using the event structure, you can directly achieve to what you want by the KeyFocus property of the string control.
    - Enable Limit to single line option
    - Create the property KeyFocus in read mode and connect an indicator
    Each time you click on the string to modify it KeyFocus is True; when you click away or hit Enter KeyFocus is False.
    You can toggle your settings when KeyFocus changes from True to False.
    Alberto

  • How do I convert the old sync key (12 characters, no dashes) to the new sync key (31 characters, 5 dashes)?

    My sync key used to be 12 characters, no dashes (xxxxxxxxxxxx). After uninstalling and reinstalling FF 3.6.13, Sync 1.6.1 refuses my 12 character sync key.
    I discovered, that sync keys for all users have been switched to 31 characters including 5 dashes (x-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx). How do I get the new sync key?
    I have no PCs connected to Firefox Sync anymore but Firefox Home and 360 Browser on my iPhone sync successfully. Unfortunately on the iPhone I cannot display the currently used sync key. Is there a way to convert the old sync key to the new one?
    I need the bookmarks saved in my Sync account.
    Thanks for your help!

    I had the exact same symptoms you did. Here's my solution:
    I installed an older version of firefox sync (1.4.something, I think) and then added my account using my old short firefox sync key. When trying to sync, the outdated addon said that in order to perform the sync, it needed to be updated. After updating, I was still signed in, but now had the added feature of seeing my new long firefox sync key which was compatible with FF 4b, etc. Everything is working smoothly now and my computer is syncing correctly.

  • Help me to return the primary key after insert the row

    Hi
    I am using JDBC, with oracle database. i have welformed normalization tables .i am inserting parent table with dynamic sequence number as primary key .after inserting i need inserted row primary key .how to get the inserted row primary key with out using select statement
    please help me
    Thanks in advance
    Edited by: 849614 on Apr 4, 2011 5:41 AM
    Edited by: 849614 on Apr 4, 2011 5:54 AM

    Hello
    If I undestand you, I think you should do this:
    Connection conexion = dataSource.getConnection();
    int idCenter=-1;
    String query = "Begin Insert into CENTER (NAME_CENTER) values (?) returning ID_CENTER into ?; end";
    callableStatement = conexion.prepareCall(query.toString());     
         callableStatement.setString(1, "Center name");               
         callableStatement.registerOutParameter(2, java.sql.Types.INTEGER);
              callableStatement.executeUpdate();
              idCenter=callableStatement.getInt(2);
    This way, you have in idCenter the primary key of the line that has just been inserted.
    Edited by: cris on 05-abr-2011 5:28

Maybe you are looking for

  • Using CSS to center a website [subject edited by moderator]

    I took advice on centring my website. In my Wrapper/Container Div I made left/right Auto, and selected relative. It worked fine.Then for some unknown reason it left justified, not it right justifies. Support says it is an CSS issue. Anybody help?

  • From where i can buy the latest Test Executive ???

    I am looking for the latest Testexecutive Toolkit for Labview (Example: 5.1.1)for free of Cost or for Buy. What ever is possible. Thank for Tips from where i can pick this tool

  • Question in spring-web.xml

    My application's name is Example. I want all webpages from /Example/*.htm to be directed to a servlet. And all pages from /Example/a/code to be directed to another servlet. "Code" does not end with .htm. I tried the below mapping in the web.xml. It d

  • Form document multiple times editing

    Hi there, I hope the title fits my situation. I was asked if I could develop a multi page pdf with a form page in it. The pdf will be send as emailing where people can fill in (parts of) the form, save it and return it. So far nothing exiting but the

  • Where are my libraries and projects ? update of Maverick in cause ??...

    Tonight all I have is problems with Final Cut Pro X... I read many similar things in the last few hours, and start to wonder if this could be the last OS X update in cause ??... Everything was fine 3 days ago... - As per my other post (few minutes ag