Base: Any workarounds for table's broken `AfterUpdating` & `BeforeUpdating` events?

Whenever data in a table has changed I am hoping to update some things on a form.

For example if you add a new record, or edit an existing record then update the lookup index to reflect the changes. However because of a bug which makes the AfterUpdating & BeforeUpdating events not correctly fire, this not possible.

See: https://bugs.documentfoundation.org/show_bug.cgi?id=107839

Has anyone else run into these two broken Base events and/or figured out a way around them?

My answer below may be good enough, but I could give a more complete example if the desired result was clearer. You mentioned that it should “update the lookup index” but I am not sure what that means without further details. In a simple form, adding or removing records will change the underlying record shown for all fields.

@jimk, I can see that the After Record Action fires when any record change is made, i.e. edit, create, or delete. (And not to be confused with the similarly named After Record Change, which fires when record motion occurs, i.e. forward and backwards, etc.)

That’s good enough to get me started. Thanks very much!

Good point about the correct event name.

Instead of using events of the table control, use events of the form’s underlying record. To do this, open the Form Navigator, right-click on “MainForm” (or whatever your form is called) and select Properties.

Under the Events tab, specify a macro to run for Before record change.

See also [Solved] Confirm changes before saving record (View topic) • Apache OpenOffice Community Forum which gives validation code that calls .uno:RecUndo.