Create Views that displays X days of items from Lists

on January 8, 2007

Again, there is a problem and many solutions available.

The main issue here is that you cannot insert a formula into the Filter Section of a View from a List. You can’t use standard functions like [Today] etc.

As if it was a reminder, I won’t describe all the steps you need to create a List, DocLib and views or even the fields.

When you need to work with a dynamic date in a Filter, the easiest solution is almost always to add dynamic fields to the List. Then, you can use those fileds values to create Filters without formulas.

A commun example is for a Document Library, let’s say you have a views that contains couple hundreds documents. You want to implement some kind of Archives system throughout your Views.

You add a field of the typeCalculated“, you give it a name that make sense like “ArchiveDate".

You want to archive documents older than 6 months, so you fill in the Formula: [Today]+182, Data type returned: Date and Time, Format: Date Only.

Uncheck “Add to default view".

Now, if you go back to “View Properties” on a document from that DocLib, you should see the New Date value.

From there, you only need to play with your Views. Filter to Display Only Documents Where “A Date Field (Like Last Updated or Modified)” Is Greather Than or Equal to [Today].

On the other side, You create a View to display archived document using the same View except you put “Is Less Than” in the condition.

Of course, you can create more dynamic fields to use more complex Filters.

Ciao Ciao.

ShareThis