Collapsing an Embedded View on a Page or Form Workaround

Author: Tripp W Black

Created: 01/23/2003 at 04:02 PM


Notes Developer Tips
Forms/Subforms, Bugs/Workarounds

Create a form
Create a view with the first two columns showing categories. Make the view auto-collapse when first opened (view properties).
Create an embedded view with a key to choose a single category.

The categories will display expanded rather than collapsed when the view is inside a form or page. Outside, they will display collapsed correctly. Only clicking each twistie manually can close the categories.

You cannot put a view action on a form and have it manipulate an embedded view. The view property to auto-collapse when database first opened also does not work in an embedded view. Lastly, shift & "-" does not auto-collapse the view either although shift & "+" will auto expand the view categories.
(This is supposedly fixed in R6.)

A developer on found this workaround:
I found a way to collapse the view which is embedded:

Create a button on the form, that has the view embedded:

The agent just needs to be there...does not have to include any code... It only exists cause I could not get any other @functions to do the same result.
If you do not use single category - just leave out the @Command([ViewExpand]) bit.

I know it does not look very nice for the user, works!!!

Anders Mygind

previous page