0
votes

Do any of you know if I will run into errors with the following code come January?

SELECT (@Month(@GetField("OUT")) = @Month(@TextToTime("Today")) -1)

2
Set your clock ahead and find outElGavilan
I would, if that functionality was not disabled on my office pc - or if i had lotus notes on my home pc...thanks for your help :)ClaaziX
Note (which you may have realised from Knut's answer): you don't need to use @GetField to get field values in view selection or column formulas. Just a field name (without quotes) will get the value of that field.Scott Leis

2 Answers

4
votes

You can test if date field "OUT" is from previous month this way:

@Month(OUT) = @Month(@Adjust(@Today; 0; -1; 0; 0; 0; 0))

BUT, it is not recommended to use time-based functions (like @Today or @TextToTime("Today")) in view selections. Look here for more information.

1
votes

You might also consider using a "user definable" column that uses @Return to abort the inclusion of any document that doesn't meet your criteria. Then you can update the corresponding profile document field in the Queryopen event of the view (if it doesn't already match the desired formula).