How to copy a record with a treatment of automatic line (DML)?

Hello

I want to duplicate (copy) a record.

I have a form with an automatic line processing (DML), look for the PK stored in an element named P26_ID and filling of the values in the corresponding elements of the form.

I have an automatic line processing (DML) that allow to update, delete and change the line.

So far so good.

I thought it would be good if I calculate a new value for the PK and stored in the P26_ID.

Then I thought that the automatic treatment of the line (DML) would see that this 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 P26_ID element is of type database column; so I went to another element named P26_ID_NEW and put this new pk in this article. I then created another automatic processing line (DML), triggered by this button, and who will look at this new element. It doesn't work any more.

Where can I go wrong?

Thank you very much for your 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 in the form, you can do the following to duplicate this record

(1) define a button named "duplicate".
(2) set the goal for this button to be "URL".
(3) set the URL for this button to be
JavaScript:Duplicate();
(4) add this piece of JS in the header of HTML page


CITY

Tags: Database

Similar Questions

  • APEX 5 treatment of automatic line (DML) update fails

    Hi all

    I need help because it seems I'm missing something to get this working:

    -J' have a page with a form that contains editable elements and some hidden items.

    -J' have a button on the same page, open a modal dialog box.

    -the modal dialog box contains a tabular presentation, including a process of "Dialogue."

    -button of the modal dialog box contains a 'closed dialog box"

    -There are 2 real actions:

    -L' code is running plsql for updating a hidden field called P210_DATE_MODIFIED with sysdate.

    -Send the Page using a query called SAVE_CARS.

    This kind of debugging things says:

    ... Session state: saved point new value "P210_DATE_MODIFIED" = "" 27.05.2015 14:55:44 ""

    and later:

    ... 'Row of CAMPAIGN_DATA process' process - Type: NATIVE_FORM_PROCESS

    ...... Jump as integrated type process condition evaluates to FALSE.

    (there are no conditions on this process.)

    The data is not updated.

    What does ""integrated process of type condition "means? "

    How can I know why there is no update running? I thought that this setting P210_DATE_MODIFIED a new value is enough to trigger the update.

    EDIT: Supported Operation has the value "Update" to fetch him the automatic line.

    Thank you and best regards,

    Gerald

    Hi Gerald,

    What is your (name of the button) submit button? It must be one of the following names for the type of build-in the condition evaluates to true.

    Update validates the values of request: SAVE, APPLY the CHANGES, UPDATE, UPDATE, MODIFY, APPLY, APPLY LINE of CHANGES %, GET_NEXT %, GET_PREV %

    Values of request for valid insertion: INSERT, CREATE, CREATE_AGAIN, CREATEAGAIN

    Values valid request Delete: DELETE, DELETE, DELETE the LINE, DROP

    Concerning

    Patrick

  • How to copy a directory with all permissions and intact junctions?

    Is it possible to copy a directory with junctions in there and have it copy as junctions, not the contents of the junction?

    I'll try to make a long story short, but I just spent a few hours cleaning after robocopy and junctions hidden Windows 7.  I have Windows 7 installed on a spare HD so I can play with it, adjust, test things and figure out how I want to set up before taking the plunge and the replacement of XP full time.

    Just as an experiment, I wanted to create a new user account, but put its directory of the user on another drive and use a symbolic link to point to her to C:\Users.  I created a new user account called Test, connected so that its directory was created and then disconnected.

    I discovered that the moving or copying the files, either in Explorer or a command prompt does not move or copy the directory junctions.  I then tried Robocopy because it contains options to copy all security, owner, and audit information.  There is also an option "copy symbolic links from the target."

    The exact command, I used was:
    Robocopy C:\Users\Test/e/COPYALL /R:0 /SL D:\Users

    First of all, there will be no even to copy permissions, the few records he did copy inherited permissions from the parent directory to the destination, and he added a strange permission that I'll get to in a minute.  It was not long until he stopped with the error.  I don't remember the error because I restarted several times since then, and I don't care to try again just to get the exact error message in order to post here.

    What's happened, it's that there is a directory hidden in C:\Users\Test\AppData\Local junction.  Junctioin name is "Application Data" and it links to C:\Users\Test\AppData\Local (the same directory that is).  This caused his keep copy the folder "Application Data" on itself until the max file name length has been exceded and he stopped.

    When I tried to delete the directory, I kept getting an error that it could not delete the directory because it was not empty.  I had total control over the directory, but I still have the error and the directory (from what I could see) was empty.

    Here's the strange authorization occurs.  For some reason, copies of the "Application Data" directory were defined on system / hidden and everyone had group ' the folder list / reading data "permission set to deny, that's why I couldn't see, even in the administrator command prompt.

    Once I got the permissions sorted, I could not delete the directory because the name was too long.  Windows told me to rename so it was more runs, then try again.  I finally managed to delete by renaming the directories in a few 'Application Data' to 'a' and then by moving the part of it to another directory.

    Not for the faint of heart, but it's doable if you combine two tools in a Powershell script

    I think that the simplest approach would be to use the http://pscx.codeplex.com/ Powershell Community Extensions to find source of junctions and create new ones to target. Then use SetACL http://setacl.sf.net/ to save the ACL from the source and then restore them to the newly created junction.

    Should not be too many lines of code :-)

  • the use of collections, copy a record with children/grandchildren

    I understand that loops FOR cursor are not as good as the use of collections, and now I need to convert some of my code accordingly.
    I've been doing a bit of good to read the documentation and have not yet encountered examples of the situation that is so prolific in our system; namely, someone wants to make a copy of a record, with its outbuildings down a few levels.

    Here's what looks like a typical of this instance (except that everything is in packages). Take the 3 tables: grandparent_table, parent_table and child_table, with primary keys being gp_id, p_id and c_id respectively (and related as one might guess these names):

    create or replace procedure p_copy_record (p_gp_id in grandparent_table.gp_id%type)
    is
    cursor c_parent
    is
    Select *.
    from parent_table
    where gp_id = p_gp_id;

    v_gp_id grandparent_table.gp_id%type;
    v_parent_id parent_table.p_id%type;
    Start
    Select grandparent_seq.nextval
    in v_gp_id
    Double;

    insert into grandparent_table
    Select v_gp_id,
    other_columns_here
    of grandparent_table
    where gp_id = p_gp_id;

    for r_parent loop c_parent
    Select parent_seq.nextval
    in v_parent_id
    Double;

    insert into parent_table)
    P_ID,
    gp_id,
    other_columns_again)
    Select v_parent_id,
    v_gp_id,
    r_parent.other_columns_again;

    insert into child_table)
    C_ID,
    P_ID,
    other_columns3)
    Select child_seq.nextval,
    v_parent_id,
    other_columns3
    of child_table c,.
    where parent_id = r_parent.parent_id;
    end loop;
    end;
    /

    I tried to change the code of this a few different ways, but running into errors. The main problem seems to be that the collections don't refer to an element, in order to make this join (where parent_id = r_parent.parent_id).

    How you would replace the slider - for loops here (using 10 gr 2)?
    Thank you

    To replace the sliders, you will need to fill a table with the same data. Then process these tables

    create or replace procedure p_copy_record (p_gp_id in grandparent_table.gp_id%type)
    is
    type gp_array is table of grandparent_table % roytype;
    type p_array is the table of the parent_table % rowtype;

    l_gp gp_array;
    l_p p_array;

    v_gp_id grandparent_table.gp_id%type;
    v_parent_id parent_table.p_id%type;
    Start
    -get the next gp id
    Select grandparent_seq.nextval
    in v_gp_id
    Double;
    -bulk collect the current record of the gp - you don't really need but for pleasure it's im
    Select * bulk collect into l_gp from grandparent_table where gp_id = p_gp_id;
    -creation of a grandparent registration
    insert into grandparent_table
    values v_gp_id,
    .name l_gp (1),
    .other_columns_here l_gp (1);

    -Now bulk collect the parent records
    Select * bulk collect into l_p Parent_table where gp_id = l_gp (1) .gp_id;

    FOR i IN 1.NVL(l_p.COUNT,0) LOOP
    -get the next parent id
    Select parent_seq.nextval in the double v_parent_id;
    -create the parent record
    insert into parent_table)
    P_ID,
    gp_id,
    other_columns_again)
    v_parent_id,
    v_gp_id,
    LP (i) .other_columns_again;

    -While we are here create the records for this parent child
    insert into child_table)
    C_ID,
    P_ID,
    other_columns3)
    Select child_seq.nextval,
    v_parent_id,
    other_columns3
    of child_table c,.
    where parent_id = lp (i) .parent_id;
    END LOOP;
    END;

    To be honest, I'm not sure that you will really see a great improvement since you already limit the scope until the recording of one of the grandparents. Let's say the grandparent has 10 children each with 10 children who is just 111 records. As long as your tables are indexed by the node Id it should be fast just like that.

  • How to copy a DVD with a DVD-R/W laptop?

    I have a laptop with a DVD-R/W. How to copy a DVD? I am puzzled, if I FIRST have to 'Save' DVD-content somewhere and then REMOVE the DVD and insert a blank DVD to burn. Please give directions to the not so computer expert. Thank you

    You must save a temporary copy of the disk on a hard disk of the computer.  Burning software more it will do it automatically for you.  As the same disk drive, select the source and the destination.

  • How to get the record with a tank of extra space

    Hi I have a value which have several entries with the same value but some record have more space, how to know which record


    Ex:


    'abc1234 '.

    'abc1234 '.

    'abc1234 '.


    I want to know 'abc1234' record


    in this table, I have more than 50 million records.

    Maybe this:

    SELECT s FROM T WHERE s LIKE '% '.

  • How long can I record with the soundrecorder?

    I need to record some interviews which will have more than one hour each. The easiest way for me would be to take my laptop and write it down. My question: if I use the normal soundrecorder, how long can I record? Is it possible to save over an hour? Thank you!

    I would expect that you could take an occasional break in such
    a long interview... to create several files might not be a bad
    idea... but I think it will continue to record until you use
    all your free space.

    The following article can offer a few ideas:

    Windows Vista sound recorder
    http://www.JakeLudington.com/windows_vista/20060524_windows_vista_sound_recorder.html

  • HOW TO SET UP RECORDING WITH ADOBE CS5 IN WINDOWS7

    Hi all. I used to record with hearing and then make my own MP3 W XP compulations.

    Now, I have 7 W and new Audition CS5 and of course, can not save. When I press the record button, message here is that appears:

    the sampling rate of the output devices and audio do not match. audio cannot be recorded unti it's fixed.

    Use the control panel operating system or device appropriate to adjust the frequency of sampling of input and output devices to use the same settings.

    Also, just in case where, what else do I need to do in Windows 7 to allow the recording of the hearing of Winamp or any other music source?

    I looked at my audio devices in the Control Panel, I have S/PDIF sound card integrated into the motherboard.

    Thank you

    I think that what you describe is normal operation of the console reading in Windows 7, except that it is only sometimes the faders move together, rather than always.

    I also think that Emmrecs is right. Go Win7 Panel and select the "Recording" tab, then right-click on an empty space on the tab. You should look for what is called "Stereo Mix" or "what you hear".

    If you see that a listed Microphone and no option to activate disconnected or disabled devices, you will need to go get a third-party tool.

    As I say, I use Total Recorder. It has been around for years and works the way you want with earlier versions of the hearing. There are other applications that use others.

    All your problems are with Windows 7, I'm afraid.

  • Apex 5.0.2 error when changing the table name in the treatment of automatic line of process (process row)

    Hello

    I need a little help...

    For some reason, I have to change the underlying table for a treatment of automatic process (process Row) line (form).

    Although such a change is possible in the designer of the page (under "settings") Apex does not recognize the new name of the table, but seem to rather use the name of the original table "old."

    Pretty strange (new/modified) (the new table columns) are (correctly) error message.

    For example, the 'old' is: TABLE_1 and TABLE_2 new.

    TABLE_2 has a new COLUMN_NEW column (and corresponding P1234_COLUMN_NEW page element exists)

    Then the error message says something like: not found COLUMN_NEW column in TABLE_1. Althougt I changed the table to be TABLE_2.

    Maybe it's a bug or I do something wrong about this?

    Thank you in advance!

    André

    OK, just to get some - you changed the name of the table twice:

    -Rendering of section--> Page1234: Pagename--> pre-rendering--> after the header--> process of--> line from TABLE_2

    -Treatment article--> treatment--> process--> process of line from TABLE_2

    I thought, that always seek you the line of TABLE_1

    Christian

  • Treatment of automatic line and Fetch. Session variables are null.

    Hi all

    One of the pages in my application has a form based on a table that is implemented automatic assistance (DML) line treatment. The automatic line extraction and automatic updating properly.

    I can see the variables/fields on the user interface and when I use the DEBUG option
    However, I don't see any of these values, when I see the option of variables 'session' (at the bottom of the page).

    The problem is that I intend to write another process that will use these variables, and I can't do it. All values appear as NULL values for all other processes.

    Please advice as to what causes this problem and any possible workaround. I am aware of the possibility of writing my own extraction and update of the process, but I wanted to know if there is a way to use these variables.

    Thank you
    Rajesh.

    Rajesh

    However, all page in Page 2 element values are currently zero.

    Once 'Submit you' page, you will see the values for page items in session state. Your custom process running after the ARP and before any process to reset the session state must see the defined session state values.

    CITY

  • See APEX SQL for the treatment of automatic line

    Hello

    I get an error like this when you try to update with the automatic processing of line:
    ORA-20505: DML error: p_rowid = 89, p_alt_rowid = network_user_mou_id, p_rowid2 =, p_alt_rowid2 is. ORA-06550: line 1, column 17: PL/SQL: ORA-00936: lack of expression ORA-06550: line 1, column 9: PL/SQL: statement ignored
    Is there a way to see the generated SQL code so that I could determine what the problem is?

    Thank you
    Rick

    Rick:

    A way to see the SQL code executed would be to allow "sql_trace" before the process of automatic processing of line. Create a process that fires off the coast before before that the process of automatic line with the following line of code

    alter session set sql_trace=true;
    

    and a process that fires off the coast after the process of automatic line to disable tracing

    alter session set sql_trace=false;
    

    Trace files will occur in the "bdump" or "udump" Directory depending on whether you are using the EPG or OSH.

    As for the error itself, I wonder if it is due to a column that you recently added to the form.

    CITY

  • How to copy a record in table with the database Access using VB

    I have a file DBTEST.accdb and table 4 in
    With the help of VS 2013 Express

    In my project VS.

    Form1 have two DataGridView, store and display data of table1 and table2 in DBTEST.accdb
    The column is the same in table1 and table2
    The column is the value yes/no (check box) in DBTEST.accdb

    Now, I would like to determine the weather, the check box is selected.
    Copy the entire line selected in table2 from table1, and then delete from table1.
    And I want that the task is performed by a single button.

    Thank you very much.

    You can visit Microsoft Support Page, click here

  • How to use my recorder with my iphone

    I want to use my iphone "usb connection to record a phone call. Is this possible? How can I make it work.

    Hello

    I suggest you contact with the support of the iPhone using this link.

    iPhone Support: http://www.apple.com/support/iphone/

    Hope this information is useful.

  • How to retrieve unique records with multiple columns

    I have a sps_prod table as described below-

    POGNAME VARCHAR2 (1500)
    INDEX #VERSION VARCHAR2 (200)
    POG_MODEL_STATUS VARCHAR2 (100)
    POG_LAYOUT_TYPE VARCHAR2 (500)
    POG_MARKET_SPECIFIC VARCHAR2 (500)
    POG_CONTACT_NUMBER VARCHAR2 (100)
    AREA_SUPPORTED VARCHAR2 (500)
    POG_COMMENTS VARCHAR2 (1500)
    POG_FOOTER_COMMENTS VARCHAR2 (1500)
    POG_ELECTRICAL_LIST_1 VARCHAR2 (1500)
    POG_ELECTRICAL_LIST_2 VARCHAR2 (1500)
    POG_CARPENTRY_1 VARCHAR2 (1500)
    POG_CARPENTRY_2 VARCHAR2 (1500)
    INSTALLATION_INSTRUCTION_1 VARCHAR2 (1500)
    INSTALLATION_INSTRUCTION_2 VARCHAR2 (1500)
    FIXTURE_REORDER_NUMBER VARCHAR2 (200)
    FIXTURE_ID VARCHAR2 (200)
    FIXTURE_NAME VARCHAR2 (500)
    FIXTURE_IMAGE VARCHAR2 (500)
    PART_REORDER_NUMBER_9 VARCHAR2 (500)
    PART_FIXTURE_ID_9 VARCHAR2 (500)
    PART_FIXTURE_NAME_9 VARCHAR2 (500)
    PART_FIXTURE_IMAGE_9 VARCHAR2 (500)
    UPC VARCHAR2 (50)
    ITEM_NUMBER VARCHAR2 (50)
    DESCRIPTION VARCHAR2 (700)
    MERCH_TYPE VARCHAR2 (20)
    HEIGHT VARCHAR2 (100)
    WIDTH VARCHAR2 (100)
    DEPTH VARCHAR2 (100)
    DATE OF CREATE_TS

    There are 4 million records in it and many with the same combination of POGName, #Version, POG_Model_Status, POG_Layout_Type, POG_Market_Specific, POG_Contact_Number and Fixture_Name Index. How do the records to retrieve all the columns above, but with a unique combination of fixture_name and reorder_number. It has no keys defined on the table.

    I guess that it is a simple problem but the fact I'm trying to retrieve all the columns I'm stumbling.

    Thanks in advance.

    Hello

    Sanders_2503 wrote:
    ... There are 4 million records in it and many with the same combination of POGName, #Version, POG_Model_Status, POG_Layout_Type, POG_Market_Specific, POG_Contact_Number and Fixture_Name Index. How do the records to retrieve all the columns above, but with a unique combination of fixture_name and reorder_number.

    I don't see a column named reorder_number. Do you mean fixture_reorder_number or part_reorder_number_9?

    So, you want only one row for each distinct combination of fixture_name and some other column (I'll assume it's fixture_reorder_number). Does it matter which line? They will not necessarily have the same values for the other columns.
    The following query returns the one with the first pogname (in sort order):

    WITH     got_r_num     AS
    (
         SELECT  pogname, index#version, pog_model_status, pog_layout_type
         ,     pog_market_specific, pog_contact_number, fixture_name
         ,     ROW_NUMBER () OVER ( PARTITION BY  fixture_name
                                   ,                    fixture_reorder_number
                             ORDER BY        pogname
                           )         AS r_num
         FROM    sps_prod
    )
    SELECT  pogname, index#version, pog_model_status, pog_layout_type
    ,     pog_market_specific, pog_contact_number, fixture_name
    FROM     got_r_num
    WHERE     r_num     = 1
    ;
    

    If there be a tie (i.e. two or more lines with the same fixture_name, fixture_number and pogname first) and then the will be chosen arbitrarily.

    Instead of "ORDER BY pogname", you can ORDER all the other columns OR expressions, but you must have an ORDER byclause of analytics. You can do "ORDER BY NULL" If you really want pcik an arbitrary line.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and also publish the results you want from these data (or some examples of acceptable results).
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.

  • How to copy a movieClip with filters and alpha in bitmapdata?

    I have a movieclip with an image that has transparency and the filters applied to the movieclip. I know that I can use 'draw' to copy the movieclip on bitmapdata object, but it does not copy the filters and the transparency of the image. How can I copy these so the bitmapdata matches the original movieclip in appearance?

    Sorry, Lee, but the draw very good copy filters. And thankfully so - what happens if the clip in question is not a parent - that is to say, it's parent is the stage... that wouldn't work at all then.

    I'm not sure of the problem of the OP, but draw copies certainly filters and transparency without problem.

Maybe you are looking for