How to simulate the copy row feature in Apex

Ver: 4.1.0
Hi there,
I have a application (Report and form) where users can do the standard edit, create, delete and save features.
We had to add a "Copy" row option also for which I have added a radio button against each row in the report next to the edit pencil item. And that in turn is a hyperlink which opens the "Edit" page again. Right now it opens the form in edit mode for that record, which if any changes are made, updates the record. I wanted to
1. When the user makes changes and hits the save button, a new record is created and inserted. (no worries on the duplicates etc)
2. Only 2 fields need to be passed from the original report page to the copy page.
3. Or if this is not possible, then maybe if I can capture the radio button row values and try passing that onto the form using some hidden fields maybe? But how can we capture the radio button value when it is selected?
Wondering if anyone has done this before? any suggestions on how best to implement this
Thanks,
Sun
Edited by: ryansun on Oct 16, 2012 6:29 AM

Haven't done this but I'm gonna take a guess.
1. Have the copy row link do the same thing that the edit row does so that your row is displayed on the edit page. However somehow pass another parameter such as a unique request value or something so that the called page can "know" that it was arrived at via the intent of copying a row.
2. In the called page, have a process that detects whatever flag you passed (to know that the user wants to copy a row) and have that process null out the PK item in your page (assuming that your page drives its DML via a PK field and not ROWID). You also might need to alter your button conditions accordingly so that your create button shows (since you will be creating a new record) and your save/apply-changes button (existing records) is hidden.
3. Hopefully this is enough to fool Apex into creating a new record (since the PK is now null) and the user would be now pressing the create button to save changes to the database.
Hope this helps...if it's managed by ROWID though this approach may not work and also if there's any MD5 checksum getting in the way it might not work either but this is the approach I would try first.

