Adding and Editing View Columns

You can add new columns to a view in several ways. Double-clicking the view header in an area without a column adds a new column. Clicking the Insert Column in View button in the toolbar inserts a new column to the left of the currently selected column. Clicking Append Column in View adds a column to the right of the last column. You can insert or append columns from the Create menu. You can remove a column by highlighting the column and pressing the Delete key; by choosing Edit, Clear from the menu; or by pressing Ctrl+X. Right-clicking the header produces a floating context menu from which these same choices can be made.

TIP

You can move a column by highlighting the column in the title bar and then pressing Ctrl+X. Position the highlight to the right of the location to which you want to move the column, and press Ctrl+V. The column is inserted to the left of the highlight.

 

Although columns can be hidden, they typically display data in views. Columns are defined in the Programmer's pane. Three choices are listed beside Display: Simple Function, Formula, and Field. Only the Formula language is allowed in column definitions. Simple functions are listed in Table 6.3 and are convenient for displaying document statistics and file attachment information. Formulas are the most powerful and flexible way to determine what appears in a column. You will often use formulas when constructing views. The last choice is Field. Note that view columns cannot display encrypted data. Although you cannot directly display the contents of a rich-text field, you can use simple functions or @Functions to indicate whether the document has a file attachment in a rich-text field.

Table 6.3. Simple Functions for View Column Definitions

Simple Function Returns
Attachment Lengths Number list of attachments
Attachment Names Text list of attachment filenames
Attachments Number of files attached
Author(s) (Dist. Names) The distinguished name of the author ”for example, Henry Henke/Acme
Author(s) (Simple Names) The simple name of the author ”for example, Henry Henke
Collapse/Expand (+/ “) Uses a + or a “ sign to indicate whether a column is expandable
Creation Date Uses @Created to return the date the document was created
Last Modified Uses @Modified to return the date the document was last modified
Last Read or Edited Uses @Accessed to return the date the document was last read or edited
Size (bytes) The size of the document in bytes
# in View (such as 2.1.2) The position of the document in the view (default for new columns)
# of Responses (1 level) The number of direct descendants to the document or next -level subcategories for a category
# of Responses (all levels) The total number of descendants (both response and response to response docs) for a document or subcategories for a category

Simple functions are also known as view statistics for reasons that are apparent by glancing at the list. Some of these are quite useful when building views. For example, if documents will have attachments, the three attachment functions will be very useful. Choosing Attachments for a column and setting the column to Display as Icons (on the Basics tab) displays an icon if there is a file attachment. This is equivalent to the @Function @Attachments . If you want to see the Formula language equivalents to the simple functions, select a simple function and switch to Formula. The @Function appears in the Programmer's pane.

Fields are simple enough to understand; simply choose the field you want to display from the list in the Programmer's pane, and you're finished.

Formulas allow you to use @Functions to manipulate the display of columns. The possibilities here are virtually endless and include returning a numeric value to be evaluated as an icon, returning numeric values to total or average, and returning numerous string and time/date functions.

It is also possible to add HTML in a column to display an image instead of the contents of a field or the result of a formula. An HTML column is often used on the Web to display an image as the result of a formula. For instance, if you want to show new entries with a special image and older entries without the image, you can create a formula such as this one to display a GIF image if the document was added to the database in the last 14 days:

@IF (@NOW > @ADJUST(@CREATED; 0; 0; 14; 0; 0; 0); ""; 
"[]")

Part I. Introduction to Release 6

Whats New in Release 6?

The Release 6 Object Store

The Integrated Development Environment

Part II. Foundations of Application Design

Forms Design

Advanced Form Design

Designing Views

Using Shared Resources in Domino Applications

Using the Page Designer

Creating Outlines

Adding Framesets to Domino Applications

Automating Your Application with Agents

Part III. Programming Domino Applications

Using the Formula Language

Real-World Examples Using the Formula Language

Writing LotusScript for Domino Applications

Real-World LotusScript Examples

Writing JavaScript for Domino Applications

Real-World JavaScript Examples

Writing Java for Domino Applications

Real-World Java Examples

Enhancing Domino Applications for the Web

Part IV. Advanced Design Topics

Accessing Data with XML

Accessing Data with DECS and DCRs

Security and Domino Applications

Creating Workflow Applications

Analyzing Domino Applications

Part V. Appendices

Appendix A. HTML Reference

Appendix B. Domino URL Reference



Lotus Notes and Domino 6 Development
Lotus Notes and Domino 6 Development (2nd Edition)
ISBN: 0672325020
EAN: 2147483647
Year: 2005
Pages: 288

Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net