Solved

Programmatically expanding/collapsing twisties

Posted on 2004-10-07
7
944 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

623 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