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)

Then in the code pane, you then add a formula that calculates a value. That value is then compared against the view, and will only show the data for any category that matches the formula result. In my case, because the view is categorised on the person's abbreviated name, the formula I used was:

@Name([Abbreviate];@UserName)

Now, when the user opens that page, he will be shown only data for himself.

Yes, I hear you say that you I could have done that with reader name fields, and yes, I could. But using a single category view is actually much faster, because the view doesn't have to be filtered to remove documents by reader name.

That mattered here, because there might be several thousand documents in the database, but only one or two for each user, which would have given a severe performance hit while the view was being filtered by the reader names. And of course, this single category view idea can be used for values that can't drive reader names fields. The single category formula can use any data from the form/document or page that it is embedded in, or, as in my case, information about the current user.

@SetViewInfo
The second method of view filtering is to use @SetViewInfo. @SetViewInfo filters a view by values in a specific column, and is Notes-client only.

The syntax of @SetViewInfo depends on whether you are using it in a Calendar view or a Standard Outline view. According to the 7.0.1 Designer help, the syntax is like this:

@SetViewInfo( [SETVIEWFILTER] ; filterString ; columnName ; isCategory )

The first parameter is constant; you must specify [SETVIEWFILTER]. The real work is done by the second and third parameters.

In the second parameter, filterString, you give a value that is to be searched for in the column described by the third parameter. Just be careful when specifying the third parameter. You should use the programmatic name of the column, which you need to get from the column properties box, propeller-head tab, as shown in Figure C.

FIGURE C


Be sure to use the programmatic name of the column. Roll over picture for a larger image.

The idea is that when @SetViewInfo is used, Notes displays only rows where the specified column contains the specified value. But reality is just slightly different.

Designer help, as we have seen, states that @SetViewInfo has four parameters, but when you start to type, Designer's parameter prompt (in Designer 7.0.1) thinks that @setViewInfo actually has five; two parameters after the column name (bIsCategory, and bDoExact) as shown in Figure D.

FIGURE D


Designer's prompt things there are five parameters. Roll over picture for a larger image.

You can see @SetViewInfo in action in your mail database. Open it and go to the calendar view. You'll notice a Filter action, which allows you to filter your calendar by a variety of entries. Figure E shows my calendar filtered by type to show just All Day Events.

FIGURE E


It's not that I've got a lot of free time, just that I'm only showing All Day Events. Roll over picture for a larger image.

Here's the code that implements that set of choices:


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

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.

Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).

Tap here to get started!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login