Yes you are right, its working when I save the record. Still my requirement is updating the value before save.