Programming
Languages for Lotus Domino Designer R5: @Functions
Description
During
this course you will extend your knowledge of the @Function language
used in Domino applications for both Notes and Web browser clients.
This
is not a survey course that attempts to cover every function and
syntax requirement. Instead, this course focuses on the strategy
of using @Functions to solve the pivotal issues faced by Domino
developers.
Course
goals
This
course will:
-
extend
a fundamental knowledge of the @Function language
-
show
appropriate use @Functions to meet application goals
-
provide
extensive programming and debugging experience to ensure mastery
of key @Functions
-
use
@Functions to operate on multi-value variables and fields
-
describe
how to conditionally execute code based on document state and
user identity
-
explain
data inheritance and inter-document relationships
-
show
how to use well-known locations to store configuration information
-
build
a practical understanding of data validation and error trapping.
Topics
covered elsewhere
No
one course can cover all of programming techniques. Other courses
cover these related topics:
-
accessing
external data source data via the @Db functions and the LotusScript
Data Object (LS:DO) is covered in Advanced Techniques for Domino
Designer
-
LotusScript
access to Profile documents is covered in Advanced Techniques
for Domino Designer.
Audience
This
course is designed for Domino Programmers. It assumes that you
have:
-
thorough
knowledge of the Domino Designer development environment, including
form and view design, as well as how to use properties boxes,
and how to set the ACL
-
mastered
the topics covered in Basic Applications for Domino Designer.
Though
not required, experience in any computer programming or application
scripting language (including spreadsheet formulas) is helpful
in understanding how to maximize the use of the @Formula language.
Course
design
This
lecture-lab course involves significant hands-on coding experience
using the @Function language. It only peripherally explores the
principles of programming and does not attempt to cover every
option of every function.
The
course takes a task-oriented approach, during which you will increase
your understanding of how Domino applications operate.
Outline
Topic
1: Using the @Formula Language
Key points
Programming languages used in Domino
Advantages of the @Function language
Command language
Object model programming
Object events
What is the sequence of events?
Field event sequence
Exercise: Experience the Event Model
Query what? Post what?
Event code interplay
Why LotusScript is better for many events
How events on Web browsers differ
Topic
2: Variable and Field Assignment
Key points
Temporary Variables
Setting fields
Valid variable and field names
Reserved and internal field names
Topic
3: @Function Toolbox
Key points
Appending temporary variable and field values
Self-referential field events
Field translation and validation
Matching and equivalence
String parsing
String replacement
Random number
Time/Date functions
Data type conversion
Exercise: Data type conversion
Data testing
DEFAULT keyword
Topic
4: Multi-Value List Functions
Key points
What is a multi-value list?
Multi-value functions
Converting single-value list to multi-value list
Converting a multi-value list to a single-value list
Item count
Selecting a value from the list
Exercise: @Subset and @Implode
Pair-wise and Permutation operators
Determining if a value is in the list
Replacing an item in the list
Summing a list
Exercise: Summing numbers
Date range
Dynamic tables
Topic
5: Conditional Execution
Key points
Branching structure
Single @If with multiple conditions
Multiple actions using @Do
Aborting execution with @Return
Multiple @If statements
Conditional save and mail send
Conditional evaluation based on document state
Exercise: Document state
Conditional evaluation based on user identity
Exercise: User rights
Topic
6: Data Inheritance
Key points
Configuring inheritance
Inheritance caveats
Conditional inheritance
Exercise: Inheritance
Requiring inheritance
Disallowing pasted documents
Inheriting rich text
"Inheritance" across databases
Key points
@NameLookup
@Db function overview
Where to use lookup functions
Lookups and security
@DbColumn Function
Static keywords list
External keywords list
Exercise: @DbColumn
@DbLookup function
@DbLookup parameters using Notes
Error trapping
Exercise: @DbLookup
Creating unique keys
Multiple return values
Document refresh issue
Limiting lookups
Overcoming the size limits
General lookup performance tips
Topic
8: Document Relationships
Key points
When to use response documents
Designing response documents
Creating response documents
Response document internals
Creating the response hierarchy after the fact
Another way to relate documents
Field reference by document UNID
Exercise: Document ID relationship
Lookup versus direct field reference
One-to-many relationships
"Doclink" to parent
Topic
9: Well-Known Locations
Key points
Well-known location techniques
Lookups
Profile Documents
Profile Documents and security
Create Profile Document
Write to Profile Document fields
Read from Profile Document fields
Exercise: Profile Doc
Local NOTES.INI access
Function syntax
Restrictions
Read/set sequence
Exercise: Environment Variable