3 Replies Latest reply: Sep 24, 2013 8:40 AM by CraigB RSS

    old_new_operators_in_forms

    shabbir

      Hi everybody,

       

      is there any way or a similar criteria in oracle forms to use ":new" and ":old" operators like we use in database triggers ? these operators can not be used in oracle forms for sure, i need a similar criteria to find ":old.amount - :new.amount" thing at when validate item trigger, without saving the record at runtime !!!

       

      thanking in advance :-)

       

      ~Shabir

        • 1. Re: old_new_operators_in_forms
          Pervez-EBL

          Yes, u can use old and new qualifier only for database row trigger only.

          • 2. Re: old_new_operators_in_forms
            Soofi

            Hi Shabbir,

            As far as i know there is no way to use : old and : new in forms....

             

            Rather you can do something like this

             

            Declare

            Take a cursor of the table matching the last saved record

            Begin

             

            ..Process....

             

            end;

             

            This will do what you want...

             

            Regards,

            Soofi

            • 3. Re: old_new_operators_in_forms
              CraigB

              I think the closest thing you will find to the :OLD/:NEW operators in Forms is the Get_Item_Property('ITEM_NAME',DATABASE_VALUE) built-in.  You can compare the value returned by this built-in to the current value of the item to see if the value has changed since it was originally queried into the form.  This will only work, however, if Forms queried the value.  If you manually fetch and display a value, then this built-in will return NULL. 

              Craig...