Solved

Programmatically expanding/collapsing twisties

Posted on 2004-10-07
7
883 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

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 is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

815 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

13 Experts available now in Live!

Get 1:1 Help Now