I need to make a view with a rolling 12 month period based on a date field. Does anyone know how this can be done?
Thanks
I need to make a view with a rolling 12 month period based on a date field. Does anyone know how this can be done?
Thanks
Subject: View with rolling 12 months
Need a bit more information - like where is the data stored. How is the data stored in the documents.
For example we do this all the time, but the document has fields called M0 M1 M2 … M11 (for current month, last month… 11 months ago). They get updated on the document by an agent.
The view just shows those fields.
Stephen.
Subject: View with rolling 12 months
Thomas,
This will end up relying upon @Today/@Now and will therefore be a poor performing view. I recommend you at least consider other possibilities before enacting this.
Search this forum or Developer Network for articles on view performance.
regards,
raphael
Subject: View with rolling 12 months
It’s not clear what you mean. Do you mean a view that shows all the documents where date field X contains a value >= Today minus one year? If that’s what you want, write a view with a hard-coded date in the selection formula
Select Form=“X” & SomeDateField >= [03/06/2006]
And then change the selection formula with a scheduled agent.
You must not do this:
Look at @Modified, @Adjust and @Now to create your DateTime delta in your view selection.
Using any of the above in a view selection formula will bring your server to a screeching halt.
Subject: View with rolling 12 months
Look at @Modified, @Adjust and @Now to create your DateTime delta in your view selection.
Shawn