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(@IsDocBeingEdit ed; "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
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(@IsDocBeingEdit
web:=@If(@IsDocBeingEdited
@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;
status:=@if(@created > startdate; @true; @false);
Any help would be appreciated
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.
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...
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...
ASKER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
startdate:=@Adjust(@Today;
SELECT @created > startdate