|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 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. |
|
|
|
|
|
|
|
|
|
|