SNTT : Don’t hard code your Selectedable Years in a Lotus Notes dialog box.

Hard coding is bad, bad , bad. Very bad, okay? (see Avoiding Hard Coding of Group Names).

Here’s a quick and dirty way to have a drop down dialog which selects the “Year” and not be hard coded.

1
2
3
4
currentYear := @Year(@Now );
@Text(currentYear-1) :
@Text(currentYear) :
@Text(currentYear+1)

which results in a multip value list of (for this year) “2008″ : “2009″ : “2010″

and then make the default value

1
@Text(@Year(@Now ))

and, of course, you could easily extended this forward or back additional year values if needed.