How to Reference $ Fields

Fields that start with a dollar sign are special Domino design elements that store values related to the management of the Lotus Notes documents. For example, the following are just a few of the dollar-sign fields that may be referenced.

  • $KeepPrivate Disables the ability to copy, print, or forward a document
  • $Moods Displays a mood graphic in an email
  • $PublicAccess Sets access permissions
  • $Readers Determines who can read the document
  • $File Displays an entry for all file attachments
  • $Link Shows an entry for all links
  • $Revisions Shows the date and time for each document update
  • $UpdatedBy Shows the list of users that have updated the document

How It Works

The tilde symbol is used to indicate that the following character is a special character.

ImplementationExample 1

This first example illustrates how to reference a dollar field using the tilde character. Without this prefix, you will receive a LotusScript error message at compile time.

Dim s As NotesSession
Dim w As NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim db As NotesDatabase
Set s = New NotesSession
Set db = s.CurrentDatabase
Set w = New NotesUIWorkspace
Set uidoc = w.CurrentDocument
Set doc = uidoc.Document

'----------------------------------------------
' Example statement using the tilde
' to reference a "$" field
'----------------------------------------------
Msgbox doc.~$UpdatedBy(0)

 

ImplementationExample 2

This second example illustrates how to reference a dollar field using the GetFirstItem method from the NotesItem class to retrieve the item value (see Figure 13.12).

Dim s As NotesSession
Dim w As NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim db As NotesDatabase
Dim item As NotesItem
Set s = New NotesSession
Set db = s.CurrentDatabase
Set w = New NotesUIWorkspace
Set uidoc = w.CurrentDocument
Set doc = uidoc.Document

'----------------------------------------------
' Example statement using the
' GetFirstItem method to reference
' a "$" field
'----------------------------------------------
Set item = doc.GetFirstItem ("$UpdatedBy")
Msgbox item.Text

Figure 13.12. Using GetFirstItem to return the value of the $UpdatedBy field

Note

Many of the dollar-sign objects are managed by Domino and cannot be modified.



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?

show all menu



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
Similar book on Amazon

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