Reputation: 788
I am trying to create a SELECT formula for my documents in my search view. It looks like this:
SELECT (Form = "Calculation" & @Created > [09/26/2017])
Every month I need to get documents which were created in the current month each time.
So, in the place of [09/26/2017] I must to put a first day of the current month, almost find the solution but no there yet.
Can you please provide a small solution or advise for this? Thank you!
Update:
This is my last variant:
StartDate := @Today;
StartOfThisMonth := @Date(@Year(StartDate); @Month(StartDate); 1);
SELECT Form = "Sum_access_by_corporations" & @Created >= StartOfThisMonth;
But, as Karl-Henry Martinsson noticed, this is an incorrect solution and I will try to find other solution for this. And I have opened this question again.
Upvotes: 0
Views: 328
Reputation: 2795
Please do not listen to CBlunt, @Today and @Now are killing server performance, as it makes the view index "dirty". It will never be indexed, and the index task will run constantly.
You should never use them in a view selection. The proper way to do it is to have a scheduled agent, which will update a field, indicating if the document should be included in the view or not.
Upvotes: 3