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.

This entry was posted in Lotus Domino, Show-n-Tell+Thursday. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*
  • Follow

  • Archives (since 2003)

  • Categories

  • Recent Posts

  • Twitter Updates

  • del.icio.us links

  • Flickr

    Runnymede Healthcare Centre Demolition : The EndRunnymede Healthcare Centre Demolition : The EndRunnymede Healthcare Centre Demolition : The EndRunnymede Healthcare Centre Demolition
  •  

    August 2009
    M T W T F S S
    « Jul   Sep »
     12
    3456789
    10111213141516
    17181920212223
    24252627282930
    31  
  • Spam Blocked