@SetViewInfo behavior

I have a contact mgmt system that allows us to track contacts categorized by “region.” I have a page with an outline control that opens the views respectively. I am trying to implement the @SetviewInfo function to control the documents that are displayed in the views as one would expect. However, I have a problem where clicking on an entry in the outline control does not immediately toggle the view correctly. I usually have to click on a couple different entries in the outline control before the views begin to filter the documents properly.

Example:

By default, the db opens in a frameset to a default view that displays a set of documents from the Southwest region. When the user clicks a button to view all documents in the Southeast region and then clicks an entry in the outline control, no documents show up immediately. If they click on the second entry that represents a different view, the documents appear properly. If the user then clicks on the first entry again, the documents in that view begin to appear.

The button to toggle the region opens (re-opens) the default view and sets the @setviewinfo formula. I’ve tried a variety of crazy code blocks to make this work. I’ve tried setting environment variables and profile fields to store a value to be used as the filter in the @setViewinfo function. Same bad results every time. It’s as if there is a lag between applying the filter to the views. Client Caching? We have at least 8 regions and I really don’t want to have to multiply a majority of my design elements (especially views) by the number of regions. @Setviewinfo seems to be the answer I am looking for if only I could get it to behave properly.

Thoughts?

Subject: IT Gets Worse…

In order to use this function effectively you have to call @setviewinfo everywhere you intend to open a new view because @setviewinfo isn’t specific to the current view - it sets it for all views whether they are categorized or not. And you can’t just call @setviewinfo. If you are using an outline control, you need to open / reopen the view first and then immediately call @setviewinfo, otherwise you’ll get an error.

Type-ahead search in the view no longer works as expected because although it doesn’t appear that the view is categorized…it is. And the default selection on the type-ahead box is Search All…not search this category. OH…and when you have a sub-category in any of the these views…forget about type-ahead altogether. It is miserable.

Full text search in a view that uses this “feature” appears to return no results? Why? Because the category is hidden I suppose. The text at the top of the search control tells you that you have result but the view displays none.

I’m done ranting and off to figure out a new design using tried and true methods.

Subject: RE: IT Gets Worse…

As usual: What Notes giveth, Notes taketh away!This @SetViewInfo seemed to be the answer to all the users wanting to only see “My stuff.” (Which occurs in every DB I’ve ever created!) But as we have seen, once you set that on, all the views in the DB then start to work unexpectedly! ie: docs disappear! Back to single category embedded views on a form! Thanks for Nothin’

Subject: RE: IT Gets Worse…

I don’t know about that – I’ve been using @SetViewInfo quite successfully. Much of the behaviour described n other posts in this thread is expected – like restricting a view to a collapsed category not allowing twistie expansion and so forth (how would you expect to expand a category whose name “appears” off-screen?). After all, the view is still categorized on the missing left-hand column.

The problem with applying the filter seems to be a simple one of failing to update the formula context after opening the view. (You did know that that’s what @UpdateFormulaContext was for, right?) From a view action, you don’t need to use it, but from an outline or hotspot in another frame, you need to use @UpdateFormulaContext to “get” the view.

Subject: RE: IT Gets Worse…

Hi, I’ve had the same sort of problems with both collapsing and resetting the filter…

This is the way I overcame both issues:

Collapsing-------------------------------------------------->

I added an action button to the view to allow for collapsing. This is the code:

@SetViewInfo([SetViewFilter];“”;“SendTo”;1);

@Command([ViewCollapseAll]);

@Command([ViewExpand]);

@SetViewInfo([SetViewFilter];@Name([CN];@UserName);“SendTo”;1)

This sets the filter back “All Documents”, collapses all documents, expands only the user’s category (which is where the cursor is set to) then reset the filter back to the username…

Resetting filter to all docs------------------------------>

To set the filter back to all documents, when a user goes to another view, instead of adding it to the postopen event of each view, I just added the following code to each outline entry which opens views (action).

@SetTargetFrame(“Main”) ;

@Command([OpenView]; “FirmNameView”);

@SetViewInfo([SetViewFilter];“”; “”; 1);

@SetEnvironment(“MTLastViewed”; “FirmNameView”);

Hope this helps someone, because it drove me batty trying to figure out a workaround…

Regards

John Eustor

PCLP

TrialGraphix, Inc

johne@trialgraphix.com

Subject: RE: IT Gets Worse…

Good solution, John.

It’s too bad that they didn’t make @SetViewInfo easier to use and more functional.

Subject: RE: IT Gets Worse…

Similar problems occur when using @command([ShowOnlyCategories]) - it’s not view-specific either, so it hides ALL information in not-categorized views . I think this is a bug and will try to file a request with Lotus to solve this. (for @setviewinfo, you can reset the info , but not with showonlycategories, because it’s a toggle !)

cheers,

Tom

Subject: RE: IT Gets Worse…

Great solution to the Collapse All Problem when using @SetViewInfo

Subject: UPDATE: @SetViewInfo behavior

After hours of “bigger hammers” and expletives, I found out that if the view you are attempting to manipulate with the @SetViewInfo function is set to “Collapse all when database is first open,” you may have a similar experience while tyring to toggle between values in that hidden column. I have also found that when I have a view with a hidden column, other (visible) categories and the @setviewInfo function is applied, @Command([ViewCollapseAll]) no longer works. UGGGH.

Subject: RE: UPDATE: @SetViewInfo behavior

What is worse, is even if you can get it to work – only the first categorized column can be used, etc – then not all the normal view features work as expected. For example, you can’t collapse all. And if the category that you’re selecting happens to be collapsed when the function is run, then poof, everything in the view disappears. The expected result, just those documents that match that category, is not exactly what you get.

Someone at Lotus needs to send this back through usability testing…

Subject: RE: UPDATE: @SetViewInfo behavior

Yes, I’ve found the same thing. Too bad, it could have been a nice feature. Just like the user’s customize view, it it only 1/2 implemented. In that one, if the user hides a column that is next to a column without a column title, it blows up. Oh well, maybe in the next release…