Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Dynamic view filtering in Notes (continued)

xxTitle := "Filter Calendar by Type";
@DialogBox("(CalendarFilters)"; [AutoVertFit] : [AutoHorzFit] : [NoCancel] : [NoFieldUpdate] : [SizeToTable] : [NoOkCancel] : [NoNote]; xxTitle);


REM {get the choice off of the colorprofile and tell the view what the user wanted to filter by...}
choice := @Environment("CalFilter_Type");
HitOk := @Environment("CalFilter");
sortchoice := @If( choice = "Meeting"; "3"; choice = "Appointment"; "0"; choice = "All Day Event"; "2"; choice = "Anniversary"; "1"; choice = "Reminder"; "4"; choice = "To Do"; "To Do"; "");

REM {use status column to filter on To Do's, else filter on ApptType column}
@If(HitOk != "";
@If(sortchoice = "To Do";
@SetViewInfo([SetViewFilter]; sortchoice; "$152"; FALSE; 1);
@SetViewInfo([SetViewFilter]; sortchoice; "$152"; FALSE; 1));
"")

You can see at the end how it uses @SetViewInfo with five parameters, to filter the view on the choice entered by the user. It's a non-categorised exact-match selection. In the calendar view, @SetViewInfo works perfectly as described in the help, with one little tweak (note the Unfilter button in Figure C above) that I'll come to later.

As far as I can tell, though, @SetViewInfo in a Standard Outline (regular) view will only work against categorised columns, and it is documented that it does not work on the Web. It's Notes client only.

I tried using @SetViewInfo on a non-categorised column, and I could not get anything useful from it at all -- it either did nothing, or eliminated everything and left a blank view. But when used on a categorised column, it works just fine, except that the exact-match parameter doesn't actually do anything. Fair enough, the help suggests that it won't.

What I did was to create a filter action where the specified column, CNV_USERID (remember to use the programmatic name) was categorised:

t:=@Prompt([OkCancelEdit];"Filter userid";"enter a userid";"");
@StatusBar(t);
@SetViewInfo([SetViewFilter]; t; "CNV_USERID"; 1;1)

I then tried using it with all options of the last two parameters. I found that the first one must be specified as 1, and it doesn't matter what the second one is. If the first of these two parameters is zero, the action doesn't work. I also found that if I had two categories that started with the same value, only data from the first was displayed, contrary to what the help says. To get the expected data, you need to enter the required category value unambiguously.

The final issue is to realise that any @SetViewInfo setting sticks the whole time that the database is open. Which means that if you switch to another view that has a column with the same programmatic name, it will be filtered too, which might not be what your users expect.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  Next »
Other articles you might like
Home > Lotus Technologies > Notes (84 articles)
   A walk down Memory Lane with Lotus Notes
   An application for scanning physical mail and distributing it virtually
   Managing Notes deployments with Teamstudio Build Manager
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done. Native to Lotus Domino. The User Experience unseen for Lotus Domino. Do more with less. Really.

See the possibilities Docova unleashes for Lotus Domino.
-- Advertisement --

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login