Get back old values into Form Building Application

I have a database trigger that raised an error message when a record is no allowed to change/update. I would like to know how I go back to the old values and reflect these into my application.
I use Oracle Forms Building Version 9.0.2.10.1 (Production) under Window XP system. Below is the database trigger code:
CREATE OR REPLACE TRIGGER "DBDSCHM".AAPT_REVIEWS_BUR
BEFORE UPDATE ON AAPT_REVIEWS
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
DECLARE
Aaap_approved          EXCEPTION;
BEGIN
IF (Aapfn_List_Items_Desc(:OLD.AREV_STATUS) = 'APPROVED' AND
:OLD.AREV_CREATED_BY = 'AAPTRF' AND
               :OLD.AREV_MODIFIED_BY = 'AAPTRF') THEN
RAISE Aaap_approved;
END IF;
EXCEPTION
WHEN Aaap_approved     THEN                                                            RAISE_APPLICATION_ERROR(40509,'This Review cannot be modified. '||
     'AAP Approved prior to Conversion');
END aapt_review_bur;
SHOW ERROR

Thanks John, but the proposed of this trigger is to prevent any user to update the records that were loader prior to the Data Loader. That is the reason that this trigger has a condition to compare the old value with the new value. Please, see the syntaxes below:
CREATE OR REPLACE TRIGGER "DBDSCHM".AAPT_REVIEWS_BUR
BEFORE UPDATE ON AAPT_REVIEWS
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
/* This trigger prevents to modify any AAP review */
/* that was already approved PRIOR TO THE Conversion.*/
BEGIN
IF (Aapfn_List_Items_Desc(:OLD.AREV_STATUS) = 'APPROVED' AND
(:OLD.AREV_CREATED_BY = 'AAPTRF') AND (:OLD.AREV_MODIFIED_BY = 'AAPTRF')) THEN
RAISE_APPLICATION_ERROR(-20090,'This Review cannot be modified. AAP Approved prior to Conversion');
END IF;
END aapt_review_bur;
What I really want is that when the above trigger fire and the user receive the raise application message meaning that the user could not updated the record. But the wrong value still show on the form and it will keep getting this error until you put back the previous value. What I really want is to be able to raise the application error and to show back any values that were tried to modify.

