Deleting With Checkboxes Problem

I have created queries and processes as per the How To's etc. for deleting rows via check boxes. The problem I am having is that if the query returns 3 records for example and I select only 1 via the check box, all 3 records end up being deleted.
This is my query which is in an SQL Query (updatable report) region;
select
htmldb_item.checkbox(1,"a"."FUNDING_ID") "DEL",
"a"."FUNDING_ID",
"b"."CONSTRUCTOR",
"a"."YEAR",
"a"."CAPEX",
"a"."OPEX"
from "BCR_Funding" "a", "BCR_Constructor" "b"
where "PROJREV_ID" = :P10_REVIEWID
and "a"."CONSTRUCT_ID" = "b"."CONSTRUCT_ID"
and "a"."REQ" = :P10_REQ
order by "b"."CONSTRUCTOR", "a"."YEAR"
Note that "FUNDING_ID" is the primary key in "BCR_Funding".
I have a "Delete Checked" button and the process behind it is as follows;
delete from "test_tab";
for i in 1..htmldb_application.g_f01.count
loop
insert into "test_tab" values (BCR_SEQ.nextval, htmldb_application.g_f01(i));
delete from "BCR_Funding" where "FUNDING_ID" = htmldb_application.g_f01(i);
end loop;
I am using "test_tab" to see which values are being returned by the htmldb_application function.
At the completion of the process, "test_tab" contains the following
test id
5052 5049
5053 5050
5054 5050
5055 5051
"test" is simply the PK for the "test_tab" table. "id" contains the values of "FUNDING_ID" returned and deleted. Note that only id = 5050 was selected for deleting via the checkbox, yet 5049 and 5051 were deleted also.... @#$%#@
I want this to work such that only 5050 would be deleted...

I have modified the process code to the following to try and see what's going on;
declare
str varchar(5);
begin
delete from "test_tab";
str:= to_char(htmldb_application.g_f01.count);
for i in 1..htmldb_application.g_f01.count
loop
insert into "test_tab" values (BCR_SEQ.nextval, to_char(htmldb_application.g_f01(i))||' ('||to_char(i)||' of '||str||')');
delete from "BCR_Funding" where "FUNDING_ID" = htmldb_application.g_f01(i);
end loop;
end
It would appear that if the query returns x rows and I select the checkbox in y rows, then the process attempts to delete x+y rows.
I have before and after screen images, i.e. before and after the "Delete Checked" button is hit which I can e-mail.
Hope someone can help....

