Deleting multiple rows from SUD dialog table

Hi,
I have some SUD dialog tables that I would like to delete some rows from.  I can select and delete all or one row (using a SUD button that finds out which one row was selected or if all, and then deleting them with the table.rows.remove command), but I seem to have troubles if I want to select multiple rows (either in a range, ex: rows 3-10, or non-sequential, ex: 1, 4, 6 and 23).  I just started working on this but thought maybe someone has already done this and can save me the trouble!
Thanks!
Julia Moeller

Hi Julia,
Just a quick guess-- try looping backwards and deleting the last rows first:
FOR i = 10 TO 3 Step -1
  table.rows.remove i
NEXT
Haven't tested it, so no guarantees,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

Similar Messages

  • How to delete multiple rows from ADF table

    How to delete multiple rows from ADF table

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • Best practice for deleting multiple rows from a table , using creator

    Hi
    Thank you for reading my post.
    what is best practive for deleting multiple rows from a table using rowSet ?
    for example how i can execute something like
    delete from table1 where field1= ? and field2 =?
    Thank you

    Hi,
    Please go through the AppModel application which is available at: http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
    The OnePage Table Based example shows exactly how to use deleting multiple rows from a datatable...
    Hope this helps.
    Thanks,
    RK.

  • Deleting Multiple Rows From Multiple Tables As an APEX Process

    Hi There,
    I'm interesting in hearing best practice approaches for deleting multiple rows from multiple tables from a single button click in an APEX application. I'm using 3.0.1.008
    On my APEX page I have a Select list displaying all the Payments made and a user can view individual payments by selecting a Payment from the Select List (individual items are displayed below using Text Field (Disabled, saves state) items with a source of Database Column).
    A Payment is to be deleted by selecting a custom image (Delete Payments Button) displayed in a Vertical Images List on the same page. The Target is set as the same page and I gave the Request a name of DELETEPAY.
    What I tried to implement was creating a Conditional Process On Submit - After Computations and Validations that has a source of a PL/SQL anonymous block as follows:
    BEGIN
    UPDATE tblDebitNotes d
    SET d.Paid = 0
    WHERE 1=1
    AND d.DebitNoteID = :P7_DEBITNOTEID;
    INSERT INTO tblDeletedPayments
    ( PaymentID,
    DebitNoteID,
    Amount,
    Date_A,
    SupplierRef,
    Description
    VALUES
    ( :P7_PAYMENTID,
    :P7_DEBITNOTEID,
    :P7_PAID,
    SYSDATE,
    :P7_SUPPLIERREF,
    :P7_DESCRIPTION
    DELETE FROM tblPayments
    WHERE 1=1
    AND PaymentID = :P7_PAYMENTID;
    END;
    The Condition Type used was Request = Expression 1 where Expression 1 had a value of DELETEPAY
    However this process is not doing anything!! Any insights greatly appreciated.
    Many thanks,
    Gary.

    ...the "button" is using a page level Target,...
    I'm not sure what that means. If the target is specified in the definition of a list item, then clicking on the image will simply redirect to that URL. You must cause the page to be submitted instead, perhaps by making the URL a reference to the javaScript doSubmit function that is part of the standard library shipped with Application Express. Take a look at a Standard Tab on a sample application and see how it submits the page using doSubmit() and emulate that.
    Scott

  • Extract Multiple Rows from a Single Table into a Single Row in a New Table

    I have a table in a database that contains contact data like name, address, phone number, etc.
    The folks who designed the database and wrote the application wrote it so that all contact records are placed in that table, regardless of contact type. In fact, the contacts table does not even have a column for "type" even though there are many
    different types of contacts present in that table.
    I am trying to write a mail merge style report in SRSS, that gets sent to a specific type of contact, based on criteria provided that must be obtained from another table, and that data is then used to get back to a specific set of contacts from the contacts
    table.
    The attached file directly below describes my problem and all related information in an extremely detailed way.
    SRSSMailMergeIssue.pdf
    Unless there is a way to make a SRSS Tablix point to two different data sets in SRSS, it looks like I have to combine multiple rows from the same table into a new table.
    If anyone can review the details in the attached pdf file and possibly point me in the direction I need to run to solve this probelm, I would greatly appreciate it.
    I also included a document (below) that shows the tables I reference in the probelm description.
    dbtables.pdf

    I found a solution.... and posted it below
    select
    dk.ucm_docketnumber [UCM DocketNumber],
    dk.ucm_docketid [UCM DocketID],
    vc.FirstName [Victim FirstName],
    vc.MiddleName [Victim MiddleName],
    vc.LastName [Victim LastName],
    vc.Suffix [Victim Suffix],
    vc.Address1_Line1 [Victim AddressLine1],
    vc.Address1_Line2 [Victim AddressLine2],
    vc.Address1_Line3 [Victim AddressLine3],
    vc.Address1_City [Victim City],
    vc.Address1_StateOrProvince [Victim StateProvince],
    vc.Address1_PostalCode [Victim Postalcode],
    oc.FirstName [Offender FirstName],
    oc.MiddleName [Offender MiddleName],
    oc.LastName [Offender LastName],
    oc.Suffix [Offender Suffix],
    oc.Address1_Line1 [Offender AddressLine1],
    oc.Address1_Line2 [Offender AddressLine2],
    oc.Address1_Line3 [Offender AddressLine3],
    oc.Address1_City [Offender City],
    oc.Address1_StateOrProvince [Offender StateProvince],
    oc.Address1_PostalCode [Offender Postalcode],
    pc.FirstName [Arresting Officer FirstName],
    pc.MiddleName [Arresting Officer MiddleName],
    pc.LastName [Arresting Officer LastName],
    pc.Address1_Line1 [Arresting Officer AddressLine1],
    pc.Address1_Line2 [Arresting Officer AddressLine2],
    pc.Address1_Line3 [Arresting Officer AddressLine3],
    pc.Address1_City [Arresting Officer City],
    pc.Address1_StateOrProvince [Arresting Officer StateProvince],
    pc.Address1_PostalCode [Arresting Officer Postalcode]
    FROM ucm_docket dk
    left outer join ucm_victim v on dk.ucm_docketid = v.ucm_docketnumber
    left outer join contact vc on vc.contactid = v.ucm_victimlookup
    left outer join ucm_offender o on o.ucm_offenderid = dk.ucm_offenderlookup
    left outer join contact oc on oc.contactid = o.ucm_individualid
    left outer join contact pc on pc.contactid = dk.ucm_ArrestingOfficerLookup
    WHERE (dk.ucm_docketnumber = @DocketNUM)

  • Deleting a row from a UIData table

    I am trying to select a row from a jsf table then call a backing bean method to delete it using this backing bean method.
    void deleterow(){
    dataitem =(item) dataTable.getrowdata();
    List newlist = new ArrayList();
    table = model.getwrappeddata();
    for (int i=0; i<table.size(); i++){
        product = (product)table.get(i);
       if (!product.name.equals(dataitem.name)){
          newlist.add(product);
    model.setwrappeddata(newlist);
    }all the getter/setter methods are set and it does seem to work.However the results are very inconsistent,sometimes rows are deleted and then magically reappear on the the table latter! Anyone knows of a fail proof method of achieving this?
    Ta.

    A decent IDE ships with a code debugger which allows you tracking variables and running code step by step. If you don't use an IDE or you're unable to use it, then just add some sysouts which prints the desired variables at strategic locations and/or moments.

  • Deleting a row from the item table

    Hi All,
    I have a requirement where I need to put a button to delete the selected row from the item table and for this I have written the following code:
    DATA lo_nd_t_bseg TYPE REF TO if_wd_context_node.
        DATA lo_el_t_bseg TYPE REF TO if_wd_context_element.
        DATA ls_t_bseg TYPE wd_this->element_t_bseg.
        data: it_tab type table of wd_this->element_t_bseg.
      lo_nd_t_bseg = wd_context->path_get_node( path = `Z.T_BSEG` ).
      lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
      lo_el_t_bseg->get_static_attributes(
        IMPORTING
          static_attributes = ls_t_bseg ).
        lo_nd_t_bseg = wd_context->path_get_node( path = `Z.T_BSEG` ).
        lo_el_t_bseg = lo_nd_t_bseg->get_element( ).
        IF lo_el_t_bseg IS not INITIAL.
          lo_nd_t_bseg->remove_element( lo_el_t_bseg ).
        ENDIF.
    Now the problem is although it's deleteing the selected line correctly but because of this I am losing one line on the screen for the user to enter... my form has a fixed number of lines and in my case it's 10... so everytime I am using deleting a line item I am losing one line to enter..... can you please tell me how can I avoid this?
    Edited by: rajatg on Aug 4, 2011 3:12 PM

    lets say...
    i have 1,2,3 documents
    i have cleared , document 2....
    1. when the user selects this record.... you can read the context_element....using the context element you can get the values and clear those values and set the blank values...
    when the user click on save ...you can have only those two records in the table.
    2. conitnue with your logic .... remove_element. once it is done ,,, create_element at the deleted index...
    3. when clicked on delete ...remove_element ( current code).... bind the table to the node... and you will have ur values

  • Abap logic not fetching multiple rows from master data table

    Hi
    I just noticed that my logic is fetching only 1 row from master data table.
    ProdHier table
    PRODHIERACHY            Level
    1000                                  1
    1000011000                      2
    10000110003333              3
    10000110004444              3
    '10000110005555              3*
    logic only fetches one row of level 3, I would like to fetch all level 3 rows.
    DATA: ITAB type table of /BI0/PPROD_HIER,
          wa like line of ITAB.
    Select * from /BI0/PPROD_HIER INTO wa where /BIC/ZPRODHTAS = 3.
    IF wa-PROD_HIER(10) = SOURCE_FIELDS-PRODH2.
         RESULT = wa-PROD_HIER.
         ELSEIF wa-PROD_HIER(5) = SOURCE_FIELDS-PRODH1.
         RESULT = wa-PROD_HIER.
    ENDIF.
    ENDSELECT.
    thanks

    Hi,,
    I have implemented the logic in end routine and it still reads only the first row.
    I am loading only PRODH1 and PROD2 but now I want to get all values of PRODH3 from the master data table.
    The first 5 values are PRODH1 and first 10 values belongs to PRODH2.
    Whenever PRODH2 = 1000011000 in source I should get the following values
    10000110001110
    10000110001120
    10000110001130
    I have multiple rows of 1000011000 so my result should be
      1000011000               10000110001110
      1000011000               10000110001120
      1000011000               10000110001130
    DATA: ITAB type table of /BI0/PPROD_HIER,
    wa like line of ITAB.
    data rp type _ty_s_TG_1.
    Select  * from /BI0/PPROD_HIER INTO table itab where /BIC/ZPRODHTAS = 3.
    LOOP AT RESULT_PACKAGE INTO rp.
    read table itab into wa with key PROD_HIER(5) = rp-PRODH1.
    IF sy-subrc EQ 0.
         rp-PRODH3 = wa-PROD_HIER.
         ELSE.
    read table itab into wa with key PROD_HIER(10) = rp-PRODH2.
    IF sy-subrc EQ 0.
         rp-PRODH3 = wa-PROD_HIER.
    ENDIF.
    ENDIF.
    MODIFY RESULT_PACKAGE FROM rp.
    ENDLOOP.
    Edited by: Bhat Vaidya on Sep 10, 2010 11:27 AM
    Edited by: Bhat Vaidya on Sep 10, 2010 11:37 AM

  • DELETE MULTIPLE ROWS FROM MATRIX

    Hi all,
    I´M DESPERATED.
    I am able to delete row by row in my matrix, but ¿Could anyone post a sample to delete multiple rows?
    I´ve been trying several ways but it doesn´t work.
    My code is:
    ========================
      Dim i As Long = oMatrix.GetNextSelectedRow
                    If i > -1 Then
                        If oMatrix.IsRowSelected(i) = True Then
                            oMatrix.DeleteRow(i)
                        End If
    ========================
    Thank you in advanced,
    lorenzo

    Don´t worry, It was a problem with my loop.
    Thanks anyway
    lorenzo

  • Delete multiple rows from table/list control

    Hi,
    I want to have a table control in which a user can enter different entries, like this:
    My program would read each entry at a time and do something.
    However, I would like to give the user ability to delete multiple entries at once, like in an Excel spreadsheet - that is, the user selects multiple rows and presses "Delete" key and those entries get deleted. The Labview table does not allow this it seems - I can only delete one entry at a time - or I have to right-click and select Data Operations->Cut Data, which is awkward.
    Is there a control better suited to what I want to do? I tried a Llist control, but it behaves in the same manner.
    Thanks in advance!
    Solved!
    Go to Solution.

    You could write your own routine.  Use an Event Structure with a Key Down event.  If the delete key was pressed and the table has focus delete the elements that are selected.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to delete the row from the ADF table using popup box

    Hi,
    I have one requirement like need to delete a record from the table, but that time need to show one popup window for confirmation of the deletion. I am using Delete buttom from the vo operations. I am able to delete the row with out popup but when i used the popup that time deletion is not happening.
    Can any one help me in this.
    Regards,

    Issue was resolved.

  • How to soft delete a row from the target table?

    Could someone help me on this requirement?
    How to implement the below logic using only ODI? I am able to implement the below logic with the "DELETE_FLAG" as "N".
    I want to make the latest record with the flag as "N" and all the previous other records with the flag as "D".
    Thanks a lot in advance.
    I have a source table "EMP".
    EMP
    EMPID FIRST_NAME
    1 A
    2 B
    First name is changed from A to C and then, C to D etc. For each data change, I would add a target row and mark the latest row as "N" and the rest as "D". The target table would contain the following data:
    Target_EMP
    EMPID FIRST_NAME DELETE_FLAG
    1 A D
    1 C D
    1 D N

    The problem is that I can't delete the row cause it demands from me to fill the mandatory field previously. It takes place when the key field is ROWID. In other cases delete is succesful.

  • Insert multiple rows from cursor to table

    Hi,
    I want to insert multiple rows retrieved from cursor to a table without looping the cursor till the end of cursor.
    I have the following structure, plz guide me.
    Create procedure procedure_name as
    cursor mycursor as
    select * from table1; --returns multiple row
    t_data table1%rowtype;
    begin
    fetch mycursor to t_data;
    loop
    exit when cursor not found;
    insert to table2
    end loop;
    end procedure;
    ===========================
    Now my cursor contains multiple records. I can iterate the records in loop and insert data to another table e.g table2 with same structure.
    But I want to insert the total data at a time without looping the cursor for each data.Please suggest how to do this ?
    Thanks in advance.

    You should be able to do it in a single statement (assuming table1 and table2 have the same columns/datatypes)
    insert into table2 (select * from table1);

  • Delete multiple rows from text file

    HI,
    i have a text file and i want to remove first few rows from that text file not last rows.
    how can i do that ?
    thanks

    because i suspect this is a homework assignment i'm not going to give you the fish, but i will teach you how to fish! =P
    go investigate the Java Standard class called: BufferedReader. Look specifically at the method readLine()
    combine that with a for loop, and an IF-THEN statement to weed out the lines you don't want (or just govern that with the FOR loop's index), and you should be able to figure it out....
    good luck! give it a whirl...

  • Retriving multiple rows from the same table

    Hi all,
    I have a table consisting of an id column as well as a start and end date.
    What I want to do is select the difference between start and end time for different id's.
    For example select (endtime where id = 1 - starttime where id = 2).
    Is this possible to do using a single select statement?
    Thanks ppl

    OK, so you want every combination of dropped_id 500 with dropped_id 1000? For example:
    WITH test_data as (SELECT 500 dropped_id, TO_DATE('13/05/2009', 'DD/MM/YYYY') insert_date, TO_DATE('12/05/2009 12:00:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('12/05/2009 12:30:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL UNION ALL
    SELECT 500, TO_DATE('12/05/2009', 'DD/MM/YYYY'),  TO_DATE('11/05/2009 12:04:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('11/05/2009 12:41:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL UNION ALL
    SELECT 500,TO_DATE('11/05/2009', 'DD/MM/YYYY'), TO_DATE('10/05/2009 12:18:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('10/05/2009 12:59:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL UNION ALL
    SELECT 1000,TO_DATE('13/05/2009', 'DD/MM/YYYY'), TO_DATE('12/05/2009 12:30:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('12/05/2009 13:30:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL UNION ALL
    SELECT 1000,TO_DATE('12/05/2009', 'DD/MM/YYYY'), TO_DATE('11/05/2009 12:41:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('11/05/2009 14:30:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL UNION ALL
    SELECT 1000,TO_DATE('11/05/2009', 'DD/MM/YYYY'), TO_DATE('10/05/2009 12:19:00', 'DD/MM/YYYY HH24:MI:SS') starttime, TO_DATE('10/05/2009 13:30:00', 'DD/MM/YYYY HH24:MI:SS') endtime FROM DUAL)
    -- end test data
    SELECT tab1.insert_date insert_date1, tab2.insert_date insert_date2, tab1.dropped_id dropped_id1,   tab2.dropped_id dropped_id2, ROUND(tab2.endtime -  tab1.starttime,2) time_diff
       FROM test_data tab1
    CROSS JOIN test_data tab2
    WHERE tab1.dropped_id = 500
        AND tab2.dropped_id = 1000;
    INSERT_DA INSERT_DA DROPPED_ID1 DROPPED_ID2  TIME_DIFF
    13-MAY-09 13-MAY-09         500        1000        .06
    12-MAY-09 13-MAY-09         500        1000       1.06
    11-MAY-09 13-MAY-09         500        1000       2.05
    13-MAY-09 12-MAY-09         500        1000        -.9
    12-MAY-09 12-MAY-09         500        1000         .1
    11-MAY-09 12-MAY-09         500        1000       1.09
    13-MAY-09 11-MAY-09         500        1000      -1.94
    12-MAY-09 11-MAY-09         500        1000       -.94
    11-MAY-09 11-MAY-09         500        1000        .05
    9 rows selected.

Maybe you are looking for

  • Single table hash clusters

    I created a single table hash cluster like this : create tablespace mssm datafile 'c:\app\mssm01.dbf' size 100m segment space management manual; create cluster hash_cluster_4k ( id number(2) ) size 8192 single table hash is id hashkeys 4 tablespace m

  • Find my iPhone with MDM or Profile Manager question

    If a device such as an iPhone is enrolled in a mdm or in a profile manager can a user still use there own personal icloud account and if they leave without removing it will that lock the phone up or can we still unlock it

  • Flash CS5.5, SWF file doesn't load TLF text.

    Hiya, I just downloaded the trial version of Flash 5.5. I was trying to a tutorial from  Adobe Classroom in a Book: Flash Professional CS5. I was trying to do lesson 7 which is all about TLF text. In the tutorial, you insert text that is TLF text. Mo

  • Windows Update Service Enabled after OSD

    OSD build and capture of win7 x64 with Windows Update service disabled, enables itself after TS/Imaging process.  Anyone know why this happens or how I can permanently disable...it is for a public facing machine I do not wish to ever update.  Turning

  • Can't install photoshop elements 11 on my Mac. Help!!!

    Can't install photoshop elements 11 on my Mac. I installed, moved a file (whoops). It stopped working. So I uninstalled it, then tried to reinstall but it wouldn't do it. Is it now locked or something? Can't find any way to contact Adobe for help (!!