Solved

View Selection formula doesn't work

Posted on 2000-05-06
5
210 Views
Last Modified: 2013-12-18
Hi,
I have a view that need to show all documents which Requested Date/Creation Date exceeds/equals to 60 days old compared to the current system date.

Here is my formula:
SELECT (form="Travel Request") & Status="Approved" & (@Today - @Date(TR_Date)) >= 60

However, it doesn't work at all.
I have a few documents which TR_Date is "02/05/2000", and yet they are showed in the view as well.

Is that anything wrong in my formula?

Thanks a lot!
0
Comment
Question by:kspuea
  • 2
  • 2
5 Comments
 

Expert Comment

by:makerman
ID: 2786101
Hi!

Have you tried to compose your view formula in another way? I mean, why not do the counting in the form (in a hidden field) and then use that value in the view? For me it has worked just fine. What you need though is a scheduled agent that "changes" your field containing @Today formula.

Best regards,

Mira Ă….
0
 

Author Comment

by:kspuea
ID: 2786759
Thanks, makerman.
But what I need is just to compare today's date with a Date field in the document. I don't want to change the field value.
0
 
LVL 3

Accepted Solution

by:
Simon_Hendry earned 20 total points
ID: 2786988
(@Today - @Date(TR_Date)) will return the number of seconds between the two dates your need to use

(form="Travel Request") & Status="Approved" & (@Today - @Date(TR_Date)) >= 5184000
0
 
LVL 3

Expert Comment

by:Simon_Hendry
ID: 2786998
Just to add to this though... Using @Today in your view selection formula means that your view index has to be calculated every single time you access the view ... You will probably notice that the "View Refresh Required" marker is always on for this view.. In a small database this is probably not a problem but if this database grows to any substantial size then opening the view is going to be very slow and the server update task is going to be doing alot of work....

A better solution to this is to create an agent that runs once nightly that checks the documents in the database that have (form="Travel Request") & Status="Approved"  and checks whether they are older than 60 days , if they are then it marks them with a field value ( say InView="Yes"  for example) .. Then set your view formula to be

(form="Travel Request") & Status="Approved" & Inview="Yes"

That way your view index will be static and your server will have to do much less work !!!
0
 

Author Comment

by:kspuea
ID: 2787676
Thanks a lot, Simon!!
That solved my problem now.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
LOtus Notes 6.5 low performance 13 36
Notes 8.5.2 application on web 4 206
IBM Lotus notes 9 91
Why the url within notes is no action 6 48
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question