How to add custom attributes to a LO Base form

I have a form and wrote some macros to perform actions based on certain form events.

Now what I want to achieve is store the value of a calculation performed in a form control’s “Before Update” event to be reused in the form’s “After Record Action” event.

This is not data I want to store in the underlying database. It’s more like state information to carry around to make informed decisions in various phases in the form’s life cycle. As soon as the form closes, this state information can be forgotten.

My thought was to add some custom property or attribute to the form control object or form object and set or query that property as needed. Is something like that possible ?

If you use macros then tou can try declare Global variable.

Or you can create hidden control in form (popup menu in Form Navigator)

HiddenControl.png

Oh, great!
I didn’t realize global variables would persist across macro calls. This opens up a whole lot of opportunities.
Thanks a lot!