Solved

View Selection formula doesn't work

Posted on 2000-05-06
5
216 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

623 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