Greetings. We are pleased to have matched some work to this great tool.
The docs identify these Form events:
onhide()
onkeypress(event)
onshow()
onsubmit()
What about an onload() event?
I need to make several service calls to retrieve data and load into controls. For now, I will put those in onshow(), but, I only really want to do that once, not every time I ChangeForm back to the form. ?
@FrankR, you’re correct, there is no Form onload() event (nor unload()).
What I do is put it in the form’s onshow() function, so it only gets run the first time it is called:
Form1.initDone = false;
Form1.onshow() = (() => {
if (Form1.initDone === false) {
// do my form load stuff
Form1.initDone = true;
}
// do my form show stuff
)}
The best place for this is on the form’s code window.