Hi,
Is there a way to check if a form is already loaded or not ?
Regards,
Hi,
Is there a way to check if a form is already loaded or not ?
Regards,
shouldn’t that be in History?
if ("formName" in forms) {
}
Paul
but that would be true for any form in the solution, loaded or not, no?
if it helps you: the onShow event of a form has a boolean that indicates whether or not it’s the first time show after a load.
Don’t know if this information is too late for you (code-wise)
you’re right Patrick.
The code from Paul always returns true if the form exists.
It does not look at the “loaded state”
but it should be in the history stack…
Close,
The current form is loaded, but it is not in history,
but I can add that to my own check.
Thanks Patrick.
That code snippet I posted checks the forms array, which contains the actually loaded forms. If you want the full list of forms, you have to go through forms.allnames.
Note: the forms array is special, in the way that when you would do forms.nameOfNotYetLoadedForm, it automatically starts loading the previously not loaded form.
Paul
Ah, right!
+1
Thanks Paul
Hi Paul,
Has something changed ?
if (_inForm in forms)
Now returns forms that the user has not visited yet.
This is in 5.2.15
Regards,
Hi Hans,
No, nothing should have changed. I haven’t tested this in 5.2.x, but in 7.x it still works as advertised.
I can’t realy believe it would’ve stopped working though. Are you sure you’re testing it ok?
Paul
Paul,
Thanks !
Will do some more testing and I’ll get back on this.
Regards,