Deletion of single or multiple rows by selecting check boxes?

Hi ,
I want to delete a row or no of rows  in a table by selecting the check boxes.COuld any one suggest me how to do this?
Regards,
Ram

Following is the JavaScript sample you may have to tweak the code to fit your situation....
// Invoke the Instance Manager to remove the current instance of the detail subform.
_<SubformName/RowSOMName>.removeInstance(index of the object to remove)
//_Section2Detail.removeInstance(this.parent.index); //in my case I have a delete button next to each row when clicked that will pass the index of the parent(row index as it is part of that row).
// Invoke the recalculate method to update the form calculations.
xfa.form.recalculate(1);

Similar Messages

  • INSERTED Table - When it gets populated with single or multiple rows?

    Hi,
    I'm trying to create a trigger which then insert to a table. i'm wondering when does the INSERTED table gets populated with single or multiple rows?
    Should I always assume that the INSERTED Table will contains several rows? What does the scope of the INSERTED table in the trigger, isn't based on the user session?
     The reason why i asked this is because as far as i know inserted table may contain several table when the trigger fires which is why I use cursor to insert  records in the table ( there's a behind why i use cursor).
    But if the inserted table will only contain a single record during the session of the trigger then i can avoid the cursor.
    Thanks.

    But since we control the transaction process and we know for a fact that user will only be able to save a record one at a time, do we still expect multiple rows? I just want to have a clear concept on the INSERTED table.
    ...and then the DBA or someone else sees fit to enter a number of rows directly from a query window. And don't laugh. That is bound to happen sooner or later.
    However, just because this can (and will) happen does not mean that you need to handle it on equal footing with the normal case user entering data through the application. What you cannot permit yourself to is to drop the DBA case on the floor, that is write
    the trigger as if there would either be single-row inserts and produce incorrect results for multi-row inserts.
    But, yes, allowing yourself to use a cursor, if you want to reuse the existing stored procedure is feasible. That is also the more drastic solution suggested by Tom to add an explicit check that disallows multi-row inserts.
    Finally, permit me to comment on this:
    Additionally, it's  difficult to use the code below as i need to pass the identity id of tbl_A to tbl_B
    You can use the OUTPUT clause to capture the values, but that requires that you have something you can map the identity values to in the columns you insert, and this is not always the case. However, there is a lot simpler solution to the problem: don't
    use IDENTITY. IDENTITY is one of these over-used and over-abused features in SQL Server. You need it when you want to support high-concurrency inserts, because rolling your own requires a serialisation point. But with a moderate insertion frequency, IDENTITY
    only gives you headache.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to Save the multiple selection check box values into the database

    i have the multiple selection check box implemented in UI through drop down list,i can choose the desired values from the drop down through checkbox, but i m unable to store these values and commit the values into the database all at a time.

    You can access the values using listbinding and can then store them as a string by using a delimiter.

  • Enable selection check boxes in CO-PA datasorce

    HI BI gurus,
    I have an CO-PA datasource,
    in datasource level some fields are not enabled ,it wont allow to select or reselect the options, that selection check box is automatically set 'M' version ,which means 'Must Required' ,now i want to change this 'M' to P flag ,
    in BW i know that how to do ,in BI i don't know how to do that,
    cause : while loading time in infopackage level which is asking KOKRS: controlling area Range ,and PERVI: fiscal period is asking,if u wont give this options it wont load the data
    i dont want this restrictions in Data selection also ,plz  help me
    Thanks and Regards
    prakash.v
    Edited by: Prakash V on Jan 2, 2008 10:20 AM

    You can write a sample code in update rule to delete undesired currency type:
    delete data_pakage where 0currtype = 'B0'.
    Not sure on 0currtype name.
    Hope it helps.
    Regards

  • Data source selection check box Enabling

    Hi All,
    Good day, This in Ravi .
    I need one small help from you.
    We have a data source named 0co_pc_pcp_01.
    we need to check the selection check box  for the field ELEM(cost component number).
    But it was in disable mode.
    Please could you tell how to eanble that selction check box.
    Bcoz i need to set that option for that field and have to load in BW with selctions in infopackage.
    Please could you help me reagrding this, waiting for your replies.
    my maild id is [email protected]
    Thanks & Kind Regards
    Ravi

    Hi Ravi,
    Which system is it? R/3 Dev pr R/3 QUAL? If it is R/3 Dev then you can goto the TCode RSA6 select your data source and click on the pencil icon on the menu bar. It will ask for a Transport Request, you can give one and then it will take you to the change mode of the data source, there you can do the changes and generate the data source.
    But if it is R/3 QUAL then you can't change it there straightaway. You have to first change it in R/3 DEV and collect these changes in a Transport Request and then transport it to R/3 QUAL.
    Hope it helps..

  • Line of text in two rows in a check box

    Greets
    Ive been working in a poll, and i use a check box in some part, but de question its to long to put it in
    i have the same problem with the text box, but with the command &#13; it can be possible to put a long question in two rows, but that command line doesnt work with check boxes
    there are any form to make a long question of one row, into a two row question in check box component??

    There is a multiline button example you can adapt for checkboxes on my blog.
    Alex Harui
    Flex SDK Team
    Adobe System, Inc.
    http://blogs.adobe.com/aharui

  • Multiple Row Data Selection in Popup Table

    In my Popup window there is a table control with ten rows.
    All the rows are editable. After i enter velue in all the rows and click submit button , all the values needs
    to be selected in main window.
    But the problem is in main window only one input field is there. I can't increse the number to ten also.
    So i need to show all the selected values in this one input field separated by comma.
    Please suggest me how to do it.
    I have done it for single row selection but stuck with multiple rows.
    Thanks a lot.

    Hi,
    try this code:
    I<Table>Node tableNode = wdContext.node<Table>();
         I<Table>Element tableEl;
         String input = "";
         for (int i = 0; i < tableNode.size(); i++) {     
              tableEl = tableNode.get<Table>ElementAt(i);
              if (tableEl.get<InputFieldAttribute>() != null)
                   input += tableEl.get<InputFieldAttribute>() + ",";     
         wdContext.current<MainWinInputFieldElement>().set<InputFieldAttribute>(input);
    Regards,
    Matteo
    Edited by: Matteo Fusi on Apr 2, 2009 10:04 AM

  • Delete the rows if the check box is selected.

    Dear all,
    i have a block (not database block). i added a check box to the same block. now i want to delete the row against which the check box is selected.
    i wrote the following code in when-button-pressed trigger.
    IF Checkbox_Checked('CHK_DEL') THEN
         delete from fa_01_11
         where as_id = :as_id;
    END IF;
    commit;
    but when i select only one check box it delete the all rows from the table if the condition is satisfied.
    here is the data in my table
    as_id year month
    63     2006     4     0     -1183.92     1
    63     2006     5     0     -1183.92     1
    63     2006     6     0     -1183.92     1
    63     2006     7     0     -1183.92     1
    63     2006     8     0     -1183.92     1
    63     2006     9     0     -1183.92     1
    63     2006     10     0     -1183.92     1
    63     2006     11     0     -1183.92     1
    63     2006     12     0     -1183.92     1
    what's the proble?
    Regards:
    Muhammad Nadeem
    Message was edited by:
    Muhammad Nadeem

    You need to run the code for each record and you need to find something which is unique. as_id is not unique.
    untested:
    declare
      last_rec boolean := false;
      deleted boolean := false;
    begin
      first_record;
      loop
        deleted := false;
        last_rec := :system.last_record = 'TRUE';
        IF Checkbox_Checked('CHK_DEL') THEN
          delete from fa_01_11
            where as_id = :as_id
            and year = :year
            and month = :month;
          clear_record;
          deleted := true;
        END IF;
        exit when last_rec;
        if not deleted then
          next_record;
        end if;
      end loop;
      commit;
    end;

  • Multiple Selection Check Box

    Hi
    I want to allow the user to select multiple items via a checkbox displayed as LOV.
    I've managed to display all the LOV entries as check boxes just by selecting a LOV but it only stores one of the items I've selected in that LOV.
    I need a checkbox system that stores data like a shuttle control, i.e. 1:2:4:9 etc
    Is this possible without using Add-on JavaScript library's?
    Thanks
    Adam

    You can access the values using listbinding and can then store them as a string by using a delimiter.

  • Extracting values from multi select check boxes delimeted by ":"

    A set of check boxes in an Apex form produces "V1:V2:V3" in the target field, these are the key fields from a dynamic selection lists based on a table that contains the key and value fields. Does anyone have a sample SQL fragment that will produce a record for each one of the values ?
    FORM_TABLE
    ID (1)
    CB_TARGET (V1:V2:V4)
    LIST_TABLE
    KEY_F (V1),(V2),(V3),(V4) etc.
    VALUE_F (Value 1), (Value 2), (Value 3), (Value 4 ...)
    Even though there is only a single row in this example in the "FORM_TABLE", how can this be transformed to :
    1, V1
    1, V2
    1, V4
    Regards
    H

    Does anyone have a sample SQL fragment that will produce a record for each one of the values ?Does it have to be SQL? The simplest approach is probably PL/SQL, using the <tt>apex_util.string_to_table</tt> function.
    For a purely SQL-based solution, use whatever string-to-row technique is appropriate to your situation.

  • Updation/insertion of multiple records simultaneously using check box

    Hi,
    I am using Jdev11.1.1.2.0 version. I have the following scenario.
    There is a table in the view.At run time, I need to select multiple records and update those records in the database. So i took check Box as a column in the table.*(I did not associate check box to any of the attributes (columns) in the table.)* After running the application, I selected multiple records using checkbox and submitting them. The check box is returning value as 'false' even for the selected records also instead of 'true'. Because of this we are facing the issue in updating only the selected records. Please suggest your valuable inputs.
    I have written the following code in the backing bean to get the selected rows.
    BindingContainer bindings =BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding dcIter= (DCIteratorBinding) bindings.get("PttDeliverabvleTrackerEOView2Iterator");
    RowSetIterator depRSIter = dcIter.getRowSetIterator();
    depRSIter.setRangeSize(depRSIter.getRowCount());
    Integer key = depRSIter.getRowCount();
    System.out.println("No of rows is "+ key);
    int rowIndex =0;
    for(int i =0; i<key; i++){
    PttDeliverabvleTrackerEOViewRowImpl row = (PttDeliverabvleTrackerEOViewRowImpl) depRSIter.getRowAtRangeIndex(i);
    System.out.println("Check box value2 "+ this.getSbc1().isSelected());
    if(this.getSbc1().isSelected()){
    rowIndex = i;
    System.out.println("Row Index: "+ rowIndex);
    Please let me know if it is it possible to associate a checkbox to any of the attributes while dragging and dropping the table in the view and update the records?
    I tried selecting the option 'Row Selection' while dragging and dropping the table and changed the property RowSelection->multiple. But it is not serving the purpose of updating multiple records.
    Please suggest if there is any other solution to update multiple records.
    Regards,
    Sreelatha.

    Hi,
    if you added checkboxes to a table, then at runtime the checkbox is stamped, which means that a call to this.getSbc1().isSelected() just returns the state of the last checkbox that is rendered. I don't want to go into the details of ADF Faces table rendering here, but point yu to a blog article that does what you are aiming for using ADF BC: http://sameh-nassar.blogspot.com/2009/12/use-checkbox-for-selecting-multiple.html
    Frank

  • How to get the sum of selected check boxes?

    I have created this simple form with several fields. Fields can be selected via a check-box and they have a price listed.
    I would like to have the sum of each selected product, added in total.
    You can check it out here: https://www.dropbox.com/s/wl1bqz4fa0vlrsk/Student%20Form.pdf
    Help.. anyone?

    it's me again..
    here's a solution: http://forums.adobe.com/thread/929801

  • Selecting (checking boxes) within Library in iTunes

    Is there a quick way to select or deselect (checking boxes) within your library (or specific playlist) as a means to control the items that you want to move to the ipod? Usually in a similar environment, you have an option to select all of the boxes and check them or the reverse in an attempt to control selection.
    Can anyone help? Apple(corp) suggested this support forum.
    Thanks (in advance)
    David

    Make a selection by clicking on the first track and shift-clicking on the last one for consecutive tracks or command-click on ones that are non-contiguous (you can combine these techniques). Then control-click on the selection and choose "Check (Unselect) Selection".

  • Printing selected check boxes

    I am creating a form where a user can check up to 20 check boxes... How can a make it so only the SELECTED/CHECKED check boxes get printed. I think i can make a hidden subform where as the boxes are checked it populated the name of that box... then make that hidden sub field visible only at print. Can anyone give some guidance, thanks!

    The code I had in my reply is generalized code can be used with any checkBox irrespective of name. No customizations required to get what you need. In the code "this" references the object that code is associated with hence you do not have to specify the name of the object. So use the same code over and over with each check box as indicated.

  • Multiple Inserts based on check box?

    I have an insert form that depending on if checkboxes are
    checked, inserts the data. How can I insert a record for the number
    of check boxes checked?
    Example:
    CB 1 = Checked
    CB 2 = Not Checked
    CB 3 = Checked
    So I need to insert a record for CB 1 and CB 3. How can I do
    this?
    What I'm doing is tying a sales lead to the sales man
    selected. I'm using check boxes because I figured it was easiest
    but I'm open to suggestions.

    In your example, CB 1 and CB 3 are checked. But your
    explanation states you need to insert a record for CB 1 and CB 2.
    What am I missing?
    Keep in mind that you will not see the variable FORM.CB2,
    since unchecked checkboxes to not pass their name to the action
    page. Maybe the code below will help. By naming all the check boxes
    the same, you receive a comma-delimited list of the values of only
    the checked checkboxes. You can then put this in a list loop and
    update your database.

Maybe you are looking for