I've seen a lot of entries in this forum on this topic.
For an embedded view using sigle categories shift & '+' works but not shift & '-'....
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, but...it works!!!