Similar Messages

  • How to test the XML distribution feature in the report builder

    Hello,
    I am working on the publishing report by using the XML distribution feature. Are there anyway I can test it in my report builder before running it on the Report server?
    Thanks.

    Haven't done this but I'm gonna take a guess.
    1. Have the copy row link do the same thing that the edit row does so that your row is displayed on the edit page. However somehow pass another parameter such as a unique request value or something so that the called page can "know" that it was arrived at via the intent of copying a row.
    2. In the called page, have a process that detects whatever flag you passed (to know that the user wants to copy a row) and have that process null out the PK item in your page (assuming that your page drives its DML via a PK field and not ROWID). You also might need to alter your button conditions accordingly so that your create button shows (since you will be creating a new record) and your save/apply-changes button (existing records) is hidden.
    3. Hopefully this is enough to fool Apex into creating a new record (since the PK is now null) and the user would be now pressing the create button to save changes to the database.
    Hope this helps...if it's managed by ROWID though this approach may not work and also if there's any MD5 checksum getting in the way it might not work either but this is the approach I would try first.

  • How to Fix the 1st row in Table

    How to Fix the 1st row in Table
                 In EP, one of the page we are getting out put in the table format. It's working fine, but as per the new requirement we have to fix (freeze) the first row of the table. (.i.e. whenever I click the page down button first row should be visible in the table). Can you help regarding the above issue?
    For Example: in Table having 6 rows. In 1st row display Year Month and 2,3,4---etc Rows will display Quantity. Click on Page down Button in Table we are able to staring 2row. First was a movie up. So End user canu2019t find which year/moth under the Quantity is available.
    So I have to fix in 1st row. Click on page down button table 1st row is fixed but comes to another Quantity Records.
    It is Possible in Table?  If possible please tell me.
    Regards
    Vijay Kalluri

    Hi KalluriVijay 
    I don't think there is direct availabe method available to fix the row. However, there are two ways using which you can achieve the requirement:
    To go ahead with the custom table. This way you can set your own properties for the table. However, this may impact performance handling large data.
    Second option is to use other features of NW04s (Not available in NW04) like Table Popins using which you can achieve something similar.
    For Table Popins refer [TablePopin|http://help.sap.com/saphelp_nw70/helpdata/EN/23/5e9041d3c72e7be10000000a1550b0/frameset.htm]
    Hope this helps.
    Regards
    Abhinav Sharma

  • Please give me idea how I highlight the gird row which have

    Sir
    I have gird with 5 column
    Vno
    Code
    Dept
    Date
    Amount
    Sir my need is which record have above 5000 amount that color read and other color blue
    It means above 5000 highlight in grid
    Please give me idea how I highlight the gird row which have above 5000 maount
    Thank
    aamir

    PROCEDURE pr_Set_VA (p_VA IN VARCHAR2) IS
    v_Feld VARCHAR2 (30);
    v_Item VARCHAR2 (61);
    v_Block VARCHAR2 (30);
    BEGIN
    v_Block := :SYSTEM.CURSOR_BLOCK;
    v_Feld := Get_Block_Property (v_Block, FIRST_ITEM);
    WHILE (v_Feld IS NOT NULL) LOOP
    v_Item := v_Block || '.' || v_Feld;
    Set_Item_Instance_Property (v_Item, CURRENT_RECORD, VISUAL_ATTRIBUTE, p_VA);
    v_Feld := Get_Item_Property (v_Item, NEXTITEM);
    END LOOP;
    END;

  • How to delete the selected rows in a JTable on pressing a button?

    How to delete the selected rows in a JTable on pressing a button?

    You are right. I did the same.
    Following is the code where some of them might find it useful in future.
    jTable1.selectAll();
    int[] array = jTable1.getSelectedRows();
    for(int i=array.length-1;i>=0;i--)
    DefaultTableModel model = (DefaultTableModel)jTable1.getModel();
    model.removeRow(i);
    }

  • How to highlight the whole row of a particular line item of sale

    How to highlight the whole row of a particular line item of sales order depending on condition?
    Please help its urgent..
    Looking forward your reply.
    Moderator message: please do more research before asking, show what you have done yourself when asking, do not flag posts as "urgent".
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Aug 9, 2011 9:30 AM

    Any ideas on what would cause this NOT to work? I added this row right after the table is created and populated and it is still not highlighted when I enter the form. The snippet of code that does this is:
    MyTableModel modelS = (MyTableModel)dataModel.get("S");
    jTable1 = new JTable(modelS);
    jTable1.setRowSelectionInterval(0,0);MyTableModel is this:
    class MyTableModel extends DefaultTableModel {
      public MyTableModel(Object[] columnNames, int numRows) {
        super(columnNames, numRows);
      public boolean isCellEditable(int row, int column) {
        if (TableKey == 'S') {
          if (column == 6) {
            return false;
        if (TableKey == 'O') {
          if (column == 0 || column == 4 || column == 5) {
            return false;
        if (TableKey == 'P') {
          return false;
      return true;
    }Can anyone help? Thanks.
    Allyson

  • How to find the LOCKED ROWS in a table?

    Not locked objects, but for a table the locked rows.

    Check below links :
    http://www.jlcomp.demon.co.uk/faq/locked_rows.html
    How to find the locked row.
    who are waiting for same record?
    HTH
    Girish Sharma

  • How to identify the Selected row number or Index in the growing Table

    Hi,
    How to find the selected Row number or Row Index of growing  Table using Javascript or Formcalc in Interactive Adobe forms
    Thanks & Regards
    Srikanth

    After using bellow script it works fine
    xfa.resolveNode("Formname.Table1.Row1["this.parent.index"].fieldname").rawValue;

  • How to include the first row of detail in every xquery transformed xml?

    I am dealing with a XML file,where i need to publish to different BS.
    First node will be a common node node which contains vital info,second node goes to one BS and third goes to another BS.
    *<header></header>*
    *<details></details> (they are unbounded, but the first detail tag which comes in the input file is a mandatory tag in such a way that it needs to be included in every transformed message)*
    *<trailer></trailer>*
    We need to apply x query transformation on it in such a way:
    *</header></header>*
    *<1st detail></1st detail>*
    *<detail></detail> (2nd row of detail in input file)* -------------------------> Goes to BS1
    *<trailer></trailer>..*
    *<header></header>*
    *<1st detail></1st detail>*
    *<detail></detail> (3rd row of detail in input file)* ----------------------------->Goes to BS2
    *<trailer></trailer>*..
    And so on.
    Now, the problem is how to include the first row( *1st detail* ) of detail in every xquery transformed xml?

    are you looping of this input with a for each?
    /yourdata/details[1] should return always the first detail element.
    or before the for each do an assing of this first detail element to "generic_details_var"
    and use this var in every looping iteration (in an assign or as input for xquery)

  • How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection

    How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection.
    I have a multiple rows on PDF form. All rows have 4 textfields. I want to submit the multiple rows data to a method defiened in webservice.
    Unable to retrieve the data in multiple rows within webservice method.

    Hi Paul,
    I'm now able to save the retrieved xml in a hidden text field and create dynamic table, and I'm able to fill this table from the XML, but the problem is that I could not find the correct way to loop on the xml, what I'm trying to say, the table will have number of rows with the data of the first row only, so can you tell me the right way to loop on the xml!
    this is my code
    TextField1.rawValue=xmlData.document.rawValue;
    xfa.datasets.data.loadXML(TextField1.rawValue, true, false);
    for(var i=0; i<count; i++)
    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Num").rawValue = xfa.datasets.data.record.num.value;
    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Name").rawValue = xfa.datasets.data.record.name.value;
    Table1.Row1.instanceManager.addInstance(true);
    Thanks
    Hussam

  • Can any one tell me how to change the current row header in FB1LN tcode

    Hi,
    can any one tell me how to change the current row header in FB1LN tcode.
    I want to show input date also in the layout.
    Regards
    Mave

    Hi
    I know two ways:
    - transaction obvu: here you can insert new fields, but only if these fields are included in certain table (like BKPF, BSEG, BSIS.....
    - if your field isn't included in those table, you have to modify the structure RFPOS and manage it in the BTE 1650. After updating RFPOS you have to run the program RFPOSXEXTEND to update the structure RFPOSXEXT.
    Max

  • How to trigger the automated row fetch process and open modal window by javascript api?

    Hi,
    I would like to click the one row of column of IR report, to open the modal window of current page.  <----------------it is ok. I can use "javascript:openModal('windowID')"  to do it.
    There is one form in this modal window, Meanwhile, I would like to pass column data to this form.    <--------------------- it is ok also. I can use " $s('P7_ID','column_value');" to do it.
    But I don't know how to trigger the "automated row fetch" process of this form to retrieve other field's value in this form.   
    I tried to use following 2 ways. But failed.
    First method:
    add one ajax process of "automated row fetch" in "page processing" block, named "get_fetch_data"
    when click IR column , call "openModal", and call  "apex.server.process ( "get_fetch_data", {}, { success: function( pData ) { }  } );"  , I tried to call above ajax process to refresh form. It is failed.
    Second method:
    add one process of  "automated row fetch" in "page rendering" block, named "get_fetch_data"
    when click IR column, call javascript api "apex.submit" to submit current page , then call "openModal".
    such as :  javascript:apex.submit({request:'MODIFY',set:{'P7_ID': #ID#}}); openModal('trade');
    But it is failed also. the modal page is showed firstly. then page refresh. but modal window will not open again.
    I am not sure if my thinking is right. Could you please provide any suggestion?
    Thanks in advance,
    Ping

    Hi Ping,
    You can try to set the session state of your modal page's primary key before opening the modal page. Use one dynamic action (on click of IR row) with two true actions. First one to set session state of modal page pk, second on to open modal page.
    Or you can add the modal page url as link in your report by extending your query:
    select ...
    ,         apex_util.prepare_url( 'f?p='||:APP_ID||':7:'||:APP_SESSION||'::'||:DEBUG||':7:P7_ID'||COLUMN_VALUE ) as link
    from ...
    This will give you the url of the modal page, with set primary key.
    Regards,
    Vincent Deelen
    http://vincentdeelen.blogspot.com

  • How to skip the header rows of the file using UTL_FILE?

    Hi,
    I created a procedure to read the file from shared location using UTl_FILE package. But, I stucked why because I don't know how to skip the header rows as those rows are headings for one of the report.Since, please help me.
    Regards,
    Vissu.....

    vissu wrote:
    Hi,
    I created a procedure to read the file from shared location using UTl_FILE package. But, I stucked why because I don't know how to skip the header rows as those rows are headings for one of the report.Since, please help me.
    Regards,
    Vissu.....UTL_FILE just reads data from the file. It has no concept of what could be a "header" or "body" or "records" or "footer" or any other data based concept. If you want to skip lines of a file, you will just need to read them using UTL_FILE and ignore them.

  • How to simulate the escalation process

    Hi All,
    Can somebody tell me how to simulate the escalation process in service?I need to know whether all configuration in my system has done or not done yet....
    In my system if there's a problem in customer system for more than 7 hour, then system will detect the problem and send an sms/email to the person responsible in some level (ex: level 1 for SLG 95%), if the customer system still have a problem for more than 10 hour, then system will send an sms to person responsible in level 2, etc.
    I want to know how can I simulate this escalation process in CRM service manually. I'm using CRM 5.0. Any helpful answer will be rewarded. Thank you.
    Rgds,
    Aleluya sap.

    Hi Aleluya,
    You can use date types which will have the times at which the trigger of mail is supposed to happen and once the current date and time is equal to say date type 1 there can be an action setup to send a mail to a particular partner function .
    Also you can use status condition for controlling the mails ..
    hope it helps
    Cheers!
    Raj

  • IPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

    iPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time etc.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

    iPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time etc.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

Maybe you are looking for

  • Question on security in ABAP program with ITS. Please help!

    Hi Experts,         I have a question on security in ABAP program. I have a ABAP program which has a transaction attached. I have added authorization check in ABAP program(Progran level security). I have also attached the authorization object to the

  • How can I whitelist specific URLs to disable mixed content blocking? (New Feature in FF23)

    For a few of the enterprise products I use, the mixed content blocker disables my ability to use these tools. While I understand I can toggle to allow mixed-content -- I would like to be able to whitelist the URLs that I use regularly that I don't wa

  • Kde update trouble

    my kde died after the last update :-( any idea? or any suggestion? Should I wait until an update fix it? thnks. Regards. this is the console output of startx: X.Org X Server 1.7.6 Release Date: 2010-03-17 X Protocol Version 11, Revision 0 Build Opera

  • Problem with File.createTempFile

    I did File temp = File.createTempFile("cpyStats", ".xls"); //                Delete temp file when program exits.                temp.deleteOnExit(); System.out.println(temp.getName());But the result is : cpyStats30440.xls Why do it always have some

  • Person and Group column in Document Information Panel in Word

    Hi All, Environment: SharePoint 2010 and Claims based Authentication. We have a library with "Person and Group" column, "Choose from:" is set to "All Users" and in the "Document Information Panel" when I click on the Address Book (book symbol) it doe