Trying to update a formula field of table row when a reference field is updated

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