Solved

Programmatically expanding/collapsing twisties

Posted on 2004-10-07
7
856 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

16 Experts available now in Live!

Get 1:1 Help Now