Similar Messages

  • How to get the old value of the ValueChangeEvent

    I'm using the JSF component selectManyListbox. I have assigned a value change listener to it. When I try get the old value using getOldValue() of the ValueChangeEvent Im always getting a null value. The only value Im getting is from the method getNewValue(), which is the last item I clicked in the selectManyListbox items before submitting the whole form. Is there a way to get the old value of this component or Im doing something wrong?

    Here is the partial bean code
    public class TestUI extends PageCodeBase {
         private static Logger logger = Logger.getLogger(pagecode.protected1.TestUI.class);
         protected Object [] menuValue;
         protected Object [] listBoxValue;
         protected List allTaskCodes;
         * @return Returns the listBoxValue.
         public Object[] getListBoxValue() {
              return listBoxValue;
         * @param listBoxValue The listBoxValue to set.
         public void setListBoxValue(Object[] listBoxValue) {
              this.listBoxValue = listBoxValue;
    public void handleSelectManyListboxValueChange(
                   ValueChangeEvent vce) {
              logger.debug(".. first component was heard..");
              String[] s1 = (String[]) vce.getOldValue();
              String[] s2 = (String[]) vce.getNewValue();
              //vce.getComponent().
              if (s1!=null&&s1.length!=0) {
                   logger.debug("length of first array is " + s1.length );
              //for(int i=0; i<s1.length; i++)
                        logger.debug("value of old is " + s1[0] );
              if (s2!=null&&s2.length!=0) {
                   logger.debug("length of second array is " + s2.length );
                   //for(int i=0; i<s1.length; i++)
                        logger.debug("value of new is " + s2[0]);
    Here is the jsf code
    <h:selectManyListbox styleClass="selectManyListbox" id="listbox1"
                        size="3" valueChangeListener="#{pc_TestUI.handleSelectManyListboxValueChange}"
    onchange="submit()" value="#{pc_TestUI.listBoxValue}">
    <f:selectItem itemValue="value1" itemLabel="select1" />
                        <f:selectItem itemValue="Value2" itemLabel="select2" />
                        <f:selectItem itemValue="Value3" itemLabel="select3" />
    <f:selectItem itemValue="value4" itemLabel="select1" />
                        <f:selectItem itemValue="Value5" itemLabel="select2" />
                   </h:selectManyListbox>

  • Call a webservice and get back a value within an ESB...

    Hi!
    I'd like to call a webservice and get back a value from it within an ESB. But I don't know how.
    I think, I must create a routing service, then a SOAP service, but how can I get back the value from the webservice, which I called in the SOAP service?
    Or it is not possible to realize this within an ESB?
    Thank You very much!
    Viktor

    When you take a look at the Soa Orderbooking example you can see how it works. You create a webservice that accepts certain parameters and these are bundled into an object. This object, in case of the Soa Orderbooking example a 'PurchaseOrder', is described using an Xml Schema. The XML Schema is used to create the ESB with. Using this xsd the ESB knows which object it can expect and this object can be used inside your ESB or inside a bpel process.

  • Excel 2010 VB How do I get the old value of a changed cell?

    HI,I am tracking changes made to an unshared spreadsheet and the VB code below appears to be working well, but how can I modify the VB code to get the old value of the changed cell also?Private Sub Workbook_Open()
    Sheets("LogDetails").Visible = xlSheetVeryHidden
    End Sub
    Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
    On Error Resume Next
    If Sheets("LogDetails").Visible = xlSheetVisible Then
    Sheets("LogDetails").Visible = xlSheetVeryHidden
    Else
    Sheets("logDetails").Visible = xlSheetVisible
    End If
    Target.Offset(1, 1).Select
    End Sub
    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    If ActiveSheet.Name "logDetails" Then
    Application.EnableEvents = False
    Sheets("LogDetails").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Value = ActiveSheet.Name & "-" & Target.Address(0,...
    This topic first appeared in the Spiceworks Community

    char s = '\u0153';
    int i = (int)s;
    System.out.println(Integer.toHexString(i));This works for a single character. For a String, use toCharArray() and loop through every character.
    String s = "SomeString";
    char[] c = s.toCharArray();
    for (int i = 0; i<c.length;i++) {
      System.out.println(Integer.toHexString((int)c));

  • My old computer crashed, and down with it went my itunes library. How do I get my old library into my new library (on my new mac) ?

    My old computer crashed, and down with it went my itunes library. How do I get my old library into my new library (on my new mac) ?

    did you back up your music to another hard drive? if not, the only music you can get back is purchased music from i tunes. 

  • Ok, so I transferred my 3S info to my 4S by restoring from an old phone backup.  But SIRI is gone and god knows what else??  Can I get my old stuff into the new phone and keep the 4S new functionality?

    ok, so I transferred my 3S info to my 4S by restoring from an old phone backup.  But SIRI is gone and god knows what else??  Can I get my old stuff into the new phone and keep the 4S new functionality?

    I suspect unless he had some items in iCloud backup then they are gone.  Connecting an iPhone to a different library from that to which it was previously connected will result in the device asking if you want to erase it.

  • How to get the section value into configurator developer page

    Hi,
    I am working on configurator developer, Can I get the section value into the configurator developer page by any setup. If possible means please help me on that.
    Thanks advance,
    Gopi

    I thought the same.Thanks for confirming...I tried with loop approach.but i am unable to get decimal part...
    eg if my values are 12.25 and 123.12....my below code ignores decimal points..i know since i am using Number, it is happening..but could you please let me know how can i get decimal values also..
    OAViewObject vo = (OAViewObject) am.findViewObject("XXXXInvDistributionsVO1");
    vo.first();
    Number grossamount = 0;
    for (int i=0;i< vo.getRowCount();i++) {
    // BigDecimal grossamount1 = new BigDecimal((vo.getRowAtRangeIndex(i).getAttribute("Amount")));
    grossamount = ((oracle.jbo.domain.Number)vo.getRowAtRangeIndex(i).getAttribute("Amount")).intValue();
    System.out.println("grossamount "+grossamount); // it ignores and prints decimal points
    BigDecimal grossamount1 = new BigDecimal(grossamount.intValue());
    System.out.println("grossamount1 "+grossamount1); // it ignores and prints decimal points
    vo.next();
    Thanks
    Raj

  • Error in XML form builder application

    Hi SDN,
    I have created a form builder application. I am able to create items from the application. But when i try to edit or delete the item...From the edit option if I try to save or preview or cancel or reset ....it is throwing the following error message
    Runtime Error
    An exception occured while processing the request.
    Additional information: Exception during PageProcessorComponent.doContent()
    Exception ID = a0d623c1-d35e-2b10-8ab7-f6c10479e59b
    How to rectify the following issue....
    Regards,
    Ganesh N

    Hi,
    I have also encountered this problem the first time I did XML form builder.
    A simple restart of my portal solved the problem.
    Fabien.

  • How can i get this variable value into second page IN BSP

    Hi friends
    I have variable wk_matnr value 'ABC' in first page of BSP.
    How can i get this variable value into second page.
    Moosa

    Hi,
    you can define variable (page attribiue) on the second page with the same name. You can realise the Navigation with Button ther started onInputProcesing routine. In onInputProcesing you have to call navigation->set_parameter with attribut name as parameter and then starting the navigation. If you have checked the auto property on the variable on second page and varable have same name, the value of variable should be transported.
    [See this tutorial|http://help.sap.com/saphelp_erp2005/helpdata/DE/1a/c5133a62983c0ae10000000a114084/frameset.htm]
    Best regards
    Bogdan

  • Place  value from Forms building in the collection Render Settings.

    Hello,
    I build a XML form with Forms builder. In one field you can select a <b>project-date</b>. Is it possible to export the  the value of this field in a LayoutSet? 
    I used the standay LayoutSet <b>ConsumerExplorer</b> and would like to place the field <b>project-date</b> in this LayoutSet.
    I think you have to do this in the <i>Collection Renderer Settings -> Collection List Renderer Settings -> Displayed Properties.</i>
    The extra code that a placed in the Displayed Properties is: rnd:app_date(contentLink.)But still it is not working.
    Can someone help me with this or send me a link.
    Greetings,
    GM
    Message was edited by: Gema

    Yes thanks Francois, I know perfectly well how dispatchCustomEvent() and WHEN-CUSTOM-ITEM-EVENT works, but please read the full context to understand what it is, that I actually ask about. Maybe a modification of your code (which is not possible in reality) can better demonstrate what I try to do.
      private void dispatchErrors(String message)
        log(message);
        try{
          CustomEvent ce = new CustomEvent(m_handler, THE_TAG_CODE);
          m_handler.setProperty(THE_TAG_CODE,message);
          returnValue = dispatchCustomEvent(ce);
          System.out.println(returnValue);
          catch (Exception e)
            e.printStackTrace();
      }In Forms
    DECLARE
       eventName varchar2(30) := :system.custom_item_event;
       eventValues ParamList;
       eventValueType number;
       tempString varchar2(100);
       returnValue varchar2(200);  
    BEGIN
       IF (eventName='THE_TAG_CODE') THEN
          eventValues := get_parameter_list(:system.custom_item_event_parameters);
          get_parameter_attr(eventValues,'THE_TAG_CODE',eventValueType, tempString);
          select 'Returned from Forms ' || tempString
              into returnValue from dual;
          return_value_to_java(returnValue);
       END IF;
    END;Result: the Java console prints "Returned from Forms" + the parameter sent from Java originally.
    Does that make it more clear?

  • How can I get back old issues from my TIME app?

    Hi, I hope someone can help me.  I've been trying to get help for a month now.  I had purchased several issues from TIME app but when I just got my ipad 2, I couldn't get the issues back.  I used the same ID and password.  I decided to try buying a new issue and when I did, I had an email from itunes warning me that it was not my usual ID.  I am very confused.  I wrote to TIME and they say I should contact itunes.  I have spent hours trying to contact itunes for help.  They seem uncontactable.  Can someone please tell me if I can somehow get my old issues back?
    Karen

    If they were not backed up or part of photostream, then no, you cannot.

  • I pulled the bookmarks html file off of my computer after it crashed, and am trying to get my old bookmarks into firefox. How does one do that?

    When my computer crashed, we managed to recover a bunch of the files and information from it. One of the files we pulled was the bookmarks.html from the firefox folder. The computer was running on Vista when it crashed, and I now have it running 7 Professional. The file is recorded as a Chrome html file on the new computer, and when I click on it, it pulls up a basic html page within Chrome or firefox that has links to the firefox website (kind of like a webpage version of the bookmarks folder from the toolbar, but without any of the bookmark adding capabilities). I'd like to get my old bookmarks loaded into firefox. Help?

    Firefox hasn't used the '''bookmarks.html''' file for storing bookmarks since the Firefox 2 versions, in 2008. Later versions use '''places.sqlite''' for bookmarks and history. What you have is the default file that Firefox uses on new installations and new Profiles, which has like 6 bookmarks.
    If you still have access to that old hard drive, see this for help: <br />
    http://support.mozilla.com/en-US/kb/Recovering+important+data+from+an+old+profile

  • How to check old value in form personalization.

    Hi All,
    Could anybody please tell me how to check the old value in oracle forms using form personalization if someone is updating to someother value.
    For example.
    My Vendor Site Alternate name is XYZ
    and someone has changed it to ABC, How could i check the old values before or after doing updates.
    I don't want to write trigger for this.
    Thanks & Regards,
    Vishwas

    Pl see if the solution in this thread can help - Re: Capture who changed data using Forms Personalization & changed to what
    If not, pl see old threads that discuss forms personalization
    http://forums.oracle.com/forums/search.jspa?threadID=&q=forms+AND+personalization&objID=c3&dateRange=last90days&userID=&numResults=15
    HTH
    Srini

  • Get back old Photo Booth effects?

    Is there anyway to change the given effects in Photo Booth and get some old ones back? Or do I just downgrade PB in general?

    If you are not running Lion, you probably won't have these new effects. Lion comes with some cool new features like full screen Photo Booth, or new Photo Booth effects. If the person who posted the pic was your friend or family member, just ask them how they got those effects.

  • How to get back a discarded changelist in mobile application studio

    Hi!
    Like i've written in the subject ... Is it possible (how?) to get back a discarded changelist?
    Or... If not... to get back the content of the changelist?
    I'm using sap crm 4.0 (mobile sales).
    Thanks for any hint or help!
    Cheers,
    Ingo

    Hi,
    the table changelist doesn't contain the changes directly but they are included in several tables which have a reference to the CL table. So it would be very tricky to get all these objects.
    As I already mentioned directly the best way would be to restore a backup of the ARS_DB (if existing...) additionally to the current one, create another ODBC source and open MAS with this DB. Then check all the included objects, copy the changed code to notepad, reopen with the current ARS_DB and redo the changes in a new CL.
    Regards,
    Wolfhard

Maybe you are looking for