Delete items unchecked from a form

I have a list from query that populate checkboxes (checked) in a form.
However, when a user deselects some of the items from, I want them to be deleted from the database for that user.
Here is the ex: this is how the form looks like:
                                         Category
Item                                  80      626
1. HS # 1 (87)                   chk    chk
2. HS #2  (59)                   chk    chk
This is the list of items already n their preferences (db ids)
80|87,  626|87,   80|59,   626|59
Now from a form, if they deselect one of the items (80|87), I want it to be deleted from the database.
Like these, DELETE FROM ITEMS_TBL WHERE ITEM_ID = 80, Category_ID = 87
How can we do it? Can we check ListContains or something else?

Let's say your query contained 5 records, ID's 1-5.  When output, the user unselects ID 2 and 5.  When they submit the form, you want to delete IDs 2 and 5 right?  But since they are not selected, their IDs are not available in the FORM scope, correct?
What I would do is run the same query on submit, but add an addendum that uses a ValueList() on the FORM variable that holds the selected IDs.  Like:
SELECT
ids,
WHERE ids NOT IN (#FORM.ids#)
That would basically get you back a query of record IDs that are up for deletion.  Then you could run another query right after it that goes:
DELETE FROM tableName
WHERE IDs in (#ValueList( firstQueryName.ids )#)

Similar Messages

  • How to delete a customization from a form - To import a managemt pack from the Authoring Tool

    I am having issues importing a management pack created in the authoring tool. How do I delete a customization from a form since only one can be present? Is there documentation on this?

    If the MP defining the first custom form doesn't contain anything else you need (such as class extensions) delete the first MP. If it contains other stuff you need, delete the form from the Authoring Tool, increase the version the by 1, seal and import.
    Then import your 2nd MP containing your new form.
    Rob Ford scsmnz.net
    Cireson www.cireson.com
    For a free SCSM 2012 Notify Analyst app click
    here

  • How do i disble edit menu's delete item on the oracle forms 11i

    How do i disble edit menu's delete item on the oracle forms 11i
    i have an oracle form that i created using standard template, i am able to disable the edit.clear button but cannot disable the edit.delete button.
    Pelase help.

    Hi user6010265
    Welcome here :)
    but unfortunatly u mis-choose the right forum pls follow the following link they might be more helpful than us..
    Transfer alert in 11i
    Regards,
    Abdetu...

  • How to delete a record from a form

    Hello!
    I'm trying to delete a record from a table called PETS. The pet name is in a textbox from a data block called DELETE_PET.
    So i wrote in the WHEN_BUTTON_PRESSED_TRIGGER of the Delete button:
    select PETNAME into p_name from pets where PETNAME = :DELETE_PET.PETNAME;
    DELETE from PETS where PETNAME = p_name;
    clear_block(NO_VALIDATE);
    alert_id := find_alert('PET_DELETED');
    choice := Show_ALert(alert_id);
    commit;
    exception
    when NO_DATA_FOUND then
         alert_id := find_alert('PET_NOT_FOUND');
         choice := Show_ALert(alert_id);
         clear_block(NO_VALIDATE);
    rollback;
    end;
    And it's not working!!!!! :( :( :(
    Any help would be greatly appreciated!
    Thank you.

    Hi ,
    Write your trigger as....
    begin
    begin
       select PETNAME into p_name from pets where PETNAME = :DELETE_PET.PETNAME;
      exception
        when no_data_found
          then
            alert_id := find_alert('PET_NOT_FOUND');
            choice := Show_ALert(alert_id);
            clear_block(NO_VALIDATE);
            return;
    end;
    DELETE from PETS where PETNAME = p_name;
    clear_block(NO_VALIDATE);
    alert_id := find_alert('PET_DELETED');
    choice := Show_ALert(alert_id);
    commit;
    end;Question: Does your select statement return a value 'as you expect'...????
    Try to run your form in debug mode , and you may discover the deletion is not taking place.....
    Regards,
    Simon

  • Unable to delete row(s) from tabular form

    Hi!
    I created report with row selector, when I select one row I get tabular form regarding to the selected row from report. I can insert and update data from tabular form, but I have problem with deleting them. Error I get is ORA-01403: no data found (Row 207589)My tabular form is created by wizard and primary key is managed by database rowid, I use apex 4.1 an 10g database.
    Do you know for any solution for my problem?
    Regards,
    drama9346
    Add:
    For creating report and tabular form I use code and suggestion from this thread: {thread:id=2490862}
    Edited by: drama9346 on 28.1.2013 1:51

    Hi,
    I tried everything I know and I didn't solve my problem.
    Can anyone give me some clue?
    Regards,
    drama9346
    Add:
    I solve my problem.
    Edited by: drama9346 on 29.1.2013 1:52

  • How to delete selected records from process form child form

    Hi,
    I have one child table attached to process form which has 6 columns.
    I have added 3 rows to the child form . if i tried to remove any row from the form always the first record is removing even though it is not selected to remove. I have coded according to Re: Removing from Child Process Form
    Please help me
    thanks in advance

    Can you tell us the code you had written?
    Regards,
    A

  • Forcefully delete user's "Deleted Items" from Exchange 2010 Management shell ?

    After migration from Exchange 2003 to 2010 my organization's some user can't delete items from their deleted items folder, it generate a error message so how can I forcefully delete user's deleted items from their "Deleted Items folder" from
    Exchange 2010 Management shell ? Thanks
    Babu

    Hi Babu ,
    Based on my knowledge i have given some suggestions please have a look in to it.
    1.We cannot use the search-mailbox command specifically for any folder in the mailbox.But we can use it for a whole mailbox.Below is the command which will copy the entire contents of the mailbox to the target folder called as "backup" .
    Search-Mailbox -Identity "problematic mailbox name" -TargetMailbox "test mailbox" -TargetFolder "backup" -LogLevel Full -deletecontent
    Note : Before executing the above command , please execute the below.
    New-ManagementRoleAssignment -Name "Import Export_Enterprise Support" -SecurityGroup "Enterprise Support" -Role "Mailbox Import Export"
    Once the above command is executed then you need to add your admin account to the security group "Enterprise Support" and then use the Search-Mailbox command to copy the entire items to the target mailbox and also it will delete all the copied
    items from the original mailbox.
    2.Another one option is to use the MFCMAPI tool to force delete the items on the deleted items folder.
    Most importantly before doing all the above , please share me the error message what your users are facing while deleting the items from deleted items folder.
    Thanks & Regards S.Nithyanandham

  • Deleting photo file from hard drive

    Hello,
    I would like to be able to delete items (photos) from both the iPhoto library and my hard drive, but I don't seem to be able to. After I delete items from the iPhoto library, the files are still on the hard drive... (I did empty the trash and I did delete the items from the Library folder)
    Note: I just started using iPhoto. I already had a large (?) (9000+ items) library of photos that I keep on an external firewire hard drive. I did not use the "Copy files to iPhoto Library folder when adding to library" function, because a) I didn't want to wait for the system to copy all 9000 images, b) my internal hard drive isn't really big enough to store all these images and c) I'd like to keep using other software (Photoshop, stich software, etc.) to view, open and edit my images.
    I like using iPhoto, it seems faster than what I've been using and I like the clean interface, but if I can't use iPhoto to both view and delete images it might not be the software I'm looking for...
    My apologies if this question has been answered prior - I just searched and couldn't find an answer.
    Thanks for all help!
    PowerBook G4 12"   Mac OS X (10.4.9)   iPhoto 6.06

    Theo
    Unfortunately the "Show File" or "Show Original File" command doesn't seem to work when more than one file is selected... (the program just points to one of the selected files). Is there a workaround?
    No, I think you'll need to do it one at a time.
    How would I specify more than one external application (e.g. Photoshop and a panorama stitching app)
    No, you won't be able to set up more than one app at a time. The obvious one being to set up Photoshop. What I would do is export the pics for stitching and then import the resulting image as a new image - but that's just me.
    Saving an additional file is as simple either duplicating in iPhoto or using Save As in Photoshop and the importing the new file.
    You can download with Image Capture (in your Applications folder) and rename files with a batch renamer such as File List. iPhoto has no facility to rename files except on export as filenames are quite irrelevant within iPhoto. You can, of course, apply titles in iPhoto.
    As you say, perhaps the app is not for you - it's not right for everybody in every situation.
    Regards
    TD

  • Update SAP from Adobe forms

    Hi all,
    I use BAPI with web service to update several line items (e.g. of a PO) from a table in Adobe forms to SAP.  I expect that all the occurrences of the line items to be transferred to the func mod. via the defined table interface, but only the last line got transferred and the others seem to be overwritten.  I have tried adobe fixed and dynamic tables but that did not change the outcome (In another application, I'm able to display all line items from func. mod. to Adobe form).  Question : What do I need to do to have ALL the line items transferred  from Adobe form to the func. mod. ?            
    Components used : Designer 7, SAP ECC 6 level 9 .
    Please, provide help with concrete and proven information only.
    Best regards,
    Nancy

    Hi Vaibhav,
    Thanks for the reply.  I use table and not structure but somehow all the records did not get transferred.  So far i've been able to get the data to and from SAP without web dynpro and hope to be able to get this scenario to work as well.
    Regards,
    Nancy

  • Unable to delete items from recycle bin

    Unable to delete items from my trash, it starts to delete then stops along the way, when i open the trash, its still sat there.

    Relaunch the Finder, then from the Finder menu bar, select
    Finder ▹ Preferences ▹ Advanced
    and uncheck the box marked Empty Trash securely. Hold down the option key and try again to empty the Trash.

  • Recover Deleted Items - where do they recover to when the mailbox is selected from Outlook, versus a particular folder

    We are using Outlook 2010 and Outlook 2013 in our Exchange 2013 SP1 environment.
    I noticed the following behavior when recovering deleted items:
    From Outlook, I select my mailbox name and choose Folder-Recover Deleted Items.  Then, I select some items and click Restore Selected items.  However, I cannot find where these items are restored.
    If I select a folder under my mailbox, then go to Folder-Recover Delete Items, the restored items go into that particular folder.
    So, my question is, in the first scenario (entire Mailbox selected, not a particular folder), where are the restored items going?
    Has anyone else encountered this?

    Hi,
    Recovered items are restored to the folder you’re working in. But root mailbox (mailbox name) is not supported to show items by default.
    To find these messages, please take the following steps:
    Right-click on root mailbox (mailbox name), choose Data File Properties.
    Under Home Page tab, uncheck the box “show home page by default for this folder”
    Click OK to save this change, then check the root mailbox.
    Best Regards.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Lynn-Li
    TechNet Community Support

  • Delete rows from Tabular form

    Hi,
    Anyone knows how dynamicly delete rows from Tabular Form (on button click, button is as item)?
    Thanks.

    I am in a great fix. We had a test instance.. and we had a version apex 3.2.. But when the same application has been uploaded to prod.. we used apex 4.0.Why on Earth would you do this? The whole point of the testing is to verify that the application will work in the production environment: the first requirement for this is that the test and production environments are equivalent.
    has any body is facing the same issue as mine..Yes, as is easily discovered by searching the forum...see Delete button doesn't work in tabular form after upgrade from APEX3.2 to 4.

  • Can't Delete Items from Music Library

    I've upgraded to 7.01 and can no longer Delete items from my normal music library, whether they're checked or unchecked. It used to work with the Delete Key, now that does nothing...and right-clicking on the song gives no delete option. Also, with the song highlighted, the top menu Edit/Delete option is greyed out.
    In other words, I can't delete any song from my library. Any help is appreciated. Thanks.
    K Culberson

    If the songs are greyed out, it sounds like you're looking at the contents of your iPhone while connected to iTunes. If that's the case, you would need to do all your editing on your library (not the iPhone's contents) then re-sync the iPhone to your library.

  • Error while calling a form from another form's menu item

    I created a main form and menu module for this form.
    I am calling another form from main form menu item.
    i moved both the forms and menu and compiled them.
    But, when i run this form i am getting an error saying
    FRM 92100: Your connection to the server was interrupted
    This may be the result of a network error, or a failure on the server.
    You will need to establish your session.
    I set the seperateframe = true
    networkentries = 30
    But still getting the same error.
    Is there any parameter that i am missing.
    I will greatly appreciate if anybody can direct me to the solution.
    Thank you.
    Navya.

    Hi guest,
    the data definition is:
    DATA: XVBKD LIKE VBKDVB OCCURS 0 WITH HEADER LINE.
    the assignment:
    XVBKD-PRSDT = likp-erdat.
    Thanks,
    Hagit

  • How to refresh page after selecting value from LOV item , in a tabular form

    Hi ,
    I have a tabular form, which contains 2 items(columns), of type "Select List - named LoV".
    Now, couple of issues here.
    1.
    2nd item(column) in tabular form, that LoV should get populated based user's selection value in first item LoV. So how do i refer to the value, that user selected in first item's LoV? I will have to use this reference in LoV query of my 2nd item ( on this tabular form)
    2.
    How can we refresh the page, when user selectes value in first item ( from LoV). As this is a tabular form, here item type is Select List, we dont have an option to pick item type as Select List with Submit. So problem is that when user selects value for item 1, refresh does not happen and item 2 LoV does not get populated as per user's selection in item 1.
    Please help here. Would be really appreciated.
    Thanks and Regards,
    Rave.

    Thanks Ben and Dan for your responses.
    Ben, your solution helped me with refresh of page, as page got submitted.
    This answers to my 2nd question. However, I still need to know first question, which basically is, how do i refer to the value, that user selected in first item LoV.
    Issue is, I selected the value in first item LoV, it got submitted and page fot refreshed. But after page refresh, first item LoV loses its value that I had selected last time. It does not retain the selected value after refresh.
    I have an unconditional process, that on every submit(refresh) of page, I set my items with their corresponding values. But problem is what do i mention there to refer to this item.
    I looked in view source of my page, this item is referred as f03.
    So i used "apex_application.g_f03", to set this item to its value, in my uncoditional submit process. But it did not work. I tried to refer this item as "f03" in this unconditional submit process. But still it did not help, the selected item loses its value after page refresh(submit).
    Any help here would be really appreciated. Please suggest how do we refer to this item's selected value.
    Thanks and Regards,
    Ravi.

Maybe you are looking for