Link to home
Start Free TrialLog in
Avatar of witgrefe
witgrefe

asked on

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
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

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
   
Avatar of witgrefe
witgrefe

ASKER

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.    
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...
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
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your help, I removed all the formulas and reentered them and all works well.
Great! It is sometimes even necessary to remove a corrupted view and to start all over again with it.