Home » Developer & Programmer » Forms » How to insert the difference value
How to insert the difference value [message #148715] Sat, 26 November 2005 20:50 Go to next message
sam007
Messages: 3
Registered: November 2005
Location: INDIA
Junior Member
Dear All,

I have record having one value when i use execute trigger and change the value i also want to store the difference of two value in the database. How i can find the difference of the two values.

Sam
Re: How to insert the difference value [message #149359 is a reply to message #148715] Thu, 01 December 2005 06:10 Go to previous messageGo to next message
Atul P
Messages: 61
Registered: June 2003
Location: Mumbai-Jakarta
Member

Hi Sam


Just Make one Non-Database Item in same Block.
Then while Querying pass the Original Value to the same.
NOw Using PRE-INSERT / PRE-UPDATE you can have the Difference between the Original and the changed Value and post into your database.

Ciao
Atul P
Re: How to insert the difference value [message #149369 is a reply to message #149359] Thu, 01 December 2005 06:40 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Two words: database trigger.

Keep your Form lightweight, no needles client side coding, just one trigger on the database.

Just my 2 cents.

MHE
Re: How to insert the difference value [message #149466 is a reply to message #148715] Thu, 01 December 2005 22:59 Go to previous message
ashok_it
Messages: 40
Registered: November 2005
Location: Singapore
Member
Hi sam,

use GET_ITEM_PROPERTY(<itemname>,DATABASE_VALUE) in pre-update trigger;

hope your problem solved.


tks
ashok


Previous Topic: Creating a button
Next Topic: forms
Goto Forum:
  


Current Time: Fri Sep 20 03:26:04 CDT 2024