We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

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

witgrefe
witgrefe asked
on
Medium Priority
249 Views
Last Modified: 2013-12-18
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
Comment
Watch Question

Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
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
   

Author

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.    
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
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...

Author

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
Groupware Consultant
CERTIFIED EXPERT
Commented:
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...

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Thanks for your help, I removed all the formulas and reentered them and all works well.
Sjef BosmanGroupware Consultant
CERTIFIED EXPERT

Commented:
Great! It is sometimes even necessary to remove a corrupted view and to start all over again with it.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.