Solved

Programmatically expanding/collapsing twisties

Posted on 2004-10-07
7
869 Views
Last Modified: 2013-12-18
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
0
Comment
Question by:pw05
  • 3
  • 2
  • 2
7 Comments
 
LVL 15

Expert Comment

by:Bozzie4
ID: 12252206
Wow.  That's a difficult one.

It's possible, though.  Put this in PostOpen:

CurrentView := @ViewTitle;
@If(CurrentView != "YourView"; @Return(""); "");
res := @dbcolumn("":"nocache";@dbname;CurrentView;1);
key:=@if(@iserror(res);@return("");@subset(res;-1));
@Command( [ViewExpandAll] ) ;
@Command([OpenView]; CurrentView ; key);
@Command([ViewCollapse])
0
 

Author Comment

by:pw05
ID: 12252908
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.
0
 
LVL 3

Expert Comment

by:Andrea Ercolino
ID: 12253145
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.

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:pw05
ID: 12253396
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?
0
 
LVL 3

Expert Comment

by:Andrea Ercolino
ID: 12257836
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).
0
 
LVL 3

Accepted Solution

by:
Andrea Ercolino earned 250 total points
ID: 12258047
I'd say that it's not possible.

I think that your question follows a previous one about exporting totals from categories. If so, I think that the best thing you can do is navigate the view with a NotesViewNavigator in LotusScript. Along the way you can create new documents with the information you find in categories.

From the Designer Help:
  NotesViewNavigator differs from NotesView in the following ways:
    ViewNavigator returns a ViewEntry object instead of a document.
    It lets you access categories and totals, as well as documents.
0
 
LVL 15

Expert Comment

by:Bozzie4
ID: 12284174
Ah yeah, I misunderstood the question too ....
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now