Problem: eine berechnete Teilmaske wird beim laden der Hauptmaske angezeigt. Man kann aber nicht durch Änderungen von Feldwerten innerhalb der geladenen Maske dadurch eine andere Teilmaske laden, ohne das Dokument zu verlassen und wieder hineinzugehen.
Lösung? Bisher allg. keine bekannt. Nun bin ich auf das gestoßen:
Quelle:
http://d.dominodeveloper.net/members/ampersand/home.nsf/0/F8CD9853F80FCD7B88256C69002A7114?OpenDocumentShow or hide a subform from inside a form
Francesco Sarzana Ever used a "Computed Subform" in your form to show a chunk of data, and want to change or hide this subform from INSIDE the form (without exiting and reloading the form)?
This tip is useful if you want subforms loaded or not (or different subforms loaded) based, for example, on an environmental variable, and change them on-the-fly with an action bar on the form itself.
Code
Here's how to do it:
Open the form "myForm"
Create a Computed Subform with the formula:
@If(@Environment("myVar") = "Y" ; "Sub1" ; "Sub2")
Create two Actions with the following formulas, respectively:
"Show Sub1"
@Environment("myVar" ; "Y");
@Command( [ViewSwitchForm] ; "myForm" )
and "Show Sub2"
@Environment("myVar" ; "N");
@Command( [ViewSwitchForm] ; "myForm" )
Now you can open the form "myForm" and click on the two action buttons to switch between the two subforms, or you can substitute "Sub2" with "" in the Computed subfrom formula to toggle between hide/show of Sub1 subform. Be sure to switch to the SAME form (myForm)!
This option for hide/show of chunks of data is much more efficient than having a section with hide-when formulas, because the section is ALWAYS loaded and THEN hidden, while a Computed Subform is NOT loaded if the formula results in a blank string. If Sub1 contains, for example, an embedded view, you can imagine the performance improvement...