Retrieve All Columns for Each View in a Database

This routine displays all columns for all views in the database.

How It Works

Using the NotesDatabase and NotesView classes, the routine iterates through every view in the database and returns all columns for the view. Alternatively, you may want to store the column names in a dynamic array or perform some other action with each view column.

Implementation

To implement this routine, create an action button. Set the Language Selector to LotusScript and insert the following statements in the Programmer's pane.

Sub Click(Source As Button)

 '-----------------------------------------------------------------
 ' Define the objects
 '-----------------------------------------------------------------
 Dim s As NotesSession
 Dim db As NotesDatabase
 Set s = New NotesSession
 Set db = s.CurrentDatabase
 Dim view As NotesView

 '-----------------------------------------------------------------
 ' Display all columns for each database view
 '-----------------------------------------------------------------
 If Not Isempty (db.Views) Then
 Forall v In db.Views

 Msgbox "Found View: " + v.Name
 Set view = db.GetView( v.Name )
 Forall c In view.Columns
 Msgbox ( "----" + c.Title )
 End Forall

 End Forall
 End If

End Sub


How to Manage Conflict Documents

An Introduction to the Lotus Domino Tool Suite

Getting Started with Designer

Navigating the Domino Designer Workspace

Domino Design Elements

An Introduction to Formula Language

An Introduction to LotusScript

Fundamentals of a Notes Application

Calendar Applications

Collaborative Applications

Reference Library Applications

Workflow Applications

Web Applications

Design Enhancements Using LotusScript

Design Enhancements Using Formula Language

View Enhancements

Sample Agents

Miscellaneous Enhancements and Tips for Domino Databases

Data Management

Security

Application Deployment and Maintenance

Troubleshooting

Appendix A. Online Project Files and Sample Applications

Appendix B. IBM® Lotus® Notes® and Domino®Whats Next?



Lotus Notes Developer's Toolbox(c) Tips for Rapid and Successful Deployment
Lotus Notes Developers Toolbox: Tips for Rapid and Successful Deployment
ISBN: 0132214482
EAN: 2147483647
Year: N/A
Pages: 293
Authors: Mark Elliott

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