Similar Messages

  • Report with checkbox problem

    I have a process that approves activities by clicking on the checkbox of my report. This is my first column called htmldb_application.g_f01. When I try to approve activities and I try to return the value of htmldb_application.g_f11(i), it always stays on the first value. Here is my code :
    Declare
    --Niveau_Approb number;
    Retard number;
    Date_Prevue_Active date;
    Approbation1 number;
    Delegue2 number;
    Approbateur2 number;
    Approb2 number;
    l_count number;
    Usager_Approb2 number;
    Niveau number;
    Begin
    for i in 1..htmldb_application.g_f01.count
    loop
    select count(*)
    into Usager_Approb2
    from Approbateur, tache, activite
    where activite.code_activite        = htmldb_application.g_f01(i)
    And   activite.code_tache           = tache.code_tache
    And   tache.code_tache              = approbateur.code_tache
    and   approbateur.niveau_approbation = 2
    and   approbateur.pein               = :USAGER_ACTIF
    and   code_activite not in
             select code_activite
             from Delegation, tache, activite
             where activite.code_activite        = htmldb_application.g_f01(i)
             And   activite.code_tache           = tache.code_tache
             And   tache.code_tache              = delegation.code_tache
             and   to_date(activite.date_prevue, 'YYYY-MM-DD')
             between to_date(delegation.date_debut, 'YYY-MM-DD') and to_date(delegation.date_fin, 'YYYY-MM-DD')
             and   delegation.niveau_approbation = 2
             and   delegation.pein = :USAGER_ACTIF);
    select count(*)
    into Approbation1
    from approbation
    where code_activite      = htmldb_application.g_f01(i)
    and   niveau_approbation = 1;
    into Delegue2
    from Delegation, tache, activite
    where activite.code_activite        = htmldb_application.g_f01(i)
    And   activite.code_tache           = tache.code_tache
    And   tache.code_tache              = delegation.code_tache
    and   delegation.niveau_approbation = 2;
    select count(*)
    into Approbateur2
    from Approbateur, tache, activite
    where activite.code_activite         = htmldb_application.g_f01(i)
    And   activite.code_tache            = tache.code_tache
    And   tache.code_tache               = approbateur.code_tache
    and   approbateur.niveau_approbation = 2;
    Niveau :=htmldb_application.g_f11(i);
        RAISE_application_error(-20000,Niveau,TRUE);
    IF (htmldb_application.g_f11(i)=2) And (Approbation1 <= 0)
    THEN
        RAISE_application_error(-20000,'  An approbation from level 1 needs to be done before you approve level 2./ Une approbation de niveau 1 doit avoir été effectuée pour que vous puissiez approuver avec un niveau 2.',TRUE);
    elsif (htmldb_application.g_f11(i)=1) and (usager_approb2 >= 1)
    then
         RAISE_application_error(-20000,'You already have to approve level 2 so you can not approve level 1/ Vous devez déjà approuver un niveau 2 alors vous ne pouvez approuver un niveau 1.',TRUE);
    ELSE
       Insert into Approbation (PEIN, CODE_ACTIVITE, DATE_APPROBATION, DATE_CREATION, PEIN_CREATION,
       NIVEAU_APPROBATION, PEIN_REVISION, DATE_REVISION)
       Values (:USAGER_ACTIF, htmldb_application.g_f01(i),sysdate, sysdate,
       :USAGER_ACTIF,htmldb_application.g_f11(i), :USAGER_ACTIF, sysdate);
       commit;
       Select NBJRS_RETARD into Retard from tache, activite where activite.code_activite =   
       htmldb_application.g_f01(i) and activite.code_tache = tache.code_tache;
       Select date_prevue into Date_Prevue_Active from activite where activite.code_activite =  
       htmldb_application.g_f01(i);
       if (trunc(sysdate) > trunc(Date_Prevue_Active)+Retard)
       then
          if (htmldb_application.g_f11(i)= 1 ) And (Delegue2 <=0) And (
              Approbateur2 <= 0)
          then
             Update activite set succes = 'T', STATUT_QUALITE = 'En Retard',DATE_REVISION = sysdate,
             pein_revision = :USAGER_ACTIF
             where code_activite = htmldb_application.g_f01(i);
          elsif (htmldb_application.g_f11(i) = 1) And ((Delegue2 > 0) OR (
                 Approbateur2 > 0))
          then
              Update activite set succes = 'C', STATUT_QUALITE = '2',
              DATE_REVISION = sysdate,
              pein_revision = :USAGER_ACTIF
              where code_activite = htmldb_application.g_f01(i);
           elsif (htmldb_application.g_f11(i) = 2) and (Approbation1 > 0)
           then
                Update activite set succes = 'T', STATUT_QUALITE = 'En Retard',
                DATE_REVISION = sysdate,
                pein_revision = :USAGER_ACTIF
                where code_activite = htmldb_application.g_f01(i);
           end if;
       else
         if (htmldb_application.g_f11(i)= 1 ) And (Delegue2 <=0) And ( Approbateur2 <= 0)
         then
                 Update activite set succes = 'T', STATUT_QUALITE = 'À Temps',
                 DATE_REVISION = sysdate,
                 pein_revision = :USAGER_ACTIF
                 where code_activite = htmldb_application.g_f01(i);
         elsif (htmldb_application.g_f11(i) = 1) And ((Delegue2 > 0) OR ( Approbateur2 > 0))
         then
                 Update activite set succes = 'C', STATUT_QUALITE = '2',DATE_REVISION = sysdate,
                 pein_revision = :USAGER_ACTIF
                 where code_activite = htmldb_application.g_f01(i);
         elsif (htmldb_application.g_f11(i)= 2) and (Approbation1 > 0)
         then
                 Update activite set succes = 'T', STATUT_QUALITE = 'À Temps',
                 DATE_REVISION = sysdate,
                 pein_revision = :USAGER_ACTIF
                 where code_activite = htmldb_application.g_f01(i) ;
         end if;
      end if;
    Anyone can help me ??
    Thanks
    Chantale
       commit;
    end if;
      --  RAISE_application_error(-20000,Niveau,TRUE);
    end loop;
    end;

    Hi all,
    I have the same problem with another report, here is part of my code :
    DECLARE
    q VARCHAR2 (30000);
    tbl VARCHAR2 (30000);
    w varchar2(500);
    n varchar2(3);
    BEGIN
    q := ' select APEX_ITEM.CHECKBOX(14,rownum) id,x.Nom,' ||
    'APEX_ITEM.SELECT_LIST_FROM_LOV(11,x.IdHoraire,''' ||
    'LISTE DES HORAIRES DE TRAVAIL' || ''',null,''' || 'NO' || ''') as Horaire,' ||
    'APEX_ITEM.CHECKBOX(12,x.TechAccredite,' ||
    'decode(x.TechAccredite,null,null,' || '''CHECKED''' || ')) Accredite, ' ||
    'APEX_ITEM.TEXT(13,x.Numero,10,10,' ||
    '''onblur="javascript:if(!valider_telephone(1,this.value)){alert(''' ||
    '''Numero non valide''' || '''); this.focus();};"''' || ') Tel, ' ||
    'APEX_ITEM.HIDDEN(10,x.IdCT) as ICT';
    q := q || ' from (';
    tbl := ' a valide select statement';
    q := q || tbl || ' ) x ';
    w := ' where ';
    w := w || ' x.IdDepot = decode(:P97_IDDEPOT,-1,x.IdDepot,:P97_IDDEPOT) ';
    w := w || ' or x.IdDepot is null ';
    w:= w || ' order by 2';
    q := q || w;
    RETURN q;
    END;
    and I created a process :
    declare
    res varchar2(100);
    id number;
    Begin
    res := 'res';
    for i in 1..APEX_APPLICATION.G_F14.count loop
    id := to_number(APEX_APPLICATION.G_F14(i));
    res := res || ' i=' || i || ' rownum ' || id || ' th ' ||
    APEX_APPLICATION.G_F11(APEX_APPLICATION.G_F14(i));
    end loop;
    :P97_POUB := res;
    End;
    My process just print the 'res' in an item named P97_POUB, so I can see if evry thing works.
    But I still have a no data found error.
    Benn

  • Problem with Checkbox HTML

    Firefox delays in checking <input type="checkbox> after many attempts its finally ticked.
    We need to zoom the page to tick the checkbox.

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    The Firefox cache temporarily stores images, scripts, and other parts of websites while you are browsing. <br>
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies, do the following:
    #Tap the menu icon located at the top right corner. This is the icon with 3 bars. On older Android devices you'll have to press the hardware menu key and then tap More.
    #Tap '''Settings'''.
    #After that, you will be taken to the settings screen. In the settings screen, look under the section '''''Privacy & Security''''' and select '''Clear private data'''.
    #You will then be taken to a list of what can be cleared. Select the following 2 for deletion:
    #*Cookies & active logins
    #*Cache
    #After those have been selected, tap the '''Clear data''' button to actually clear the cache and cookies.
    Did this help you with your problems? Please let us know!

  • Problem with checkbox group in row popin of table.

    In table row popin I have kept Check Box Group.I have mapped  the texts property of checkbox group to the attribute which is under the subnode of the table.the subnode properties singleton=false,selectioncardinality=0-n,and cardinality=0-n.
    if there are 'n' number of records in the table.each record will have its own row popin and in the row popin there is check box group.
    the check box group in the row popin  belongs to that perticular row.
    but the checkboxegroup values in row popins of all the  rows are getting changed to the row which is lead selected.
    The same scenario  (table in the row popin is showing the values corresponding to its perticular row and all the table values in popin are not getting changed to the one lead selected in the main table)is working fine with the table in place of  checkbox group in row popin with datasource property of table  binded to the subnode
    I cant trace out the problem with checkbox group in place of table.
    Please help me in this regard.I have to place check box group in place of table in row popin.
    Thanks and Regards
        Kiran Kumar K

    I have done the same thing successfully with normal check box ui element. Try using check box in your tabel cell editor instead of check box group.

  • Problem with checkbox selection in Tableview

    Hi All
    I am using table view with 8 columns - in the last 4 columns i have checkboxes for user input - i have a strange problem - when the table has multiple entries - for the last column i can only select the checkbox on line 1 - and i cannot select the checkbox on the remaining entries below - but for the other colums with checkboxes this is not the case
    The selection mode for the table is no line selection - since the table is already displayed with input enabled fields - this is to reduce the no of clicks for user
    Can anyone point out what is going wrong - how can i fix this - what i am doing wrong ?
    Thanks
    Sen

    Hi
    When i click on the checkbox for the 2nd or 3rd rows of the last column - nothing happens - the checkox is still active but nothing happens -
    this is the tableview code
    <htmlb:tableView id              = "Detail"
                     design          = "ALTERNATING"
                     headerText      = "Header Text"
                     onNavigate      = "onMyNavigate"
                     emptyTableText  = "test"
                     onRowSelection  = "onMyRowSelection"
                     fillUpEmptyRows = "false"
                     footerVisible   = "true"
                     visibleRowCount = "5"
                     table           = "<%= DETAILTAB %>"
                     iterator        = "<%= iterator %>" >
    and this is the code for the last column
    <htmlb:tableViewColumn columnName         = "OBSOFLGICON"
                               width               = "3"
                               type                = "user"
                               horizontalAlignment = "CENTER"
                               title               = "Obs" >
          <htmlb:checkbox />
        </htmlb:tableViewColumn>
    Thanks
    Sen

  • Problem with checkbox column in matrix

    Hello.
    I have a little problem with checkbox column in matrix.
    Column is binded to the UserData.
    It has ValOn="Y", ValOff="N".
    I use C++. It is wird problem. In matrix I have 10 columns - scrollbar role and if You want see checkbox column, You must role to the right. If this column is on the screen, and I use:
    checkcell->PutChecked(VARIANT_TRUE);
    then the checkbox is cheched, and if the checkbox isn`t on the screen and I use this comment - it nothing happening.
    I tried to use ValOn="Y", PutChecked...
    The problem i solved if the column is on the screen - if the column is first in matrix or second, but if it`s last I have a big problem.
    My column with checkbox is not editable, but I tried to make it editable, check it, and then make it uneditable - the same efect.
    How can I solve it ?
    Sorry for my english.
    Kamil Wydra

    Hello Kamil,
    I am not sure about your problem, but here is an example of how to use checkbox in UI API.
    First, create the matrix with checkbox column in Screen painter, and the output is an xml file, like this. Type as 121 indicates that it is a check box.
    - <column AffectsFormMode="0" backcolor="-1" description="" disp_desc="0" editable="0" right_just="0" title="Rented" type="121" uid="Rented" val_off="N" val_on="Y" visible="1" width="41">
      <databind alias="U_RENTED" databound="1" table="@VIDS" />
      <ExtendedObject />
    Second, bind the column to table from DB. This is a bug of 2004 Screen Painter, so if you are using 2005 Screen Painter, there is no problem.
    Third, when you open the form, you can check and uncheck the cell.
    BTW, please set the editable of the column to true.
    Hope this helps,
    Nick

  • Problem with checkbox on table component

    Hello i am having a problem with checkbox in table component
    i am developing something like a shopping cart app and i have a checkbox in my table component , i want users to select items from the checkbox to add to thier cart, They can select the items from cartegory combobox , my problem is when they select the items from the checkbox if they select another category the alread selected once do not display in my collection opbject please how can i maintain the state of the already selected items in my collection object

    Hi,
    Please go through the tutorial "Understanding scope and managed beans". This is available at:
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/scopes.html
    The details of the selected items need to be stored in an object that is in session scope.
    Hope this helps
    Cheers
    Girish

  • I purchased two albums from iTunes but neither properly loaded and I cannot play any of the songs.  I have prevously loaded other albums with no problems.  How do I delete these albums and reload them?  I don't see iTunes on iCloud.

    I purchased two albums from iTunes but neither properly loaded on my iPad Mini and I cannot play any of the songs.  I have prevously loaded other albums with no problems.  How do I delete these albums and reload them?  I don't see iTunes on iCloud.

    If the albums do appear in the Music app, hold down on the album icons and the X to delete will pop up on the icons. Tap the X to delete the albums.
    You don't see a anything in iCloud, you see your previous purchases in the purchased tab of the store that you bought the content in. So you find your music purchases in the purchased tab of the iTunes app on your iPad. Tap on Purchased and look for the albums in the Not on this iPad section - assuming that you are able to delete the albums from the device.

  • HT5035 I added a 25 gift card to my account and it showed up on the account.  However, my previous balance of $6.08 was deleted.  Any other's with this problem.  I sent the message in to Itunes but haven't heard back yet...

    Hello,
    I added a $25 gift card to my account and when I did, it deleted my previous amount of $6.08.  It is kind of like a parking meter.  Anyone else with this problem?

    carolinechx wrote:
    i know the description may be a little bit too confusing
    Mostly because you are not using any capital letters or paragraph returns and your post is difficult to read.

  • TS1702 My Facebook app froze so I deleted the app and reinstalled it.  I've done this before with no problem in the past, but this time it says Facebook is installed, but there's no icon on my iPad. I can't delete it again because there is no icon.  HELP!

    My Facebook app froze so I deleted it and reinstalled it.  I've done this several times in the past with no problems.  This time, the app store says it's installed, but there is no icon.  I can't delete it again, because there is no icon to delete and the app store has it listed as installed.  The updates page says it is updated.  I have shut my iPad down completely and restarted with no luck.  I don't know what else to try. Suggestions?

    Try resetting your device.  Hold down the power button and the Home button on your iPad, ignore the slide to power off message, continue to hold both buttons until you see the white Apple logo. After it restarts try download the Facebook app again.

  • When listening to an audio book it freezes after about 10 minutes. I have done a soft reset, I have deleted the audio book and re- installed. My music plays with no problem.

    Using my ipod nano -when listening to an audio book it freezes after about 10 minutes. I have done a soft reset, I have deleted the audio book and re- installed. My music plays with no problem.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

  • HT1926 Tried to download itunes update 11.1.4. At 99% IE said, "This program contained a virus and was deleted."  Anyone else with this problem?  What do I do?

    Tried to download itunes update 11.1.4. At 99% IE said, "This program contained a virus and was deleted."  Anyone else with this problem?  What do I do?

    Hi JEOQ,
    Thanks for visiting Apple Support Communities.
    You may find the information and steps in this article helpful with downloading iTunes:
    iTunes: Downloading iTunes for Windows using Internet Explorer
    http://support.apple.com/kb/ts3212
    Best Regards,
    Jeremy

  • Hi , unfortunately i faced with a problem that i couldent open my audio note so i thought if i delet it and transfer the application from itunse from my pc i can have my files...but all of them deleted from both application and also from wifi address... I

    Hi , unfortunately i faced with a problem that i couldent open my audio note so i thought if i delet it and transfer the application from itunse from my pc i can have my files...but all of them deleted from both application and also from wifi address... Is it any solution for recovery the filew? I missed lots of important files , plz help me
    Tnx alot

    Hey Eric,
    Thanks for taking the time. Unfortunately no that does not solve it. Same as swipe it will get me there and it will show separate programs spaced out. The issue I am having is that all my open word files are bunched up in a pile on top of each other. I can see the edges of each one but I want them to be separated from each other enough that I can visually identify what file is what.
    Again, thanks for trying, it is appreciated.

  • Mail sync with gmail problems - deleted emails keep re appearing

    Learned all,
    Upgraded to Mavericks and my main (work) email client is gmail forward to my mac. I simply can't delete emails from my inbox, they re appear after every sync. If I delete them on my phone they re appear after a sync. They remain in the google mail/gmail inbox, as accessed in a browser, marked deleted but still sitting in my inbox. I haven't noticed this before but then I haven't really looked.
    This is bizarre, and fundamental. I have read the TidBITS article and cringe at the thought of having all my emails load back up to my mac. Also cringe at all the other accounts of issues that this resolution doesn't fix. My temporary work around - disable my gmail work email account on my mac, forward all emails from gmail to my icloud mail account/client. The biggest problem, and a show stopper, is that I can't send emails via icloud from my work email address. I assume that you can't add an alias with a different domain name? Anyway I had 3 and have to wait 7 days after deleting one before I can add another. 7 days??
    Any wisdom or learnings from out there? Any advise appreciated, thanks.

    Thank you, Ernie.
    These are all IMAP.  I see trash on the server and on MAIL.  deletine Trash used to work from MAIL, but in last 4 months, if I want something to take effect, I work from the web mail of go daddy and MAIL gets the message.
    So you suggest I go to Gmail and set up accounts ( I assume they  will walk me through )  (starting from my current gmail acct that my android uses-- or start from scratch?)  to receive email addressed to my current email addresses?  Then by not transfering out of goDaddy, I won't lose lots of email and mail files, folders in the transition?
    There is a discussion on this topic of GoDaddy delays, from 2010 and 2011. So I may not be alone with the problem now.
    Best,
    Gayle

  • I would like to completley delet firefox and reinstall but i canot thers alwase somthing left which continues the problem i have used firefox before with no problems

    i would like to completley delet firefox and reinstall but i canot thers alwase somthing left which continues the problem i have used firefox before with no problems edit

    You can remove the Firefox program folder if there are still files left in it after uninstalling.
    * http://kb.mozillazine.org/Uninstalling_Firefox

Maybe you are looking for

  • How can I get data in flat file from Pool table and cluster table ?

    Hi, I am working in one Achiving project. My requirement is to get data into flat file from Cluster table and pool table. Is there any tool avilable to download data into flat file from pool table and cluster table ? if table name given in the select

  • Pricing in Opportunity Based on ECC Route

    Hi CRM experts My client is a logistics Service Provider and their base price in ERP is based on Route + Service Product. They want to see same price in CRM opportunity. But in CRM Opportunity there is no u2018Routeu2019 to calculate base price from

  • How do I update a Nested Table of inherited Object Types?

    Does anyone know why the following line (commented out) doesn't work and what I can do? Is there some way to cast the column I am trying to update? I think I am going crazy.... create or replace type person_ot as object (name varchar2(10)) not final;

  • Slow internet after mountain lion download

    web pages open slowly or not at all after mountain lion download

  • NWA PI Message Prioritization

    Trying to use PI Message Prioritisation and I get the following message when logging onto NWA and selecting SOA Management   Monitoring   PI Message Prioritization. I Message prioritization data provider not registered for this PI have searched SDN,