Reg Exp
Web Design
Notes Client
View Icon Reference
Many applications that we build make use of icons in view columns. But we always had trouble knowing what the icon numbers were before we created this little reference database.

Create a database called "View Icons" or something similar. Create a view in this database. The selection statement should be SELECT Form = "View Icon". The first column in the view should be called "Base" and contain a value of Base (this will be a field value). It should be sorted in ascending order.

There are 10 additional columns and they follow a pattern. The next column will have a title of "+0", will show its values as icons, and have the formula Base+0 as its value. The next column will have a title of "+1", will show its values as icons, and have the formula Base+1 as its value. You should repeat this process, adding 1 each time, until the last column is titled "+9" and has a value of Base+9 as its value. The "+0" through "+9" columns should all show their values as icons.

Basically, what you'll end up with is a view that will show the icons in a way where you can determine the icon number. You'll see all the actual icons on the screen so you can find out you want to use. Then it will be easy to determine the number that represents this icon. Looking at the first column, you'll see the base value (0, 10, 20, etc.). Then you look at the column header to determine how much to add to this column. For example, take a look at our view. If you want to use the red "X" in a view column, you see that's in the row that starts with 80 as its base, and is in the "+1" column, so the view icon number is 81.

Creating the documents is fairly simple. We just wrote a LotusScript agent to build them automatically. Here's the code:
Sub Initialize
   Dim s As New notesSession
   Dim db As notesDatabase
   Dim i As Integer
   Dim doc As notesDocument
   Set db = s.currentDatabase
   For i = 0 To 170 Step 10
      Set doc = db.createDocument
      Call doc.replaceItemValue("Form", "View Icon")
      Call doc.replaceItemValue("Base", i)
      Call doc.save(False, True)
End Sub

In a loop, step through all the possible base values going 10 at a time. The largest icon number is 176, so the loop ends after 170. For each base number, create a new document. The only fields in the document are "Form" and "Base".

You can enhance the view if you like (we did) to do things like alternate row colors, update the spacing from single to something a little wider and put the "Base" column in a font that stands out a little more.

Once this database is built, the next time you need a view icon, it's very easy to find one and know its icon number.