Add an update button

Hello everyone!
I am using Oracle Forms 6i and here is my problemm..
I am trying to add a button in my forms that will update records in my table.
For example I have one datacolumn "TYPE_OF...", in my forms I made an ListItem for this column where I choose the type.
I made a recordGroup to automaticaly populate this item and everything works just fine.
Now when I press this button of mine (I named it "Change") I want to update my record and save it with the different type that I choose after saving the record first and the previuos record with the "old" type must be erased (not to have both records afterwards).
I started like this:
1. Made an alert (named "SPR") that will ask me when I press the button if I am sure that I want to change that record.
2. Alert have two buttons "Yes" and "No"
3. When I click on "Yes" my record is updated else nothing happens
Here is the CODE that I wrote in WHEN-BUTTON-PRESSED trigger (It doesn't work, normally, because I am quite new in PL/SQL programming):
DECLARE
     a NUMBER;
BEGIN
     a := SHOW_ALERT('SPR');
         IF a = Alert_Button1 THEN
          UPDATE My_Table (in my case name of the table is DOKUMENTI_GLAVA_UV - it's in Slovenian and it means Documents_Head)
          SET TYPE_OF.. (my case VRSTE_TEMELJNICE - means type of journal) = :D.TYPE_OF..; (my case - D is name of the block)
         ELSE
              RAISE FORM_TRIGGER_FAILURE;                  
  END IF;           
END;It gives me error and says that My_table must be declared.
All I want is the CODE for my trigger and some advice if I make something wrong or I am trying to do something that it can not be done that way.
Thank you!

First of all, Thank you!
I don't have anymore the problem with "DOKUMENTI_GLAVA_UV must be declared", I saw that I have to be signed in one another application that uses this form, so that is not an issue anymore.
Now I made one another block that is not database block, add in that block some display items that will copy my type of "VRSTE_TEMELJNICE" and beneath that item, I add ListItem on which I defined RecordGroup where I can choose my new type. I also add two buttons on this block where one is "Cancel" and the other is "OK" which means if I press on "OK" I want to change the type.
Just to answer on your question the D block is a database block but I have to do this because the item "VRSTE_TEMELJNICE" is unupdatable (update allowed is set to NO) and it has to be that way, so I can not just let forms to update the record.
So.. let's return on my issue. If I press on "OK" button my alert shows up and if I press "Yes" my record is updated.
The name of my displayItem is "IZVT", of listItem is "NAVT". I hope you can get the picture, if not, just tell me what is unclear and I'll try to explain.
So, I still need the CODE for my trigger on the "OK" button.

Similar Messages

  • What happened to the add on update button?

    Previously the help tab would show an update feature for add-ons,
    what happened to that service?

    If you open Tools > Add-ons, you can check for updates using the "gear" icon. I'm not sure if that works exactly the same, but it's the only one I know of, besides the plugincheck site.

  • How do i grab datalist ID and add it to button onclick to update that item

    Hi, I have pulled over some data from my sql server 2012 in VB C# DataList view. I would like to add a custom button to each item that will allow me to delete an item from the database and also update a database column onclick. EG: Update the paid (bit)
    column to 1 when the paid button is clicked. Here is what i have so far as i am new at this:
    my aspx page:
    <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    </asp:Content>
    <asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server">
    <asp:DataList ID="dlActiveBills" runat="server" DataSourceID="SqlDataSource1">
    <ItemTemplate>
    Amount:
    <asp:Label ID="AmountLabel" runat="server" Text='<%# Eval("Amount") %>' />
    <br />
    DateReg:
    <asp:Label ID="DateRegLabel" runat="server" Text='<%# Eval("DateReg") %>' />
    <br />
    Deadline:
    <asp:Label ID="DeadlineLabel" runat="server" Text='<%# Eval("Deadline") %>' />
    <br />
    Notes:
    <asp:Label ID="NotesLabel" runat="server" Text='<%# Eval("Notes") %>' />
    <br />
    Name:
    <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
    <br />
    <br />
    <asp:Button id="btnPaid" runat="server" Text="Paid" Commandname="update" />
    </ItemTemplate>
    </asp:DataList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ProjectConnectionString %>" SelectCommand="SELECT
    d.Amount,
    d.DateReg,
    d.Deadline,
    d.Notes,
    r.Name
    FROM
    Details d
    LEFT JOIN
    ReminderTypes r
    ON
    d.ReminderTypesId = r.ReminderTypesId
    WHERE
    d.Paid = 0"></asp:SqlDataSource>
    </asp:Content>
    my aspx.cs page
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data;
    using System.Data.SqlClient;
    public partial class active_bills : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
    protected void MainContent_dlActiveBills_btnPaid_0_Click(object sender, EventArgs e)
    string dbConnection ="Data Source=somthing;Initial Catalog=somthing;Integrated Security=true;";
    SqlConnection sqlConnection;
    sqlConnection = new SqlConnection(dbConnection);
    sqlConnection.Open();
    SqlCommand cmd = new SqlCommand();
    cmd.Connection = sqlConnection;
    cmd.CommandText = "UPDATE Details SET Paid = 1 WHERE DetailsId = ?";
    cmd.ExecuteNonQuery();
    sqlConnection.Close();
    This doesn't work but can it be done in this way somehow?

    Hi irishwestman,
    Thank you for posting in MSDN forum.
    Since this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help
    System, and Visual Studio Editor.
    Based on your issue, it is related to the ASP.NET, so I suggest you can post this issue directly to the ASP.NET forum:http://forums.asp.net/
    you will get better support.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Code for  single button which acts for add,find,update

    I have created one btns- (acting for add,find, update etc having same unique id )using VB.NET code.I want to write code according to the captions of the button...I mean for diff caption of the btn , diff action should perform?
    So , plz anyone tell me how to code for it using VB.NET(for Business One)
    Thnxs in advance..
    Chetan

    Chetan,
    You have posted your question in the SAP Business One integration for SAP NetWeaver forum.  Your question relates to the SAP Business One SDK and you need to post your question in the SAP Business One forum.  You should get a response by posting it in that forum.
    Eddy

  • ITunes 10.6.1 Update button for iOS update does not work (a bug)

    iTunes 10.6.1 Update button on iOS device Summary / Version page does not update devices. It only checks the iTunes version!
    With iTunes 10.6.1, connect an iPad, iPhone, iPod running pre-6 iOS version.
    On iPad Summary / Version page, next to  [Update] button the message says:
    "A newer version of the iPad software is available (version 6.0). To update your iPad with the latest software, click Update."
    However, clicking the [Update] button will not start update iPad. Instead it gives you a dialog saying:
    "This version of iTunes (10.6.1) is the current version".
    Obviously it should start updating the i-device there but instead just goes and check the iTunes version ?!?
    A Bug!
    What's really annoying in this bug is that it's the only way to update pre iOS 5.x devices, which is now impossible!
    Apple should get this fixed asap!
    Anyone found any workarounds?
    [Edit]: There seems to be another discussion of this issue already:
    https://discussions.apple.com/message/19671173#19671173

    Just forgot to add, yes, I know there's iTunes 10.7 but it's only available on Snow Leopard and higher.
    The machine in question is an old macbook, running Leopard (10.5.8), that it will propably never get upgraded.
    Since most  my older i-devices were initially synced with that particular machine, I'll be now stuck with iOS updates, without loosing content.

  • How do I change the behaviour of an update button.

    I have a variable - $UpdateFlag, which contains a string and updates a table with it on the click of the update button.
    The problem I have is that if the string is blank, I don't want to update, and I want the button to exit instead.
    here's the code. At the moment the button does nothing if $UpdateFlag is blank.
    How do I change the behaviour of the button so that it can update or exit based on $UpdateFlag?
    <?php
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1") and $UpdateFlag !='' ) {
      $updateSQL = sprintf("UPDATE offer SET status=%s WHERE offer_id=%s",
                           GetSQLValueString($UpdateFlag ,"text"),
                           GetSQLValueString($_GET['offer_id'], "int"));
      mysql_select_db($database_guitarswap_db, $guitarswap_db);
      $Result1 = mysql_query($updateSQL, $guitarswap_db) or die(mysql_error());
      $updateGoTo = "Member2.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
        echo OK;
      header(sprintf("Location: %s", $updateGoTo));

    Add an else statement to do what you want if the flag is empty.
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1") and $UpdateFlag !='' ) {
      $updateSQL = sprintf("UPDATE offer SET status=%s WHERE offer_id=%s",
                           GetSQLValueString($UpdateFlag ,"text"),
                           GetSQLValueString($_GET['offer_id'], "int"));
    mysql_select_db($database_guitarswap_db, $guitarswap_db);
      $Result1 = mysql_query($updateSQL, $guitarswap_db) or die(mysql_error());
    $updateGoTo = "Member2.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
        echo OK; // <-- This will cause a parse error
      header(sprintf("Location: %s", $updateGoTo));
    } else {
      //do something else
    Note that your echo statement will cause a parse error. OK is a string, and should be in quotes. Also, it will prevent the redirect from working.

  • Problem w Plug-in Check page: the "Update" button for my outdated version of the WMP plugin does not do anything, and no link is indicated in the status bar when I mouse over the button.

    In Firefox, I select Tools > Add-ons > Find Updates. The Plugin Check page comes up in the browser. The entry for the WMP Plugin indicates it is out of date. I click on the "Update" button and nothing happens. When I mouse over the button, no link is indicated in the status bar (it continues to read "Done").
    The entries for the other plugins indicate they are current. When I mouse over the "Up to date" button for each of those entries, a link is indicated in the status bar.
    I am running Windows XP SP2 on a 2005 Dell Inspiron 6000 (1.6 GHz Pentium M processor, 590 MHz bus, 504 MB RAM). I have Norton Internet Security 2010 installed and running.

    See:
    * http://kb.mozillazine.org/Windows_Media_Player#Missing_plugin
    * http://windows.microsoft.com/en-US/windows/downloads/windows-media-player (see Firefox)
    * http://port25.technet.com/pages/windows-media-player-firefox-plugin-download.aspx

  • 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

  • Earlier versions had a Update button to refresh displayed information Where is that button on v. 4.0.1?

    Earlier versions had a Update button to refresh displayed information Where is that button on v. 4.0.1?

    See [[Site Identity button]]
    You can reinstate the padlock by installing this add-on: https://addons.mozilla.org/en-US/firefox/addon/padlock-icon/?src=discovery-learnmore

  • "Add to bookmarks - button" for application with application alias

    How to make "add to bookmarks - button" to login page of the application with the application alias?
    The idea is to ensure that end-users are storing the application alias to bookmarks rather than the direct link to application id which might change.
    rgrds Paavo

    Jari, here are some of my trials hosted now in apex.oracle.com. All url's to be bookmarked are "hardcoded" in to the login page html-header's javascript function.
    Sample db application - url with workspace name.
    http://apex.oracle.com/pls/apex/f?p=COM_ORACLE_APEX_PRODUCT_PORTAL:LOGIN:0&c=PAAVO_POC
    - the LOGIN alias defaults to login page
    - the session id is = 0 as recommended here: http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/concept_url.htm#HTMDB03020
    - workspace name is actually Internal in the administration so omitting workspace name leads to error " Error The application alias "COM_ORACLE_APEX_PRODUCT_PORTAL" can not be converted to a unique application ID. ", perhaps other workspaces have also the same sample app alias
    - so used the PAAVO_POC as workspace name (got it during registration)
    - LOGIN page HTML-header is:
    <script type="text/javascript">
    function bookmark()
    window.external.AddFavorite("http://apex.oracle.com/pls/apex/f?p=COM_ORACLE_APEX_PRODUCT_PORTAL:LOGIN:0&c=PAAVO_POC","COM_ORACLE_APEX_PRODUCT_PORTAL in ws paavo_poc");
    </script>- LOGIN page HTML Body attribute is:
    <form>
    <input type="button" onclick="bookmark()" value="Bookmark me">
    </form>- tried to also add "Click here to bookmark me" button in the login region with the following code (couldn't figure out how to do button for this via apex developer)
    <form>
    <input type="button" onclick="bookmark()" value="Click here to bookmark me">
    </form>- login doesn't work anymore
    Copy of the same sample application but with more different / more unique alias and without the "Click here to bookmark me" button in the Login-region.
    http://apex.oracle.com/pls/apex/f?p=paavos_product_portal:LOGIN:0&c=PAAVO_POC
    - the bookmark could be stored without workspace name, but it might break if the same app. alias name appears in some other workspace http://apex.oracle.com/pls/apex/f?p=paavos_product_portal:LOGIN:0
    - login works now because no hassling with the button-code in the Login-region :)
    Then fresh new application with the following URL's and with the same symptoms.
    http://apex.oracle.com/pls/apex/f?p=POCTEST_NO_B_BUTTON:LOGIN:0&c=PAAVO_POC
    http://apex.oracle.com/pls/apex/f?p=poctest:LOGIN:0&c=PAAVO_POC
    - Enter with "demo" and "ApexIsGood". Please don't kill my workspace with lots of 'fishes' :).
    It would be good to have the URL constructed dynamically e.g. fetching the application_alias_name and the correct workspace to be used.
    In perfect world it would also be good to have feature in for redirecting the user from old version to production 'application alias' with dynamic action requesting the user to update his/her bookmark.
    But as said I am bit stuck ..
    rgrds Paavo
    Edited by: paavo on Apr 7, 2012 3:20 PM
    Edited by: paavo on Apr 10, 2012 4:05 PM

  • Firefoz 35.0.1 would not update shockwave by clicking update button

    Add-on manager page for Shockwave Flash states that shockwave flash 16.0 r0 is vulnerable and blocked. Update Now button is highlighted. When update button is clicked it displays https://blocklist.addons.mozilla.org/en-US/firefox/blocked/p178 this page and shockwave flash remains not useable. I have update the windows 7 adobe flash player with no effect.
    Same scenario happens when I try to update VLC web plugin.
    Thank you for help in advance.
    -Said

    Hello, 16.0.0.287 is vulnarable, try the latest 16.0.0.296 from the next link : https://www.adobe.com/products/flashplayer/distribution3.html
    thank you

  • QuickView is great - except for the "add to iPhoto" button

    Is there any way to get rid of that "add to iPhoto" button in the Finder's QuickView?
    We have no use for iPhoto but we keep accidentally hitting that button instead of the "Full Screen" button. Then we have to wait while iPhoto launches, then wait again while we quit it.
    I thought of trashing iPhoto (after archiving it) so it doesn't launch but i'm sure some system update is going to freak out when it can't find the iPhoto bundle.

    Notary Sojak wrote:
    Is there any way to get rid of that "add to iPhoto" button in the Finder's QuickView?
    no, there is no way to do that.
    We have no use for iPhoto but we keep accidentally hitting that button instead of the "Full Screen" button. Then we have to wait while iPhoto launches, then wait again while we quit it.
    I thought of trashing iPhoto (after archiving it) so it doesn't launch but i'm sure some system update is going to freak out when it can't find the iPhoto bundle.
    no, deleting iphoto is completely safe. you don't have to have it at all.

  • UPDATE button in the Data Control Palette and CREATE,SUBMIT,COMMIT

    JDeveloper 10.1.3
    I created a simple JSP page. It is based on a ViewObject that ties directly to a Person Table.
    two questions:
    1) I noticed in the "Data Control Palette" doesn't have the UPDATE operation... How do I do an UPDATE?
    2) to Create a Person through my new form I had to do the following steps in the Web Page: HIT CREATE BUTTON, ENTER DATA, HIT SUBMIT BUTTON, HIT COMMIT BUTTON.
    Seems like a lot of steps to simply create a record - is there a simpler way (using the JSP page, not JHS or JSF..etc).
    Thanks!

    1) my edit form is pre loaded with a record, since it is based on a parameterized view and I had to modify the pagedefs for that edit page to have the proper binding and action. It is setup to receive the PID in the request and set the value to the bind variable. This works fine to pull up the record. I then have the buttons that I dragged and dropped onto the screen: Submit (came with the drag-drop of the parameterized view), Create, Execute, Commit, Rollback. When I preload the right person into the form (by calling edit_person.jsp?pid=1), and then change the name (for example), I would have suspected that if I hit Submit that the Commit button would be enabled.. but it isn't. if I remove the part that disables the Commit button, then the Commit button doesn't work...
    2) I am in 10.1.3, and if I drag the commit over to the "Submit" button it doesn't take...it wants to add the new button to the right or left of the "Submit" button....

  • Weird thing about when user click Update button

    Hi,
    I got a very weird thing when i want to add some my code in button "1" on click event. I use below code to capture the on click event when user click "Update" button, so i can do some tasks(assign some fix value to a specific field). I found i can capture the event only once. Once the document is updated and i open second recordl then my code is never exexuted then. No error, no exception. Is anyone know what happen?
    Thanks,
    Lan

    Hi All,
    Yes, you are right. After i use try block, i can see the error. I thought I should be expected an red exception alert in the B1 info bar.
    Thank you !
    Lan

  • How to find the API for "update" button

    Hi,
    I have a jsp page in JTT(JTF) framework on which an UPDATE button exists.
    I want to add two more fields and the data in those also must be updated to the database.
    So for this i need to find the API which the Update Button calling.
    Please guide me how to find the API.
    The below is the code segment for the Update button.
    function xsubmitForm(){
    //alert("oldStatusCode is " + "<%=oldStatusCode%>" );
    var newStatusCode = getElementValue( document.forms['<%=asfPage.getHTMLFormName()%>'].elements['<%=PageWebBean.makeName(oppCloseForm.getSectionName(),PageWebBean.OBJ,"statusCode")%>']);
    //alert("newStatusCode is " + newStatusCode);
    if (( "<%=openStatusFlag%>" == "Y") && ( newStatusCode == "<%=oldStatusCode%>"))
    if (confirm(<%=MessageUtil.getMessageJSVar(asfPage, "ASF", "ASF_OPP_STATUS_OPEN")%>))
    doAsfAction('<%=asfPage.getHTMLFormName()%>', 'UPD');
    else
    doAsfAction('<%=asfPage.getHTMLFormName()%>', 'UPD');
    Best Regards,
    Venkatesh
    Edited by: Palepu on May 17, 2010 12:22 AM

    Hi,
    Post your question in "Technology - OA Framework" forum for a better/faster response.
    Technology - OA Framework
    http://forums.oracle.com/forums/category.jspa?categoryID=3
    Thanks,
    Hussein

Maybe you are looking for