Thanks a lot Lynn. This gives a very useful clue for other use cases. However, I need to have the action to be triggered at the discretion of the user. Thus I am afraid I need a button for the user to click when needed.
To be specific; this is an accounting journal voucher entry. The record set has a parent row in table header, and x number of child rows referenced to the parent. The child rows will have debit and credit entries. The user may click the action button on a form entering a child record and equalize the totals of debit and credit entries by updating the related column with the difference of debit and credit totals of the previous rows of the child records of the same parent. Hope this clarifies what I am trying to do.
Thanks once again and Cheers,