Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

View Selection formula doesn't work

Posted on 2000-05-06
5
Medium Priority
?
218 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 80 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

688 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