|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Lotus NeophyteBlog Authors: Jocylyn Sy |
Question: Limitations of Notes Views
Jocylyn Sy |
|
Tags: 
views
today
notes
|
Comments (4)
As easily seen by my blog title, I declare myself to be a Lotus Neophyte, a collaboration and work flow challenged person, a dabbler in web based applications and a fetus in java programming.
|
A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.
1 Simon O'Doherty Permalink The view index (depending on how you set it) will update everytime there is a document update.
With time based functions like @NOW, @TODAY,@TOMORROW, @YESTERDAY.
These are determined at runtime. So the view index will go into an
endless loop of refreshing as this formula will never be up to
date.
I recommend the following in optimizing your views.
http://www.ibm.com/developerworks/lotus/library/notes7-application-performance2/
ND8 has a few new features in relation to view performance which
may not be detailed in that document.
2 Tim Tripcony Permalink The reason that functions which determine the system time (i.e. @Now / @Today) should not be used in a view selection formula is because their value changes every second. This is fairly intuitive with @Now, since it includes the timestamp, but not as much with @Today, since theoretically that should only change every 24 hours. However, @Today is essentially equivalent to @Date(@Now), which means that each second that goes by presents an opportunity for its result to change, even though it only does once a day.
The end result is that the view index is considered to be outdated
a second after the last time it was refreshed, which is why the
refresh arrow shows up almost immediately. For the same reason, one
should avoid including in the selection formula any calculation
that is session-dependent: @Username, for example; if you're
restricting the view to documents pertaining to the current user,
then everyone sees the documents for the user who triggered the
last index update.
The good news is there's a way around this: add a column at the
beginning of the view and set it to sort categorized, with a
formula of @Text(@Date(MeetingDate)) (assuming MeetingDate is the
name of the field you want to evaluate), then present the view to
the user embedded inside another element (such as a form or page);
in the embedded view properties, enter @Text(@Today) for the "show
single category" property. When the embedded view is loaded by the
user, they will see only today's documents.
The future meetings view would be trickier, since you're not just
showing a single day's meetings... you want any meeting still in
the future to display. In this case it's often best to add an
IsFuture field that evaluates to @If(MeetingDate > @Now;1;0),
then run an agent every morning (for example, 1:00 AM) that scans
the "future" view and recomputes that value for each document. Then
you can set the view selection formula to SELECT IsFuture = 1. This
ensures the burden of determining the view contents occurs as it
should: only once per day.
Hope that helps...
3 Jocylyn Sy Permalink Thanks for the link and tip, Simon.
Tim, I finally got why Today's date would cause view refresh
problems. Thanks for the detailed explanation, most specially for
the possible workarounds.
4 Vitor Pereira Permalink Tim's solution works but I tend to keep away from changing docs in order to show them in views appropriately, another possible solution would be to run an agent daily to change the view selection formula.