Examples of Add and Delete buttons in Forms

Hello, I have group project and we are having a hard time finding examples of how to add and delete records.
We have tried for the add:
INSERT INTO order_line VALUES
(:orders.o_id,
:order_line.inv_id,
:order_line.ol_quantity);
COMMIT;
And this for the Delete:
DELETE FROM order_line      WHERE
o_id = :orders.o_id
AND inv_id = :order_line.inv_id;
COMMIT:
We are just looking for a generic example of how the code should look. Please ignore any errors I may have typed I copied it from a print off.

Please ask this question in the Forms discussion area instead of the Database discussion area.
Thanks.

Similar Messages

  • Without data in textfield and datagrid if i click add or delete button it should through msgbox

    hi friends ,,
                     i am new to flex i am doing a application in flex4,i need help from this, i have two text inputs and one datagrid, and one add button and delete button.
    my requirement is without data if i click add or delete it should through error box how to do that,
    In 3 condtition it should  thorugh error or msg box;
    conditions are,
                      1.both textinputs and datagrid----> click (add or delete)--->error or msg box
                       2.both textinputs dont have value and datagrid have values----> click (add or delete)--->error or msg box
                       3..both textinputs  have value and datagrid  dont have values----> click (add or delete)--->error or msg box
    any suggession or snippet code are welcome
    Thanks in advance,
    B.venkatesan.

    Hi,
    Please try following code:
    <?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="
    library://ns.adobe.com/flex/spark" xmlns:mx="
    library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
     <fx:Declarations>
     <!-- Place non-visual elements (e.g., services, value objects) here -->
     </fx:Declarations>
     <fx:Script>
    <![CDATA[
     import mx.collections.ArrayCollection; 
    import mx.controls.Alert; 
    public function check():void{ 
    if(input1.text=="" || input2.text=="" || Dg1.dataProvider==""){
    Alert.show(
    "Enter the text boxes and DataGrid.");}
    else{Alert.show(
    "Do not Enter the text boxes DataGrid."); 
    ]]>
    </fx:Script>
     <s:TextInput x="77" y="107" id="input1"/>
     <s:TextInput x="254" y="107" id="input2"/>
     <mx:DataGrid x="80" y="150" id="Dg1">
     <mx:ArrayCollection>
     </mx:ArrayCollection>
     </mx:DataGrid>
     <s:Button x="95" y="329" label="Add" click="check()" />
     <s:Button x="290" y="329" label="Delete" click="check()"/></s:Application>
    I am keeping Arraycollection empty for example.Please try when you provide data to Arraycollection.
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Add and Delete a row in table

    Hi Expert,
    In SAP interactive form OFFLINE Scneario.
    I have a deep structure. In which i am using other structures like kna1, knb1, knvv.
    Now in KNVV is again a deep structure in which i have a table type.
    Now a draged and droped this table type to my layout  so i got a table.
    I Need to have two buttons ADD and Delete, To add and delete a row in table repectvily.
    I saw other threads also but get not do it.
    My table type attribute's name in KNVV structure is VLACT.
    I write following code on click action of ADD button
    data.#subform[0].Button1::click: - (FormCalc, client) -
    VLACT.row.instanceManager.addInstance(1);
    xfa.form.recalculate(1);
    but it shows error msg
    accessor "VLACT.row.instanceManager.addInstance(1);"
    is unknown.
    Also i am not able to see tabel itself wich i draged and droped. Only two buttons are there.
    Plz help
    Thanks ? Regards,
    Arvind

    Hi Otto,
    This is the code i am using to add new row.
    Also all the settings in form are correct like "Repeat row for each data item" etc.
    I want to have at most 7 rows.
    var nTableLength = Table1.nodes.length; 
      var nNumRow = 0;
        for (var nCount = 0; nCount < nTableLength; nCount ++)
          if ((Table1.nodes.item(nCount).className == "subform") & (Table1.nodes.item(nCount).name !== "HeaderRow"))
           { nNumRow = nNumRow + 1; }
               if (nNumRow == 7)
               { xfa.host.messageBox("The maximum allowable number of rows is 7. You cannot add any more rows.", "Warning", 3); }
           else {
                  Table1.Row1.instanceManager.addInstance(1);
                  xfa.form.recalculate(1);
                   xfa.host.messageBox("row added" );
    I get the msg form the statment        xfa.host.messageBox("row added" );
    But i can not see the newly added row
    Plz help
    Thansks & Regards,
    Arvind

  • Re: Enable Save ,Delete buttons in Form

    Hi All,
    I using Jdeveloper 11.1.2.3 ,
    My scnerio is i am taking 2 panel tabs  One tab contain table i.e List, second tab contain the Form i.e Details ,
    I am taking Save,Delete,CreateNew buttons, Whenever i am in List Only CreateNew buttons should enable mode,remaining 2 buttons is in disable Mode.
    and in Details form Save and Delete buttons is Enable Mode.
    How Can i achieve this requirement,
    With regards,
    satishkumar

    Thanks for your Rply Timo,
    I have lot of forms in Application, thats why i am globally defined all the Buttons.
    WithRegards,
    satishkumar N

  • Add a delete button

    Hi all,
    I'm trying to add a delete button on the search page in the Content server (Search tab) but I don't know which service and template I must edit. Have anybody an idea?
    Thanks in advance!

    Hi,
    Well I would just be concerned with a delete button on the search page simply because it's a very easy to use delete button. When you delete, there's a good chance you're loosing content permenetly and if someone takes the time to check something in to a content managment system that person probably felt there was some value at some time for that content.
    Deleting just scares me a bit, though it also has it's purpose as well. If at all possible though I'd rather expire content, espesially if it's something you may need later. You could also archive it off. Every organization is different though, it's a very subjective decision.
    From you reply though, I do have one word of caution; You don't want to delete directly from the database. You absolutly want to call a service for that. There are a number of tables that need to be updated when a delete happens in addition to a variety of application events that fire including search indexing.
    I think John(JRS) is right that you'll probably need to loop through all the revisions and call the delete service for each one. The repository manager is able to delete all revisions of a document with one click though, so there may be an undocumented "super" delete service hanging out there as well.
    What I might do make the "Delete" button an expire button and just set the expiration date using an update service call. From there, you could the remove expired content using archiver jobs, perhaps as a monthly administrative process. There's also a way to set up a trash can delete, so the content can be brought back.
    Thanks
    David

  • Problem with Read-only user being able to add and delete files and folders.

    The setup:
    Computer #1
    iMac (intel) running 10.5.5
    File sharing ON
    Sharing folder on external USB drive called 'iTunes' (but not the drive volume itself)
    Users:
    - Everyone = Read Only
    - Admin(me) = Read/write
    - UserA = Read Only (with account PW and username identical to local login for computer below)
    Computer #2
    UserA's iBook G4 running 10.4.11
    When I go to finder>network>iMac>connect it prompts me to login which I do and then select 'iTunes' folder which is visible and mounts successfully. I can see all files, access them all. Life seems great. Then I discover that I can also modify and delete files from the iBook, and create and delete directories.
    I'm new to networking and although I've setup and managed minimal networking tasks on PCs before, this is my first foray into the Mac networking world. Please help.
    What am I doing wrong? What haven't I set?
    Thanks in advance.

    Sorry, I should have clarified this in the first email.
    When I login from the iBook, I am logging in under a read-only user (not as myself, who is admin on the iMac). The user on the iBook has only been given read-only permissions on the iMac yet is able to add and delete files.
    This read-only login/PW however, is the admin account on the iBook, but that shouldn't allow this person to write on the iMac so far as I understand things...right?

  • How do I delete music from my iPhone and what is the best way to add and delete music?

    How do I delete music from my iPhone and what is the best was to add and delete music to the iPhone?

    See Here...
    iPhone User Guide
    and here
    http://www.apple.com/support/iphone/syncing/

  • Disabling 'Change' and 'Delete' button in Attachment List in ME52N

    Hi Friends,
    The reuqirement is this:
    A user attaches doucments  ( using the Generic Object Services to attach document ) while creating/changing Purchase Requisition (ME51N / ME52N).
    Now when any user goes to see the docuemnts attached to the PR, he selects the 'Attachement List' from the context menu, he should only be able to read it and should not be allowed to change or delete the document. For this we need to disable the 'change' and 'delete' buttons from the toolbar.
    Awaiting your response.......
    Regards,
    Fawaz

    Hi,
    Probably you have uncommented the call to super class when you reimplement the method on child class (z class)
    I just implement the same thing now and it worked for me. Take a look:
    1 - Modify the SGOSATTR table by SM30, just write a Z class (in my case CL_GOS_SRV_ATTACHMENT_CREATE) .
    2 - Create/inheridt a subclass (not a copy) in SE24 of the standard class.
    3 - Implement the method CHECK_STATUS in the z class. Note that the call to method on super class came commented. You only uncomment if you want to also execute a standard code in the super class.
    Here is my code:
    method CHECK_STATUS.
    NOTE - In my real implementation I have uncommented the code below because I want do standard code be executed before my own check.
    *CALL METHOD SUPER->CHECK_STATUS
    EXPORTING
       IS_LPORB  = IS_LPORB
       IS_OBJECT = IS_OBJECT
    IMPORTING
       EP_STATUS = EP_STATUS
       EP_ICON   = EP_ICON
      Check for BUS2012 = Bussinnes Object for Purchase Order
      IF IS_LPORB.TYPEID = BUS2012
      Check authorization and disable create attachment item if the user does not have authority...
    IF IS_LPORB-TYPEID = 'BUS2012'.
    AUTHORITY-CHECK OBJECT 'Z_MM001' ID 'ACTVT' FIELD '01'.
      IF sy-subrc <> 0.
        ep_status = mp_status_inactive.
      ENDIF.
    ENDIF.
    endmethod.
    Regards,
    Alexandre

  • Disabling 'Change' and 'Delete' buttons in Attachment List in ME52N

    Hi Friends,
    The reuqirement is this:
    A user attaches doucments ( using the Generic Object Services to attach document ) while creating/changing Purchase Requisition (ME51N / ME52N).
    Now when any user goes to see the docuemnts attached to the PR, he selects the 'Attachement List' from the context menu, he should only be able to read it and should not be allowed to change or delete the document. For this we need to disable the 'change' and 'delete' buttons from the toolbar.
    Awaiting your response.......
    Regards,
    Fawaz

    Hi,
    I have solved the issue Alhamdulillah by the foll. method:
    1. Copied CL_GOS_SRV_ATTACHMENT_LIST to ZCL_GOS_SRV_ATTACHMENT_LIST
    2. In ZCL_GOS_SRV_ATTACHMENT_LIST there is a method called: CHECK_STATUS. I overwrote with my check;
    on_mode_changed( 'D' ). --- For display
    on_mode_changed( 'E' ). --- For edit mode.
    3. In SGOS tcode, added VIEW_ATTA to point to ZCL_GOS_SRV_ATTACHMENT_LIST
    Regards,
    Fawaz

  • In Table contol,add and subtract button getting disabled.

    Hi ,
    My requirement is that in table control when user adds  more than four rows,error message will be displayed i.e maximum of 4 rows allowed.
    But after error message is displayed ,add and subtract button is disabled in table control and I am  not able to remove the rows.
    Any solution available on making add and subtract button active.
    Regards
    Nikhil

    Hi
    In PBO,
    module status_100.
    looop at itab with control tc.
    endloop.
    in program
    module status_100.
    describe table itab lines tc-lines.
    if tc-lines = 0.
    tc-lines = 4.
    elseif tc-lines > 1.
    tc-lines = 4.
    endif.
    endmodule.
    here there is no way you will get more than 4 rows at any time.
    instead of Error message you can give warning or information message. this will not disable your buttons.
    Cheerz
    Ram

  • How to add and delete content on device from iTunes

    I cannot find the way to add and delete content on my devices from the new iTunes. I don't understand why they changed the way it worked without any tutorials or hints at how to use the new iTunes app. I can see my device, I can see that music is on there, but I cannot unselect songs or content to get rid of it. Also, my apps do not show up on the apps list, I can see the screens with the apps on them and can delete them from that but the list is not working. I am using Yosemite and iTunes 12.01

    If you select your device in iTunes then on the left-hand side of iTunes you should see a Settings heading with categories below it which you can use to select what to sync from your iTunes library to the device, and below that an On My Device heading with categories below it listing what is on the device.
    For the Apps tab, the listbox of apps on my Mac's iTunes doesn't always populate until I've scrolled up/down the window. If yours doesn't populate then you have your apps downloaded and stored in your Mac's iTunes library - the listbox shows what you have in your computer iTunes library, if your library is empty then the listbox will remain empty.

  • How do I add and delete pages to a pdf document?

    How do I add and delete pages to a pdf document?

    Hi Paul,
    Adobe Acrobat has the features to add/delete/extract/crop/insert pages to your PDF files and are much more features.
    Adobe Reader has  a very limited features for editing to PDF files.
    Now you can subscribe to Acrobat Plus and see more information at https://www.acrobat.com/acrobatplus/en/home.html
    Or you can download Acrobat XI Pro for trial version from www.adobe.com.
    thank you.
    Hisami

  • My wife sign in her iphone with my icloud id and deleted my contacts form her phone, while deleted them form the cloud, can I recovered them

    my wife sign in her iphone with my icloud id and deleted my contacts form her phone, while deleted them form the cloud, can I recovered them

    Yes if you backed up your iPhone with iTunes to your Mac.  You can restore your phone to the last backup:
    Or with a iPhone backup viewer/restorer application like iPhone Backup Viewer or Mac iPhone Data Recovery. But the phone has to have been backed up with iTunes to the Mac.
    Other possible applications can be found at MacUpdate.com by searching for iPhone recovery or iPhone backup, etc.
    Change your Apple ID password so you wife can't log into your iCloud again and do the same thing.

  • How do i add and delete photos from the screensaver preference window

    How do i add and delete photos from the screensaver preference window?

    Hello, sassy4sue. 
    Thank you for visiting Apple Support Communities. 
    Here is an article that you may find helpful when creating or editing iPhoto albums that you are using as a screen saver. 
    Mac Basics: Using Screen Saver when your screen is idle
    http://support.apple.com/kb/ht2485
    Cheers,
    Jason H. 

  • Apply and delete buttons need differentiation

    How do we get the apply and delete buttons put in different locations on the info window for ical? I've accidentally deleted when I meant apply because the buttons are in the same location. Mabye delete should be at the top right.

    Richard,
    That sounds like a great idea. Be sure to submit iCal Feedback.
    In the meantime, don't forget about the iCal>Edit>Undo menu command (⌘Z).

Maybe you are looking for