Tables have been a part of Lotus Notes/Domino since the earliest versions, but that doesn't mean they have stayed the same. There have been many additions and modifications to the way tables are handled, and new features to make fairly complicated tables fairly easy to create. Some of these features are wonderful, such as the tabbed table, while some are much less well thought out, such as animated tables. The purpose of this article is to explain some of the basic limits of tables, and start covering a few of the features that make them powerful, along with a few tips to help you use them effectively. Part 2 will cover more tips, tricks and workarounds, especially with tabbed tables and animated tables. If that takes long enough, Part 3 will cover hide-when formulas, how to use them effectively and (relatively) safely, as well as some ideas about how to make tables look good on the web without making the whole table out of pass through HTML. If I think of more, there might even be a Part 5.Basic table limits
It is very important to understand some of the basic limitations on tables, since these effect decisions on where and how to use them. Here are some numerical limits to keep in mind, along with my view on the likelihood they will continue to be limits in future versions:
New table features in R5 and ND6
- Each table may have no more than 255 rows (not likely to change, since the Row value in the table cell CD record structure is a single byte). I am surprised this wasn't changed earlier, but it seems less and less likely it will change). Unlike HTML, every row is actually numbered.
- Each row may have no more than 64 columns. This could change fairly easily from a data storage perspective, but since table rendering is pretty bad already, I doubt it will.
- Each column must be at least 0.125 inches wide. This is a UI constraint, not an internal constraint, as with Midas it is easy to create tables with more narrow columns, and the UI renders them just fine. It may change, but I think it unlikely.
- Each column width cannot be greater than 22.75 inches. This is enforced, and won't change as widths in rich text are measured in TWIPS, which are 1440 per inch, so 1440*22.75=32760, which uses up a WORD. Since there are lots of widths that are stored as WORD size, this isn't going to change.
- The total table width cannot be greater than 22.75 inches. Actually, this is documented some places, but is not true. You simply can't see more than 22.75 inches on a Notes client, as that is the limit of paragraphs and such (see point above for reason). Try it with a table and use the horizontal scroll bar and it will stop at 22.75 inches. You also can't tab to the other columns. So, this is an unenforced limit, but a sensible one, and it isn't going to changed.
- Nested tables can only nest to 10 levels. While this is a UI constraint, it does make the client unstable to go beyond 10 levels with Midas, so Midas is also limited to 10 levels. Besides, if you feel the need to nest beyond 10 levels, you need to get a strong cup of coffee and go somewhere quiet to think things over.
I could list new features in R4, but it seems a bit silly now. I plan to cover each of the major table enhancements in R5 and Notes 6 (not necessarily in order of importance), along with ways to use these features more effectively.Nested tables
Very important addition to R5, but with some very important compatibility issues between the Notes client and web browsers. On the web, nested tables are used extensively, so they need to be in the Notes client. The only trouble is, they are harder to use in the Notes client because of latent spacing. Below I show how these differ from web nested tables and one way to make them work in roughly the same way.
See below for an image of a simple 2x2 table nested inside another simple 2x2 table created in the Notes client:
Note that there is space before the table and after it, even though there is nothing in the cell except the table. Now, after turning off the borders, we get:
but you can still see that there is space before the nested table. If we show this same table on the web, we get:
which makes more sense, since the nested table completely fills the cell. We can do almost the same in the Notes client by putting the cursor in the space before the nested table and setting it to be hidden when read, then doing the same in the space after the nested table. The result looks like the web result:
Now, using this technique, we get a properly nested table. Be forewarned though, I hid a different problem by turning the borders off. If you look very carefully at the image above, you will see that the very left hand side still shows a bit of the cell. If you have the borders turned on, this is even worse:
For this reason, I advocate turning the borders off when possible and using cell color to differentiate rows. Very mild colors are possible (these odd colors are actually an artifact of using 256 colors to save the images).
To be continued in Rich Text 101 - Tables, Part 2 (whenever it is ready)
Copyright © 2003 Genii Software Ltd.
Technorati tags: RichText101