pw05
asked on
Programmatically expanding/collapsing twisties
Hi, I have a view where the first three columns are categorized. The view uses the "Collapse all when database is first opened" option. How can I programmatically expand all categorized columns except the last categorized one? Thanks.
C1,C2,C3 categorized columns
E expanded twistie
C collapsed twistie
C1 C2 C3
E
E
C
C
E
C
C
E
E
C1,C2,C3 categorized columns
E expanded twistie
C collapsed twistie
C1 C2 C3
E
E
C
C
E
C
C
E
E
ASKER
Sorry, I'm a beginner at LotusScript, so I'm not sure what's wrong here - I'm getting a bunch of errors along the lines of "Unexpected: =; Expected: Statement" (either unexpected = or @)
Is there something I'm missing? Thanks.
Is there something I'm missing? Thanks.
In the PostOpen Event you must select "Run Client Formula", not "Run Client LotusScript".
Bozzie, very good !!
Only, I'd delete the first @If statement.
Bozzie, very good !!
Only, I'd delete the first @If statement.
ASKER
Oh, thanks. It doesn't work for me though - when I open the view, everything is collapsed. Is there something else I need to set in the view properties?
If your categories are not unique, then Bozzie4's code doesn't work...
---
Oops!! Sorry!
I misunderstood your question!!
Forget everything I said( and Bozzie4 too ) till now.
You want the first two columns expanded and the rest collapsed while I thought you wanted the all the categories (rows)expanded except the last one (which is what Bozzie4's code does).
---
Oops!! Sorry!
I misunderstood your question!!
Forget everything I said( and Bozzie4 too ) till now.
You want the first two columns expanded and the rest collapsed while I thought you wanted the all the categories (rows)expanded except the last one (which is what Bozzie4's code does).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ah yeah, I misunderstood the question too ....
It's possible, though. Put this in PostOpen:
CurrentView := @ViewTitle;
@If(CurrentView != "YourView"; @Return(""); "");
res := @dbcolumn("":"nocache";@db
key:=@if(@iserror(res);@re
@Command( [ViewExpandAll] ) ;
@Command([OpenView]; CurrentView ; key);
@Command([ViewCollapse])