SharePoint.Gurus
New member
- Local time
- Today, 11:01
- Joined
- Feb 21, 2015
- Messages
- 6
I want to create a view that shows all items created in the current month. This is the datasource for a related items control.
I'm able to achieve this by using date functions in the where clause, but this doesn't perform very well. My guess is that it is evaluating this formula for every row in the data source. It performs much faster if I hard code a date.
Is there another way of achieving this? I have a variable in my OnStart macro that is set to the first day of the current month, but I don't think there is a way of using this variable in a query's WHERE criteria.
I see that queries can accept parameters, but not sure how I can set this.
I'm able to achieve this by using date functions in the where clause, but this doesn't perform very well. My guess is that it is evaluating this formula for every row in the data source. It performs much faster if I hard code a date.
Is there another way of achieving this? I have a variable in my OnStart macro that is set to the first day of the current month, but I don't think there is a way of using this variable in a query's WHERE criteria.
I see that queries can accept parameters, but not sure how I can set this.