Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

modify a view to show only the documents in the database up to 1 month old

Hello,
I am trying to modify a view to show only the documents in the database up to 1 month old.  The original selection is:

notes:=@If(@IsDocBeingEdited; "FullPC"; "PC");
web:=@If(@IsDocBeingEdited; "FullPCW"; "PCW");
@If(@IsNewDoc; Form; @ClientType = "Web"; web; notes)

I want to limit this selection to the last month only and thought I may use the following but am not sure where status would fit in the @if statement.

startdate:=@Adjust(@now;0;1;0;0;0;0);
status:=@if(@created > startdate; @true; @false);

Any help would be appreciated
0
witgrefe
Asked:
witgrefe
  • 4
  • 3
1 Solution
 
Sjef BosmanGroupware ConsultantCommented:
What the first 3 formulas are supposed to do in a view I fail to see.

    startdate:=@Adjust(@Today;0;-1;0;0;0;0);
    SELECT @created > startdate
   
0
 
witgrefeAuthor Commented:
I have just looked at the @if statement again and I don't think it can be modified to include a time limitation.  

The database can have documents created either via the Web or via the client and the 3 lines that are in the view selection are only selecting which form to use for the view depending on how the document was created.    
0
 
Sjef BosmanGroupware ConsultantCommented:
a) @If can include a time, see the select above.
b) not true (unless the view is set to Discard the index every time)

Where is that formula?? It doesn't seem anything like a selection formula. Isn't it the Form formula in a view, indicating with what form to open a document??

Please tell me where we're going...
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
witgrefeAuthor Commented:
It is in the view but whenever I save the view with SELECT in the formula -- even SELECT @all, when I next open the view, SELECT has gone
0
 
Sjef BosmanGroupware ConsultantCommented:
Which Notes version?

Strange behaviour... When I look at the Objects for the view, in the Designer, below the view at the left, I see View Selection and Form Formula (and a lot of others).
View selection should ALWAYS contain the word SELECT followed by a statement resulting in true or false.
The Form Formula can contain a formula that will be used to determine what form is to be used when opening a document.

If you don't see a SELECT when the View Selection is opened (please check that), there is something terribly wrong with your database. It might need a good rub with Compact and Fixup. If you want me to have a look at the view, you can mail a db to me, see my EE-profile. Create an empty db, and put only that view in it (copy/paste). In the ACL, set Default to Manager. Please zip before mailing...
0
 
witgrefeAuthor Commented:
Thanks for your help, I removed all the formulas and reentered them and all works well.
0
 
Sjef BosmanGroupware ConsultantCommented:
Great! It is sometimes even necessary to remove a corrupted view and to start all over again with it.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now