You are on page 1of 828

software

Lotus Domino Designer 6

Application Development with Lotus Domino Designer

Disclaimer
THIS DOCUMENTATION IS PROVIDED FOR REFERENCE PURPOSES ONLY. WHILE EFFORTS
WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION
CONTAINED IN THIS DOCUMENTATION, THIS DOCUMENTATION IS PROVIDED AS IS
WITHOUT ANY WARRANTY WHATSOEVER AND TO THE MAXIMUM EXTENT PERMITTED,
IBM DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION THE
IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
PARTICULAR PURPOSE, WITH RESPECT TO THE SAME. IBM SHALL NOT BE RESPONSIBLE FOR
ANY DAMAGES, INCLUDING WITHOUT LIMITATION, DIRECT, INDIRECT, CONSEQUENTIAL
OR INCIDENTAL DAMAGES, ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO,
THIS DOCUMENTATION OR ANY OTHER DOCUMENTATION. NOTWITHSTANDING
ANYTHING TO THE CONTRARY, NOTHING CONTAINED IN THIS DOCUMENTATION OR ANY
OTHER DOCUMENTATION IS INTENDED TO, NOR SHALL HAVE THE EFFECT OF, CREATING
ANY WARRANTIES OR REPRESENTATIONS FROM IBM (OR ITS SUPPLIERS OR LICENSORS), OR
ALTERING THE TERMS AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT
GOVERNING THE USE OF THIS SOFTWARE.
Copyright
Under the copyright laws, neither the documentation nor the software may be copied, photocopied,
reproduced, translated, or reduced to any electronic medium or machine-readable form, in whole or
in part, without the prior written consent of IBM, except in the manner described in the documentation or the applicable licensing agreement governing the use of the software.
Copyright IBM Corporation 1985, 2002
All rights reserved.
Lotus Software
IBM Software Group
One Rogers Street
Cambridge, MA 02142
US Government Users Restricted Rights Use, duplication or disclosure restricted by GS ADP
Schedule Contract with IBM Corp.
List of Trademarks
1-2-3, cc:Mail, Domino, Domino Designer, Freelance Graphics, iNotes, Lotus, Lotus Discovery Server,
Lotus Enterprise Integrator, Lotus Mobile Notes, Lotus Notes, Lotus Organizer, LotusScript, Notes,
QuickPlace, Sametime, SmartSuite, and Word Pro are trademarks or registered trademarks of Lotus
Development Corporation and/or IBM Corporation in the United States, other countries, or both.
AIX, AS/400, DB2, IBM, iSeries, MQSeries, Netfinity, OfficeVision, OS/2, OS/390, OS/400, S/390,
Tivoli, and WebSphere are registered trademarks of International Business Machines Corporation in
the United States, other countries, or both. Pentium is a trademark of Intel Corporation in the United
States, other countries, or both. Microsoft, Windows, and Windows NT are registered trademarks of
Microsoft Corporation in the United States, other countries, or both. UNIX is a registered trademark
of The Open Group in the United States and other countries. Java and all Java-based trademarks and
logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States, other
countries, or both.
All other trademarks are the property of their respective owners.

Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . xiii
1 Introduction to IBM Lotus
Domino Designer . . . . . . . . . . . . . . . 1-1

...
Starting Lotus Domino Designer . . . . . . . .
Exploring Lotus Domino Designer . . . . . . .
Creating a database . . . . . . . . . . . . . . . . .
Overview applications and databases

1-1
1-2
1-4
1-7

Displaying, collecting, and storing


information . . . . . . . . . .

2-12

Hide-when options for all applications

..
.

Planning for integration with WebSphere


and DB2 . . . . . . . . . . . . . . . . .

..

2-14

...

2-15

....
......

2-15

Planning an application for mobile users

Designing an application for maximum


accessibility . . . . . . . . . . . . . .
Design considerations for accessible
applications . . . . . . . . . . . . .
Creating multilingual applications

. . . . . . . . 1-8
Organizing your data . . . . . . . . . . . . . . 1-11
Creating navigation . . . . . . . . . . . . . . . 1-12
Structuring your display . . . . . . . . . . . . 1-14
Adding automation . . . . . . . . . . . . . . . . 1-15
Sharing, locking, and editing design
elements . . . . . . . . . . . . . .

. . . . . 1-16
Extending access to applications . . . . . . . 1-17
Communicating across platforms . . . . . . . 1-18
2 Planning an Application . . . . . . . 2-1
Planning an application . . . . . . . . . . . . . . 2-1
Planning a Notes application . . . . . . . . . . . 2-2
Planning a Notes and Web application . . . . 2-2
Tips for designing Notes and Web
applications . . . . . . . . . . . .

......
Planning a Web application . . . . . . . . . . .
Tips for designing Web applications . . . .

2-3
2-8
2-8

Translating an application using IBM


Domino Global Workbench . . . .

...

To create a new database by copying an


existing database . . . . . . . . . . . .

..
To copy individual design elements . . . .
To protect individual design elements . . .
Starting a database from scratch . . . . . . . . .
Organizing your application . . . . . . . . . . .
Using toolbars . . . . . . . . . . . . . . . . . . . .

Domino applets

Creating folders for bookmarks or


design elements . . . . . . . . .

..

2-19

. . . . 2-21
Table of Notes and Domino known limits . 2-23
3 Creating an Application . . . . . . . 3-1
Domino databases . . . . . . . . . . . . . . . . . 3-1
Creating databases . . . . . . . . . . . . . . . . . 3-2
Creating a database from a template . . . . . . 3-2
Copying an existing Domino database . . . . . 3-4

Creating a bookmark on the Bookmark


bar . . . . . . . . . . . . . . . . . . . .

Creating formulas and buttons for the


Web . . . . . . . . . . . . . . . . . . . .

2-17

Adding translation components to a


Designer application . . . . . . .

HTML tag attributes for a Domino


server . . . . . . . . . . . . . . . .

. . . . . . 2-9
. . . . . . . . . . . . . . . . 2-10

2-13

...

.....

3-4
3-5
3-6
3-6
3-7
3-7
3-8
3-10

2-11
Contents iii

Copying a design element to a new


location . . . . . . . . . . . . . . .

3-11

Enabling subscriptions

3-11

Reducing database maintenance with


shared code and shared resources

..
Sharing file resources . . . . . . . . . . . . . .
To create a file resource . . . . . . . . . . .
To open a file resource . . . . . . . . . . . .
To refresh a file resource . . . . . . . . . .
To prevent a file resource from being
refreshed . . . . . . . . . . . . . . .

...

3-12
3-14
3-14
3-15
3-15
3-16

To copy a file resource to your


computer . . . . . . . . . . .

3-16

To delete a file resource

3-16

.......
...........

To set up a file resource for use on the


Web . . . . . . . . . . . . . . . . . . . .

..
Creating an image resource . . . . . . . . . . .
Creating image resource sets . . . . . . . . . .
Document locking . . . . . . . . . . . . . . . .
Previewing your design work . . . . . . . . .
Adding instant messaging to an
application . . . . . . . . . . .

......

3-17
3-17
3-21
3-24
3-25
3-27

Preventing users from accessing forms and


views in a Web application . . . . . .

. 3-28
4 Designing Pages . . . . . . . . . . . . . 4-1
Pages . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
Creating pages . . . . . . . . . . . . . . . . . . 4-3
Displaying a page . . . . . . . . . . . . . . . . 4-5
Creating a home page for an
application . . . . . . . .

4-5

Styling text for the Web

4-6

Creating computed text


Changing all text styles

...............
Creating links . . . . . . . . . . . . . . . . .
Using graphics . . . . . . . . . . . . . . . . .
Adding a background color or graphic .
Adding an applet . . . . . . . . . . . . . . .
Creating an attachment . . . . . . . . . . .
Embedding elements . . . . . . . . . . . . .
Embedding a date picker . . . . . . . . . .
Inserting a JavaScript library . . . . . . . .
Creating sections

....
............

..........
............
............
............

4-7
4-8

Creating and formatting horizontal


rules . . . . . . . . . . . . . . . . .

4-8

Creating programmable tables

4-9

.....
........

iv Application Development with Domino Designer

4-12
4-13
4-15
4-19
4-20
4-21
4-21
4-22
4-23

Using HTML on a page, form, or


subform . . . . . . . . . . . . .

4-23

Layers

4-26

......
......................

Setting launch properties for pages or


forms . . . . . . . . . . . . . . . . .

. . . . 4-32
Creating style sheets as shared resources . . 4-34
Programming a page or form . . . . . . . . . 4-37
Adding HTML header information . . . . 4-37
Adding JavaScript header information . 4-38
5 Designing Forms . . . . . . . . . . . . . 5-1
Forms . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
Form elements . . . . . . . . . . . . . . . . . . . . 5-2
Forms and documents . . . . . . . . . . . . . . . 5-5
Creating and deleting forms . . . . . . . . . . . 5-7
Tips for designing forms . . . . . . . . . . . 5-9
Naming forms . . . . . . . . . . . . . . . . . . 5-9
Making a form available to Web browsers . 5-12
Selected form properties . . . . . . . . . . . . . 5-13
Creating a response hierarchy . . . . . . . 5-17
Version tracking . . . . . . . . . . . . . . . . 5-18
Customizing a form's window title . . . . . . 5-20
Using subforms . . . . . . . . . . . . . . . . . . 5-22
Layout regions . . . . . . . . . . . . . . . . . . . 5-25
Aligning and rearranging elements in a
layout region . . . . . . . . . . . . . . .

5-26

Changing the size and style of a layout


region . . . . . . . . . . . . . . . . . .

Creating an embedded file upload


control . . . . . . . . . . . . . . .

.....
Creating an embedded scheduler . . . . .
Creating an embedded editor . . . . . . .
Profile forms . . . . . . . . . . . . . . . . . . . .
Forms that prompt users for input . . . . . .
Designing a form that presents a dialog
box . . . . . . . . . . . . . . . . . . . . .
Designing a form that prompts users
for information . . . . . . . . . . . .

5-27
5-28
5-29
5-29
5-33
5-36
5-38
5-38

...

5-40

..

5-41

..
..

5-41

......

5-48

Designing a form for a Domino billing


application . . . . . . . . . . . . . . .
Designing a form for contact printing
Customizing the Form processed
confirmation for Web users .

5-27

Designing a form that lets users make


selections from a view . . . . . . . .

...............
Formulas for Date/Time fields . . . . . .
Date/Time fields

..
Adding graphics to a layout region . . . .
Embedded controls . . . . . . . . . . . . . . . .

Displaying a customized error message on


the Web . . . . . . . . . . . . . . . . . .

5-42

. 5-49
Customizing search forms . . . . . . . . . . . 5-50
Tips for improving document display time . 5-59
Testing a form before deploying it . . . . . . 5-60
6 Designing Fields . . . . . . . . . . . . . 6-1
Fields . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1
Creating a single-use field . . . . . . . . . . . . 6-1
Creating a shared field . . . . . . . . . . . . . . . 6-3
Field names and labels . . . . . . . . . . . . . . . 6-6
Field types . . . . . . . . . . . . . . . . . . . . . . 6-7
Text, rich text, and rich text lite fields . . . 6-7
Rich text fields on the Web . . . . . . . . . . 6-9
Number fields . . . . . . . . . . . . . . . . . 6-11

Creating a graphical display for


Date/Time fields . . . . . . .

......
Names fields . . . . . . . . . . . . . . . . . .
Readers and Authors fields . . . . . . . . .

6-13
6-18
6-18
6-21
6-22

Creating fields to display lists of


choices . . . . . . . . . . . . . .

6-22

Generating choices for lists

6-25

......
.........
Creating aliases for choices in a list . . . .
Password fields . . . . . . . . . . . . . . . .
Formula fields . . . . . . . . . . . . . . . . .
Editable and computed fields . . . . . . . . .
Color fields . . . . . . . . . . . . . . . . . . .
Time zone fields . . . . . . . . . . . . . . . .
Editable field formulas . . . . . . . . . . . .
Selected field properties . . . . . . . . . . . . .
Hiding fields . . . . . . . . . . . . . . . . . . . .
Creating a field in a layout region . . . . . .
Adding HTML attributes to a field . . . . . .
Storing HTML in a field . . . . . . . . . . . . .
Creating fields that inherit values . . . . . . .
To create a field that inherits an entire
document . . . . . . . . . . . . . . . .

6-28
6-30
6-32
6-35
6-35
6-35
6-39
6-42
6-44
6-46
6-46
6-47

..

6-48

....
.......

6-49

.........

6-50

To inherit information in a response


hierarchy . . . . . . . . . . . . . .
Standard fields used in templates
Predefined fields with built-in
functionality . . . . . . .

6-27

6-49

Reserved fields that control mailing


options . . . . . . . . . . . . . .

6-51

Fields for version tracking

6-56

......
...........

Designing fields that prompt users to


select folders . . . . . . . . . . .

.....

6-57

Contents v

.........

7 Designing Views . . . . . . . . . . . . . 7-1

Generating category names

.........................
Standard outline views . . . . . . . . . . . .
Calendar views . . . . . . . . . . . . . . . . .
Shared and private views . . . . . . . . . . . . .
Creating a standard outline view . . . . . . . .
Copying and deleting views . . . . . . . . .
Creating a default design for new views . .
Designing folders . . . . . . . . . . . . . . . . . .
Naming a view or folder . . . . . . . . . . . . .

Categorizing in the All by Category


view . . . . . . . . . . . . . . . . .

Views

Selecting which documents display in a


view . . . . . . . . . . . . . . . . . .

...

Examples: Programming documents to


display in a view . . . . . . . . . . .

7-1
7-2
7-4
7-5
7-7
7-8
7-9
7-9
7-9
7-12

..
...

7-13

.....
Creating columns in a view . . . . . . . . . . .
Adding titles to columns . . . . . . . . . .
Setting styles for columns . . . . . . . . . . . .
Formatting date and time columns . . . . . .
Displaying numbers in columns . . . . . . . .
Advanced options for columns . . . . . .
Adding programming to columns . . . . . .
Table of simple functions for columns . . . .
Displaying an icon in a column . . . . . . . .
Sorting documents in views . . . . . . . . . .

7-15

Table of document selection conditions


Description of document selection
conditions . . . . . . . . . . . . .

Overriding alphabetical sorting with a


hidden column . . . . . . . . . . .

....
Using a column to switch to another view .
Generating column totals, averages, and
percents . . . . . . . . . . . . . . . .

...
Setting styles for a standard view or folder .
Display options for views . . . . . . . . . . . .
Adding categories to views . . . . . . . . .

7-14

7-17
7-17
7-18
7-19
7-21
7-22
7-24
7-29
7-31
7-33
7-36
7-37
7-38
7-38
7-40
7-42

vi Application Development with Domino Designer

....
Indenting response documents . . . . . . . .
Formulas for response columns . . . . . . . .
Identifying unread documents . . . . . . . . .
Default views . . . . . . . . . . . . . . . . . . .
Allowing users to edit or create
documents from a view . .

.......
Allowing users to set colors in a view . .
Formulas that look for values in columns
and views . . . . . . . . . . . . . . . .

..
Creating a calendar view . . . . . . . . . . . .
Setting styles for a calendar view . . . . . . .
Displaying views in Web applications . . . .
Specifying how a view displays in a
Web browser . . . . . . . . . . . .

....

Creating an embedded view or embedded


folder . . . . . . . . . . . . . . . . . . . .
Setting display properties for an
embedded view . . . . . . . .

7-44
7-46
7-47
7-48
7-49
7-50
7-50
7-52
7-55
7-56
7-59
7-60
7-61

7-61

......

7-63

To show a single category in embedded


views . . . . . . . . . . . . . . . . . . . .

7-64

To set line counts in embedded views

.
..

7-64

Designing a form as a view or navigator


template . . . . . . . . . . . . . . . .

...

7-65

.....

7-66

Opening a view with a particular


frameset on the Web . . . . . .

Using HTML formatting for views and


columns . . . . . . . . . . . . . . .

....

7-66

Displaying a view as an applet in Web


applications . . . . . . . . . . . . .

....

7-67

........
Hiding a view . . . . . . . . . . . . . . . . . . .
Refreshing view indexes . . . . . . . . . . . .
Adding a trash folder to an application .

7-69

Allowing users to select view


documents on the Web . .

7-70
7-71
7-73

. . . . . 7-74
8 Designing Framesets . . . . . . . . . 8-1
Overview of framesets . . . . . . . . . . . . . . . 8-1
Creating a frameset . . . . . . . . . . . . . . . . . 8-2
Providing content for a frame . . . . . . . . . . 8-4
Setting the style for frames . . . . . . . . . . . . 8-6
Specifying a target frame . . . . . . . . . . . . . 8-9
Launching a database into a frameset . . . . 8-10
Launching a page or form into a frameset . 8-10
Launching a view or folder into a frameset . 8-11
Adding a view for soft deletions

9 Designing Navigation for an


Application . . . . . . . . . . . . . . . . . . . . 9-1

.....
Outlines . . . . . . . . . . . . . . . . . . . . . . . .
Creating an outline . . . . . . . . . . . . . . .
Embedding an outline . . . . . . . . . . . . .
Outlines, navigators, and imagemaps

9-1
9-2
9-3
9-5

Outline, outline entry, and embedded


outline properties . . . . . . . . .

. . . . . 9-7
Selected outline properties . . . . . . . . . . 9-7
Selected outline entry properties . . . . . . 9-8
Selected embedded outline properties . . 9-10

Using the outline applet in Web


applications . . . . . . . . .

........
Displaying the outline in a frameset . . . . .
Navigators . . . . . . . . . . . . . . . . . . . . .
Creating a navigator . . . . . . . . . . . . . . .
Adding graphic objects to navigators . . . .
Adding and enhancing graphics in a
navigator . . . . . . . . . . . . . . .

9-16
9-17
9-17
9-19
9-20

...

9-20

......
Adding hotspots . . . . . . . . . . . . . . . .
Adding actions to navigators . . . . . . . . . .

9-22

Adding text to and highlighting


navigator objects . . . . . . .

Displaying a navigator when users open a


database . . . . . . . . . . . . . . . . . .

9-22
9-23
9-26

Hiding navigators

.................

Embedding navigators in a form, subform,


page, or document . . . . . . . . . . .

9-27

9-27

....

9-28

......
Testing navigators . . . . . . . . . . . . . . . .
Creating an imagemap . . . . . . . . . . . . . .
10 Automation in Applications . .
Automation . . . . . . . . . . . . . . . . . . . . .
Actions . . . . . . . . . . . . . . . . . . . . . . . .
Hotspots . . . . . . . . . . . . . . . . . . . . . . .
Agents . . . . . . . . . . . . . . . . . . . . . . . .
Events . . . . . . . . . . . . . . . . . . . . . . . .

9-29

Overriding an embedded navigator


with a navigator template . . . .
Importing a navigator into a form,
subform, page, or document

Creating a form, subform, page, or view


action . . . . . . . . . . . . . . . . . .

...
Action bar . . . . . . . . . . . . . . . . . . . . . .
Creating and inserting shared actions . . . .
Creating a button . . . . . . . . . . . . . . . . .
Creating a text pop-up . . . . . . . . . . . . . .
Creating a formula pop-up . . . . . . . . . . .
Creating an action hotspot . . . . . . . . . . .
Creating a program for an event . . . . . . .
Creating an agent . . . . . . . . . . . . . . . . .
Triggering an agent on an event . . . . . .
Triggering an agent on a schedule . . . .
Useful agent procedures . . . . . . . . . . .
Examples of agents to run before Web
users open or save documents . . .

9-30
9-30
10-1
10-1
10-2
10-4
10-5
10-6
10-9
10-15
10-17
10-22
10-25
10-26
10-27
10-28
10-30
10-32
10-34
10-36

..

10-38

......
Security for agents on servers and the Web .
Troubleshooting agents . . . . . . . . . . . . .
Testing agents . . . . . . . . . . . . . . . . .

10-40

Setting up agent security using the


Security tab . . . . . . . . . . .

10-41
10-46
10-47

Contents vii

............
Notes server console commands . . . . .
Agent Manager debugging information .
NotesLog Class . . . . . . . . . . . . . . . .
AgentRunner . . . . . . . . . . . . . . . . . .
Simple actions for automation . . . . . . . . .
Using LotusScript for automation . . . . . .
Viewing the agent log

10-48
10-49

12 Including Java Servlets in


Web Applications . . . . . . . . . . . . . 12-1

10-51

Overview of Java servlets

10-53

Comparing agents, servlets, and CGI


programs . . . . . . . . . . . . .

12-2

Running servlets in Domino

12-4

10-54
10-54

............
.....
..........

12-1

10-58

Restricted LotusScript and Java agent


operations . . . . . . . . . . . . .

13 Connecting to Enterprise
Data . . . . . . . . . . . . . . . . . . . . . . . . . 13-1

10-59

Accessing data in enterprise applications

Formulas for automation

10-61

JavaScript for automation

.....
............
...........

Table of supported JavaScript objects


for automated components . . . .

...
Actions and agents names . . . . . . . . . . .
Hiding automated components . . . . . . . .

10-62

..
Table of connectivity solutions . . . . . . .
Overview of Data Connection Resources . .

10-63

Establishing a data source resource for


use with a DCR . . . . . . . . . . . .

10-65
10-66

11 Including Java Applets in


Applications . . . . . . . . . . . . . . . . . . 11-1
Java applets overview

..............

Overview of adding a Java applet to an


application . . . . . . . . . . . . . .

...
Enabling Java applets . . . . . . . . . . . . . .
Linking to an applet on the Web . . . . .
Setting applet parameters . . . . . . . . . . . .
Specifying applet parameters, attributes,
and properties . . . . . . . . . . . .

...
Setting HTML attributes . . . . . . . . . . .
Setting Alternate HTML attributes . . . .
Setting properties . . . . . . . . . . . . . . .
Setting up shared applet resources . . . .
Stopping, selecting, and restarting applets .
Copying and deleting applets . . . . . . . . .
Refreshing and exporting applet files . .
Setting security for applets . . . . . . . . .
Saving applet data . . . . . . . . . . . . . .
Tips and troubleshooting for Java applets .

Creating a database connection


resource . . . . . . . . . . . .

.......

13-6

Specifying options for the data


connection resource . . . . .

.......

13-7

11-2

Using a data connection resource on a


form . . . . . . . . . . . . . . . . . . .

11-5
11-6
11-7

Importing data from an external


database into an application

11-10
11-11
11-11
11-12

......

13-9

..

13-10

......

13-11

Using ODBC to access relational databases

.............................
Registering data sources for ODBC . . . .
Setting up a view for ODBC access . . . . . .
Writing formulas and scripts to access
relational databases . . . . . . . . . .

11-7
11-8

13-5
13-6

Enabling connections to external


databases . . . . . . . . . . . .

11-5

13-3

..

11-1

11-2

13-1

..

13-13
13-14
13-15
13-16

14 Including OLE and ActiveX


Objects in Applications . . . . . . . . 14-1

......
Linking and embedding objects in forms . .
Adding OLE custom controls to a form .
Designing applications using OLE

11-13
11-15
11-18

viii Application Development with Domino Designer

Troubleshooting tips for OLE and


ActiveX objects . . . . . . . . . .

.....

14-1
14-2
14-4
14-5

Modifying a form to size an embedded


object . . . . . . . . . . . . . . . . . . .

..

14-6

....

14-6

Modifying a form to run a custom


control in Read mode . . . . . .

14-8

Updating objects by document

.....
.......
.......

14-8

Modifying a form so that it sizes an


OLE custom control . . . . . . . .

Launching objects automatically

Designing forms that launch objects


automatically . . . . . . . . . . . .
Launching an object "in-place" or
"out-of-place" . . . . . . . . . .

....

......

14-9
14-10
14-12

16 Creating a Workflow
Application . . . . . . . . . . . . . . . . . . . 16-1

...............
Planning workflow . . . . . . . . . . . . . . . .
Setting up automatic mailing . . . . . . . . . .
Mailing features and Web applications . . .
Displaying the Mail Send dialog box . . . . .
Creating a database that receives mailings .
Workflow overview

16-1
16-2
16-3
16-5
16-5
16-5

Example of using an agent that sends


automatic replies . . . . . . . . . .

...

16-6

Example of using an agent that mails


action item notices . . . . . . . . .

...

16-7

Example of using an agent that sends


announcements . . . . . . . . . . .

...

16-8

Specifying the event that causes an


object to autolaunch . . . . . . .

....

14-12

Designing a form that launches an


object from modal dialog boxes

....

14-13

Designing a form to hide the Notes


document . . . . . . . . . . . . . .

....

14-14

17 Using Third-Party Tools and


WebDAV to Extend an
Application . . . . . . . . . . . . . . . . . . . 17-1

......
Publishing actions . . . . . . . . . . . . . . . .
Exchanging data using Notes/FX . . . . . . .
Preparing a form to exchange data . . . . . .

14-16

Developing applications using third-party


tools and WebDAV . . . . . . . . . . .

17-1

14-17

Customizing the Designer Tools menu

17-2

14-19

Organizing tools on the Tools menu

14-20

Editing and managing database resources


using a WebDAV client . . . . . . .

Hiding an embedded object in a


document . . . . . . . . . . . .

15 Including XML and Viewing


DXL in Designer Applications . . . 15-1

...................
Domino applications and XML . . . . . . . .
What is XML?

Ways to include XML in a Designer


application . . . . . . . . . . .

......
XML terminology . . . . . . . . . . . . . . . . .
Putting XML in a form or page . . . . . . . .
Using a view to generate XML . . . . . . . . .
Using an agent to generate XML . . . . . . .
Using a Java servlet to generate XML . . . .
Viewing the XML in an application
with DXL utilities . . . . . . . . .

....

15-1
15-4
15-5
15-6
15-8
15-11
15-13
15-15
15-17

.
...
...

17-3

..

17-4

.....

17-7

.........
18 Application Security . . . . . . . .
Security in an application . . . . . . . . . . . .
The database access control list . . . . . . . .
Setting up a database ACL . . . . . . . . . . .
Access levels in the ACL . . . . . . . . . . . .
Access level privileges in the ACL . . . . . .
Roles in the ACL . . . . . . . . . . . . . . . . .
Editing the database ACL . . . . . . . . . . . .
Default ACL entries . . . . . . . . . . . . . . .

17-10

Accessing database resources using a


WebDAV client . . . . . . . . .
Using WebDAV in a replicated
environment . . . . . . .

18-1
18-1
18-2
18-2
18-3
18-6
18-9
18-11
18-12

Contents ix

.........
User types in the ACL . . . . . . . . . . . . . .
Enforcing a consistent access control list . .
Displaying the ACL history . . . . . . . . . .
To display a name's effective access . . . . .
Security overview for Web applications . . .
Application access for Web users . . . . . . .
Acceptable entries in the ACL

Enforcing encrypted Web transactions


using SSL . . . . . . . . . . . . . .
To require an SSL connection to a
database . . . . . . . . . . . . . .

....

.....

Maximum Internet name-and-password


access . . . . . . . . . . . . . . . . . .
Examples of ACL settings for a Web
database . . . . . . . . . . . . . .
Application design element security

.....
.....

Controlling access to a database during


design . . . . . . . . . . . . . . . . .
Restricting who can read or edit
documents . . . . . . . . .

...

18-13
18-20
18-21
18-23
18-23
18-24
18-24
18-25
18-26
18-26
18-28
18-29

...

18-30

........

18-30

Using a Readers field to restrict access


to specific documents . . . . . . . .
Using an Authors field to restrict who
can edit specific documents . . . .
To create Readers and Authors fields

..

18-30

..
..

18-31

Examples of restricting who can read or


edit specific documents . . . . . . . .

.
Tracking who edits a document . . . . . . . .
Updating Readers and Authors fields . . . .
Setting up the Administration Process for
databases . . . . . . . . . . . . . . . .

18-32
18-33
18-34
18-35

..

18-36

.....
Limiting Editor access to sections of forms .

18-36

Creating controlled-access sections of


forms . . . . . . . . . . . . . . . .

18-41

...
Notes and Domino encryption . . . . . . . . .
Database encryption . . . . . . . . . . . . . . .
Encryption levels . . . . . . . . . . . . . . .
To encrypt a database . . . . . . . . . . . .
Encrypting documents and fields . . . . . . .

18-43

Access-controlled forms and documents


Creating public access pages, forms,
subforms, outlines, views, agents,
and style sheets . . . . . . . . . . .

Procedural overview: encrypting


documents . . . . . . . . .

........
Enabling encryption for a field . . . . . . .
Allowing the author to choose the
encryption key . . . . . . . . . .

.....
Creating secret encryption keys . . . . . . . .
Distributing secret encryption keys . . . . . .
Merging secret encryption keys . . . . . . . .
To create a field that maintains a list of
secret encryption keys . . . . . . . .

18-40

Creating write access lists to limit folder


access . . . . . . . . . . . . . . . . . . . .

18-41

x Application Development with Domino Designer

18-46
18-46
18-47
18-49
18-49
18-49
18-50
18-51
18-53
18-54

..
Managing encrypted information . . . . . . .
To encrypt all documents automatically .

18-55

Examples: Creating a field that


maintains a list of encryption keys

Using electronic signatures in Notes


applications . . . . . . . . . . .
Attaching signatures to documents

......
......

18-56
18-57
18-57
18-60

19 Completing an Application
and Managing Design Changes . . 19-1
Completing an application

...........

Creating a database icon for a Notes


application . . . . . . . . . . . .

.....
Providing online Help for an application . .
Creating "Using Database" and "About
Database" documents . . . . . . . .

18-45

..

18-38

Creating read access lists to limit view and


folder access . . . . . . . . . . . . . . .

18-45

19-1
19-2
19-3

..

19-3

Creating context-sensitive Help for an


application . . . . . . . . . . . . . . .

19-5

Writing Help for fields

..
............

19-6

Creating and displaying more detailed


application Help . . . . . . . . . . . .

19-7

Specifying a home page in the Web site


document . . . . . . . . . . . . . . .

19-8

Restricting design changes

...
...........

19-9

Checking the application design before


release . . . . . . . . . . . . . . . .
Checking form design
Checking field design
Checking view design

...........
Modifying multiple design elements . . . . .
Hiding the design of a database . . . . . . . .
Hiding design elements . . . . . . . . . . . . .
Locking a design element . . . . . . . . . . . .
20 Deploying an Application . . . .
Preventing design changes

..

....
..............
..............
..............

Making a design copy of a completed


application . . . . . . . . . . . .

.....
Pilot testing an application . . . . . . . . . . .
Renaming a database . . . . . . . . . . . . . . .
Renaming design elements . . . . . . . . .
Design synopsis . . . . . . . . . . . . . . . . . .

19-9
19-10
19-11
19-12
19-14
19-16
19-17
19-17
19-18

Updating documents after redesigning a


form . . . . . . . . . . . . . . . . . .

19-20

Checking field values in a document

...
.....

19-21

......
Changing database and design properties .
Setting database launch properties . . . .
Templates
.....................
Creating templates . . . . . . . . . . . . . . . .
Examples: Creating templates . . . . . . .
Creating a design library template . . . .
Linking a database to a template . . . . .

19-22

Using agents to update documents


affected by form changes . .

19-24
19-25
19-27
19-28

Database design, management, and


administration . . . . . . . . .

......
Rolling out a database . . . . . . . . . . . . . .
Mandatory tasks . . . . . . . . . . . . . . . .
Optional tasks . . . . . . . . . . . . . . . . .
Copying a new database to a server . . . . .
To copy a new database to a server . . . .
Setting up replication for an application . . .
Creating one replica manually . . . . . . .
Replication settings . . . . . . . . . . . . . . . .
Limiting the contents of a replica . . . . .

19-41
19-42
19-43
19-44
19-46
20-1
20-1
20-2
20-2
20-3
20-4
20-4
20-6
20-6
20-8
20-10

Assigning miscellaneous replication


settings . . . . . . . . . . . . . . . .

20-13

Limiting what a replica sends

20-14

Specifying replication settings

....
.......
.......

Examples of specifying replication


settings for multiple replicas .

.....

20-15
20-16

19-29

Disabling and enabling replication of a


database . . . . . . . . . . . . . . .

19-30

Forcing a server database to replicate

19-31

21 Optimizing and
Troubleshooting Databases . . . . . 21-1

19-32

Setting advanced database properties

.....
Making and distributing design changes . .
Refreshing a design . . . . . . . . . . . . . . . .
Replacing a design . . . . . . . . . . . . . . . .
Design changes and replication . . . . . . . .

19-33

Properties that improve database


performance . . . . . . . . .

Linking individual design elements to a


template . . . . . . . . . . . . . . . . . .
Synchronizing databases with master
templates . . . . . . . . . . . . .

19-35
19-36
19-38
19-40

....
....

Monitoring database size

20-19

....

21-1

.......

21-1

To set database properties that optimize


database performance . . . . . . . . .
Controlling database size

20-18

.
............
............

21-7
21-8
21-9

Contents xi

..............
Document archiving tool . . . . . . . . . . . .
Viewing a document Archiving Log . . .

Compacting databases

Using an agent to delete and archive


documents . . . . . . . . . . . .

.....

Examples of using an agent to delete


and archive documents . . . . . .

...
Monitoring replication of a database . . . . .
The database replication history . . . . . .
Viewing replication events in the log
file . . . . . . . . . . . . . . . . . . . .
Replication or save conflicts

...
..........
.....
..........

Viewing database activity statistics


generated by the Statlog task . .

....

Managing database activity recording


in databases . . . . . . . . . . . . . . .

..
Updating database indexes and views . . . .
Notifying users of a moved database . . .
Troubleshooting database performance . . .
Users cannot access the database . . . . .
Users experience a delay when
accessing the database . . .

.......

Using Find Note to analyze a document


reported in the log file . . . . . . . . .

.
....

Troubleshooting replication problems

A database replica does not contain all


the documents it should . . . . . . .
A database replica is not receiving
design changes . . . . . . . . . .

21-12
21-14
21-14

21-16
21-16

21-19

...

21-31

The new replica contains the ACL of


the source server but you did not
copy the ACL . . . . . . . . . . . . .

...

21-31

...
Deletions are not replicating . . . . . . . .
Unexpected deletions occur in a replica .
Deleted documents reappear . . . . . . . .

21-32

You see the message "Database is not


fully initialized yet" . . . . . . . . .

21-15

21-18

The database replica has not received


ACL changes . . . . . . . . . . . . .

............
Overview of DOLS developer tasks . . .

21-20
21-21

Copying DOLS design elements into the


main database . . . . . . . . . . . .
Customizing how users install the
DOLS subscription . . . . . . .

21-22
21-23

Configuring the DOLS subscription

21-24

Optional tasks for DOLS developers

21-33
21-33

21-25

22-1
22-2

...

22-2

.....
.....
.....

22-4

Adding a directory catalog to a DOLS


subscription . . . . . . . . . . . . . . .

21-24

21-25

21-32

22 Enabling an Application for


Domino Off-Line Services . . . . . . 22-1
Domino Off-Line Services

Consolidating replication or save


conflicts . . . . . . . . . . . . . .
Monitoring database activity

21-9

..

22-5
22-15
22-22

Appendix A Domino Designer


Templates . . . . . . . . . . . . . . . . . . . . A-1

21-26

Appendix B Importing to and


Exporting from Views . . . . . . . . . . . B-1

21-27

Appendix C Developing
Applications Using MAPI . . . . . . . . C-1

21-28

..

21-29

Appendix D Features to Avoid


Using in Web Applications . . . . . . . D-1

.....

21-30

Appendix E URL Commands for


. . . . . . . . . . . . . E-1
Web Applications

21-30
21-30

Appendix F Accessibility and


Keyboard Shortcuts . . . . . . . . . . . . F-1

21-31

Index . . . . . . . . . . . . . . . . . . . . . . . Index-1

Changes to the database title do not


replicate . . . . . . . . . . . . . . .

....
Database replicas are different sizes . . .
The database stops replicating
......

xii Application Development with Domino Designer

Preface
The documentation for IBM Lotus Notes, IBM Lotus Domino, and IBM
Lotus Domino Designer is available online in Help databases and, with the
exception of the Notes client documentation, in print format.

License information
Any information or reference related to license terms in this document is
provided to you for your information. However, your use of Notes and
Domino, and any other IBM program referenced in this document, is solely
subject to the terms and conditions of the IBM International Program
License Agreement (IPLA) and related License Information (LI) document
accompanying each such program. You may not rely on this document
should there be any questions concerning your right to use Notes and
Domino. Please refer to the IPLA and LI for Notes and Domino that is
located in the file LICENSE.TXT.

System requirements
Information about the system requirements for Lotus Notes and Domino is
listed in the Release Notes.

Printed documentation and PDF files


The same documentation for Domino, and Domino Designer that is available in online Help is also available in printed books and PDF files.
You can order printed books from the IBM Publications Center at
www.ibm.com/shop/publications/order.
You can download PDF files from the IBM Publications Center and from
the Documentation Library at the Lotus Developer Domain at
www-10.lotus.com/ldd.

Related information
In addition to the documentation that is available with the product, other
information about Notes and Domino is available on the Web sites listed
here.

IBM Redbooks are available at www.redbooks.ibm.com.

xiii

A technical journal, discussion forums, demos, and other information is


available on the Lotus Developer Domain site at
www-10.lotus.com/ldd.

Table of conventions
This table lists conventions used in the Notes and Domino documentation.
Convention

Description

italics

Variables and book titles are shown in italic type.

monospaced type

Code examples and console commands are


shown in monospaced type.

file names

File names are shown in uppercase, for example


NAMES.NSF.

hyphens in menu names


(File - Database - Open)

Hyphens are used between menu names, to show


the sequence of menus.

Structure of Notes and Domino documentation


This section describes the documentation for Notes, Domino, and Domino
Designer. The online Help databases are available with the software
products. Print documentation can be downloaded from the Web or
purchased separately.
Release Notes
The Release Notes describe new features and enhancements, platform
requirements, known issues, and documentation updates for Lotus Notes 6,
Lotus Domino 6, and Lotus Domino Designer 6. The Release Notes are
available online in the Release Notes database (README.NSF). You can
also download them as a PDF file.
Documentation for the Notes client
The Lotus Notes 6 Help database (HELP6_CLIENT.NSF) contains the
documentation for Notes users. This database describes user tasks such as
sending mail, using the Personal Address Book, using the Calendar and
Scheduling features, using the To Do list, and searching for information.
Documentation for Domino administration
The following table describes the books that comprise the Domino Administration documentation set. The information in these books is also found
online in the Lotus Domino Administrator 6 Help database
(HELP6_ADMIN.NSF).
The book Installing Domino Servers ships with Domino. The other books are
available for purchase, or for free download as PDF files.

xiv Application Development with Domino Designer

Title

Description

Upgrade Guide

Describes how to upgrade existing Domino servers and


Notes clients to Notes and Domino 6. Also describes how
to move users from other messaging and directory
systems to Notes and Domino 6.

Installing Domino
Servers

Describes how to plan a Domino installation; how to


configure Domino to work with network protocols such
as Novell SPX, TCP/IP, and NetBIOS; how to install
servers; and how to install and begin using Domino
Administrator and the Web Administrator.

Administering the
Domino System,
Volumes 1 and 2

Describes how to register and manage users and groups,


and how to register and manage servers including
managing directories, connections, mail, replication,
security, calendars and scheduling, activity logging,
databases, and system monitoring. This book also
describes how to use Domino in a service provider
environment, how to use Domino Off-Line Services, and
how to use IBM Tivoli Analyzer for Lotus Domino.

Administering Domino
Clusters

Describes how to set up, manage, and troubleshoot


Domino clusters.

Documentation for Domino Designer


The following table describes the books that comprise the Domino Designer
documentation set. The information in these books is also found online in
the Lotus Domino Designer 6 Help database (HELP6_DESIGNER.NSF)
with one exception: Domino Enterprise Connection Services (DECS) Installation
and User Guide is available online in a separate database, DECS User Guide
Template (DECSDOC6.NSF). The printed documentation set also includes
Domino Objects posters.
In addition to the books listed here, the Domino Designer Templates Guide is
available for download in NSF or PDF format. This guide presents an
in-depth look at three commonly used Designer templates: TeamRoom,
Discussion, and Documentation Library.
Title

Description

Application Development with


Domino Designer

Explains how to create all the design elements used


in building Domino applications, how to share
information with other applications, and how to
customize and manage applications.

Domino Designer Programming Introduces programming in Domino Designer and


Guide,
describes the formula language.
Volume 1: Overview and
Formula Language
continued
Preface xv

Title

Description

Domino Designer Programming Describes the LotusScript/COM/OLE classes for


access to databases and other Domino structures.
Guide,
Volumes 2A and 2B:
LotusScript/COM/OLE Classes
Domino Designer Programming Provides reference information on using the Java
and CORBA classes to provide access to databases
Guide,
Volume 3: Java/CORBA Classes and other Domino structures.
Domino Designer Programming Describes the XML and JSP interfaces for access to
Guide,
databases and other Domino structures.
Volume 4: XML Domino DTD
and JSP Tags
LotusScript Language Guide

Describes the LotusScript programming language.

Domino Enterprise Connection


Services (DECS) Installation
and User Guide

Describes how to use Domino Enterprise


Connection Services (DECS) to access enterprise
data in real time.

Lotus Connectors and


Connectivity Guide

Describes how to configure Lotus Connectors for


use with either DECS or IBM Lotus Enterprise
Integrator for Domino (LEI). It also describes how
to test connectivity between DECS or LEI and an
external system, such as DB2, Oracle, or Sybase.
Lastly, it describes usage and feature options for all
of the base connection types that are supplied with
LEI and DECS. This online documentation file
name is LCCON6.NSF.

Lotus Connector LotusScript


Extensions Guide

Describes how to use the LC LSX to


programmatically perform Lotus Connector-related
tasks outside of, or in conjunction with, either LEI
or DECS. This online documentation file name is
LSXLC6.NSF.

IBM Lotus Enterprise


Integrator for Domino (LEI)
Installation Guide

Describes installation, configuration, and migration


information and instructions for LEI. The online
documentation file names are LEIIG.NSF and
LEIIG.PDF. This document is for LEI customers
only and is supplied with LEI, not with Domino.

IBM Lotus Enterprise


Integrator for Domino (LEI)
Activities and User Guide

Provides information and instructions for using LEI


and its activities. The online documentation file
names are LEIDOC.NSF and LEIDOC.PDF. This
document is for LEI customers only and is supplied
with LEI, not with Domino.

xvi Application Development with Domino Designer

Planning Applications

Chapter 1
Introduction to IBM Lotus Domino Designer
Welcome to IBM Lotus Domino Designer. Domino Designer is an
integrated application development environment that lets developers
and Web site designers create, manage, and deploy secure, interactive
applications.
This overview introduces some of the features you will use to create
applications.
The Whats new in this release chapter provides quick links to topics
defining the new features in Lotus Domino Designer Release 6.

Overview applications and databases


One major focus of Domino Designer Release 6 is on enhancing the
accessibility of your Domino applications by enabling you to:

Share, lock, and edit design elements

Provide nontraditional means for accessing your applications

Communicate across platforms

Applications
Domino applications enable people to share, collect, track, and organize
information, using Lotus Notes or the Web. Using Lotus Domino
Designer, developers can create applications to meet a variety of business
needs, including:

Workflow applications that route information.

Tracking applications that monitor processes, projects, performance,


or tasks.

Collaboration applications that create a forum for discussion and


collaboration.

Data integration applications that work with relational databases and


transactional systems.

Dynamic applications that produce content based on, for example,


user name, user profile, access rights, or time of day.
1-1

Localization and Management applications that use Domino Global


WorkBench to translate Lotus Domino databases and Web sites.

Databases
All Notes applications contain one or more databases. You create a
database to use as the container for the data, logic, and design elements
in your application. Design elements include:

Pages

Forms

Outlines

Navigators

Views

Folders

Framesets

Shared Resources

Agents

Starting Lotus Domino Designer


There are three ways to start Lotus Domino Designer from the Notes
client:

From the Bookmark bar

From a database

From the command line

To start Domino Designer from the Bookmark bar in the Notes client

Click the Domino Designer icon on the Bookmark bar.


Note If you do not see the Domino Designer icon, Domino Designer
may not be installed on your system.
The customizable welcome page of Domino Designer displays.

From the Domino Designer welcome page you can open an existing
database or create a new one. When you open a database, either a new or
existing one, the Domino Designer Work pane displays.

1-2 Application Development with Domino Designer

If you already have a database to work with, you can start Domino
Designer directly from that database. You must have Designer or
Manager access to the database in the ACL.
1. Open the database.
2. Choose View - Design.
Tip You can also right-click the database icon on the Bookmark bar and
select Open in Designer from the list.

To start Domino Designer from the command line


Note You can only use this method if you have already opened
Designer and know the Replica ID of a database and Note ID of a
document in that database. Also, the user whose Notes ID is used when
Notes is launched must have at least Designer access to the database.
You can open a specific database in Domino Designer by entering its
Replica ID and a Note ID in the command line.
1. From the MS-DOS prompt, switch to the Notes directory.
2. Enter either:
designer Notes:///Rep_id/Note_id (for a local database)
designer Notes://Server_Name/Rep_id/Note_id (for a hosted
database)
where Rep_id is the Replica ID of the database(do not include the
colon), Note_id is the Note ID of a document in that
database(include only the characters that follow the NT and the
series of zeros that make up the ID), and Server_Name is the name of
the server/database as it appears in the Design pane, with the server
name, followed by a slash, then the database name.
From Designer, you can find a databases Replica ID by opening the
Database Properties box. The Replica ID, which is a series of numbers
and letters, for example, 85256BE5:0051F014, is listed on the Info tab.
From Notes, you can find the Note ID for a document by opening the
Document Properties box. The Note ID, which is a series of numbers and
letters following the letters NT, for example, NT000002AA, is listed on
the Document IDs tab. Given these Replica and Note IDs, you could open
this database if it was local by entering:
designer Notes:///85256BE50051F014/2AA

To open this database (named customer.nsf) hosted by the Casco/Bay


server, enter:
designer Notes://Casco/customer.nsf/85256BE50051F014/2AA
Introduction to IBM Lotus Domino Designer 1-3

Planning Applications

To start Domino Designer from a database in the Notes client

Alternatively, you can use LotusScript to retrieve the Replica ID of a


database and Note ID of a document. You can also use the formula
language @functions @ReplicaID and @NoteID to retrieve them.

Exploring Lotus Domino Designer


Building a great application requires the right tools. You can think of
Domino Designer as your workshop it contains all the tools you need
to build a powerful application. Before you start building, examine the
work area.
Menu bar
Preview buttons
Properties box button
Window tabs
Design bookmarks
Design action buttons

Bookmark bar
Design pane
Work pane

1-4 Application Development with Domino Designer

Purpose

Design action buttons

These convenient buttons trigger common tasks, such as


creating new design elements.

Design list

Displays a list of the design elements or resources that


are stored in the current database. This list displays in
the Work pane. When you click a list item, the Work
pane changes to display the work area for the selected
element or resource.

Design pane

Displays the design elements and resource types that a


database can contain. If you click an element, such as
Pages for example, a list of the pages stored in the
current database displays in a Design list on the Work
pane. The Design action button at the top of the Design
list for Pages enables you to create a new page.

Designer bookmarks

Listed along the left side of the welcome page,


bookmarks help you to quickly access and organize
your databases. You can drag a database onto the
bookmark pane to bookmark it or you can create a
folder on the bookmark pane to which you can drag
related databases. By default, Designer provides a
Recent Databases folder. You can create additional
bookmarks and folders.

Menu bar

Presents context-sensitive menus of Designer


commands.

Preview buttons

Launch a browser to preview your work.

Properties box button

Opens the Properties box for the active design element.

Window tabs

Let you navigate among the open windows in your


workspace.

Work pane

When a design element or resource type is selected in


the Design pane, displays the Design list. When an
element or resource is selected from the Design list,
displays two sections. The upper section contains the
Work area for the element or resource. The lower
section contains the Programmers pane, which is
shown in the illustration below.

Introduction to IBM Lotus Domino Designer 1-5

Planning Applications

Item

Title bar
Reference tab
Objects tab
Info list
Script area
Errors box

Item

Purpose

Info List Scrollable window that displays the objects and coding reference
information for the design element currently displayed in the Work
area.
Objects
tab

Lets you navigate between objects and events in the Programmers


pane. To work on an object, select it to expand its list of properties and
events. If you select a property or event, the script area of the
Programmers pane changes to show the code that describes it. Events
and properties that are already programmed appear in a darker color.

Referenc The Reference tab of the Info List is language sensitive; the contents of
e tab
the Reference tab change depending on the language selected. If you
are editing in the Formula language, the window contains
@commands, @functions and fields. If you are editing in LotusScript,
the window contains LotusScript information. If you are editing in
JavaScript, the window contains information about the Document
Object Model. If you are editing in Java, the window contains
Java-related information.
Script
area

Lets you enter formulas in the Script area. Formulas can be written in
Formula language, LotusScript, JavaScript, or simple actions.
Note that you can print source code by selecting File - Print when you
are in the Programmers pane. You can print any code you can view in
the Programmers pane.

1-6 Application Development with Domino Designer

Properties boxes are tools you use to select or modify settings for a
design element. Properties boxes have tabs and each tab presents
different attributes or options. If you hold the cursor over the icon on a
tab, the name of the tab appears. In most windows, right clicking opens
the Properties box for the active design element. You can also choose
Design <element> Properties from the menu.

Properties boxes are context-sensitive so you can leave them open on


your workspace and they will change to reflect the element that you are
working with.
Tip You can also collapse some Properties boxes into context-sensitive
tool bars by double-clicking the top of the box.

Creating a database
There are three ways to create a database:

Using a template.
The fastest way to create a database is to use one of the Domino
templates included with Domino Designer. Domino Designer
includes templates for creating a variety of applications. Applications
created using one of the Domino Designer templates can be used as
is or customized.
To decide if there is a template that is right for you, see the Table of
Domino Designer templates.

Copying an existing database.


Introduction to IBM Lotus Domino Designer 1-7

Planning Applications

Properties boxes

If you have access to a database that already has all the elements you
are looking for, you can copy the design and create a new database
with the same features. Once you have created the database, you can
customize it to meet your companys needs.

Building your own.


If you need to create a unique database, build your own. Choose File
- Database - New from the Domino Designer menu. Name the
database, select Blank from the template list, and click OK. This
creates an empty database in which you can create your own design
elements.

For more information, see the chapter, Creating an application.

Displaying, collecting, and storing information


How you display, collect, and store information is an important part of
any application. The design elements you use to accomplish these tasks
are:

Pages

Forms and documents

Fields

Starting in Lotus Domino Designer Release 6, you can use layers on


pages and forms. Arranging fields, buttons, and other UI content on a
layer enables you to develop your page or form content in chunks that
can then be easily organized and quickly rearranged.

Pages
A page is a database design element that displays information. Pages are
a familiar Web concept. Almost every Web site has a home page a
page that contains information about the company, graphics that
enhance the page, and links that take you to other places within the site
or elsewhere on the Web.

1-8 Application Development with Domino Designer

Planning Applications
Pages can be used anytime you are displaying information to the user.
Pages can contain:

Layers

Text

Tables

Graphics

Applets

Embedded objects such as views

Links

Pages often work in conjunction with framesets to display graphics, site


navigation, or applets.
For more information on layers, see the chapter Designing Pages.

Forms and documents


Forms, like pages, display information. Everything that can be done with
a page can be done with a form. What sets forms apart from pages is that
forms can be used to collect information. A form provides the structure
for creating and displaying documents. Documents are the elements that
store data in the database.
Introduction to IBM Lotus Domino Designer 1-9

When you create a form in Designer, users can open the form in the
Notes client from the Create menu. On the Web, you must provide a
button or action that opens the form. When the user completes the form
and saves it, the information is saved as a document. When a user
reopens the document, the document uses the form as a template for
displaying the data.
For more information on forms and documents, see the chapter
Designing Forms.

Fields
Fields are the elements on forms that collect data. Each field on a form
stores a single type of information, which is stored in documents. A
fields data type defines the kind of information a field accepts.
You can create fields in the following data types:

Text

Date/Time

Number

Dialog List

Check box

Radio button

Listbox

Combo box

Rich text

Authors

Names

1-10 Application Development with Domino Designer

Readers

Password

Formula

Time zone

Rich text lite

Color

You decide if a field is editable that is, populated by user input, or


calculated by formulas. You can program fields to retrieve data from
other Domino applications or from external sources. In addition, you can
create shared fields, which can be used in many forms within the same
database.
For more information, see the chapter Designing Fields.

Organizing your data


You organize the documents in your database using:

Views

Folders

Views
Views are the entry point to the data stored in a database because they
display a sorted or categorized list of documents. Every database must
have at least one view, although most databases have more than one.
Views select the documents they display programmatically, so you can
create a view that shows all of the documents in your database or only
some of the documents, based on a formula. Views can also sort the
documents they display by a field on the form, such as date, category, or
author. Note that you can create views that are hidden from users but
organize your data so that other applications can retrieve the information
from the documents.

Introduction to IBM Lotus Domino Designer 1-11

Planning Applications

For more information, see the chapter Designing Views.

Folders
A folder is a container that stores documents. Folders have the same
design elements as views, and you design folders in much the same way
as a view. The difference between folders and views is that a view
always has a document selection formula that collects and displays
documents automatically. A folder remains empty until users or
programs add documents to the folder.
For more information on folders, see Lotus Notes 6 Help.

Creating navigation
Every application needs to include a way to navigate from one place to
another. You add navigation to an application using:

Outlines

Navigators

When you create a new database from a blank template, Designer


provides a default navigation structure called the Folder pane
(sometimes called the Navigation pane). The Folder pane displays all the
shared views and folders in the database. It displays on the left pane of
the Notes client and on the top left of a browser window. You can choose
to use this navigation structure or design a different one.

Outlines
You can create an outline to customize the Folder pane of an application.
An outline is the skeleton of your application: each outline entry
represents a key piece of the application. An outline can include
background graphics, custom icons, links, or actions. When the outline is
1-12 Application Development with Domino Designer

Create a new or default outline and create an outline entry for each
piece of the application you want to include in the navigation
structure or site map.

Embed your outline on a form or page.

Format the display of the embedded outline. You can put the page or
form in which the outline is embedded into a frameset if you choose.

You can also use an outline to plan your application before you create
any design elements.

For more information, see the chapter Designing Outlines.

Navigators
Navigators are graphical road maps that direct users to specific parts of a
database. They let users find documents or take actions without having
to open views. Navigators are like image maps. You can create hotspots
on a graphic that take the users to links within or outside of your
application. You can embed navigators on forms or pages. Navigators
can take the place of the folder pane or work in conjunction with it.
For more information, see the chapter Designing Navigators.

Introduction to IBM Lotus Domino Designer 1-13

Planning Applications

embedded on a page or form, users can click on the outline entries,


which take them where you want them to go. The process of creating a
navigation structure with an outline involves three steps:

Structuring your display


For an application interface to be intuitive and efficient, it must make
good use of the users screen. One way for a designer to accomplish this
is to use framesets.
A frameset is a collection of frames. A frame is one section, or pane, of
the larger frameset and is independently scrollable. By using framesets,
designers can create links and relationships between frames. Framesets
let you leave one page displayed as users scroll or link to other pages or
databases. There is no HTML required to design a frameset.

Designer lets you:

Create an effective multi-paned user interface for your applications.

Control frame attributes such as size, scrolling, border colors and


width, and frame spacing.

Determine frame source content at runtime.

Create programmable links that are maintained automatically.

Set a frameset to launch automatically when a database, form, or


page opens.

For more information, see the chapter Designing Framesets.

1-14 Application Development with Domino Designer

Adding automation to an application can speed up repetitive tasks, route


documents, update information, perform calculations, run programs, and
check for errors.
You can add the following automated components to the design elements
in a Domino application such as a database, a view, a form, or a
document:

Actions

Hotspots

Agents

Actions
Actions automate tasks that are found on Notes menus or tasks defined
by formulas or a LotusScript program. Users click a button, hotspot, or
pick from the Action menu to execute the action. For Web applications in
particular, use actions to simulate Notes menu items.

Hotspots
A hotspot is text or a picture that a user can click to perform an action,
run a formula or script, or follow a link. The hotspot can be a link to
another Web site, database, or element in a database. It can be a button,
pop-up, or an action as well.

Agents
Agents are programs that perform a series of automated tasks according
to a set schedule or at the request of a user. An agent consists of three
components: the trigger (when it acts), the search (what documents it acts
on), and the action (what it does). Use agents to set up user-activated
tasks, or background tasks, in any part of a Domino application. Agents
can be simple, such as moving documents to a folder, or complex, using
Java programs to run multiple automated tasks at scheduled times.
Agents are stored with databases, but you can use them to run
automated tasks for views, documents, fields, and databases.
For more information, see the chapter Adding Automation to
Applications.

Introduction to IBM Lotus Domino Designer 1-15

Planning Applications

Adding automation

Sharing, locking, and editing design elements


Notes is a powerful tool because it helps developers work
collaboratively. Lotus Domino Designer Release 6 enhances team work
by enabling developers to:

Edit multiple design elements

Share resources across databases

Lock design elements

Editing multiple design elements


With Lotus Domino Designer 6, you can now update or edit properties of
all the instances of a particular design element that occur in a database.
For instance, you could update or edit the following element properties:

Hide/when formulas

Template inheritance settings

Design refresh settings

For example, you can update all the forms in a database to hide them
from the Notes client.
For more information, see the chapter Completing an Application and
Managing Design Changes.

Sharing resources across databases


By sharing resources, the development work of one team member does
not have to be rewritten elsewhere in the application, but can be directly
incorporated as is. Or it can be incorporated, then tweaked by another
member of the team to suit the purposes of a different area of the
application.
Lotus Domino Designer 6 increases the number of resources that can be
shared in a database to include:

Style sheets

JavaScript libraries

Non-NSF files

Locking documents and design elements


In Lotus Domino Designer 6, not only can you share elements within a
database, but you can also share them across databases. Because access to
design elements has increased, Notes now lets developers lock the
elements they design. This prevents two or more team members from
making changes to one element at the same time.
1-16 Application Development with Domino Designer

For more information on document locking, see the chapter Creating an


application.

Extending access to applications


Domino applications are now more easily accessible to outside tools both
during the design process and after application completion and
deployment.
With Lotus Domino Designer 6, you can:

Use third-party design tools in Designer

Use WebDAV for remote development

Access an external data source from a field

Bring an application offline

Instant message colleagues

Using third-party design tools


With Lotus Domino Designer 6, you can launch third-party applications
from within Designer. The Designer menu bar has a new Tools menu
option where you can save a link to a third-party application as a tool.
For example, you can now add a Web-development application, such as
Dreamweaver, to the Tools menu as a tool named Web work, for
example. If you want to add HTML to your Designer application using
Macromedia Dreamweaver, you can launch it by selecting Web work
from the Tools menu.
For more information on customizing the Designer Tools menu, see the
chapter Developing applications using third-party tools and WebDAV.

Using WebDAV for remote development


WebDAV (Web-based Distributed Authoring and Versioning) is a
technology that allows users with Designer access to a database to work
with file-based design elements such as HTML pages, images and style
sheets, using WebDAV-enabled development tools on the Web.
By making Domino WebDAV compliant, the methods you can use to
enhance file-based design elements are extended. Lotus Domino
Designer 6 lets you decide which tools to use to develop your
applications.

Introduction to IBM Lotus Domino Designer 1-17

Planning Applications

For more information on locking design elements, see the chapter


Completing an Application and Managing Design Changes.

For more information on editing and managing database resources using


WebDAV, see the chapter Developing applications using third-party
tools and WebDAV.

Accessing external data sources from a field


With Designer, you can use data connection resources to set up a
connection between a field in an NSF database document to a field in an
external data source. The external data source can be a relational or
transactional database, which means you can now access enterprise data
using a Notes application.
For more information, see the chapter Connecting to Enterprise Data.

Bringing an application off-line


Access to Designer is now available to off-line users thanks to Domino
Off-Line Services (DOLS). DOLS enables a user to take a Domino Web
application off-line, make changes or additions, and then synchronize the
off-line replica of the application with the original. The user does not
even have to have Notes since the application can be accessed via a Web
browser. This capability greatly increases the ways in which an
applications audience can access it.
For more information on DOLS, see the chapter Enabling an application
for Domino Off-Line Services.

Instant messaging colleagues


The Lotus software Sametime instant messaging product is a powerful
tool for enabling real-time communication between team members. With
Lotus Domino Designer 6, you can integrate Sametime into your Domino
applications.
For more information on adding instant messaging to an application, see
the chapter Creating an application.

Communicating across platforms


With Release 6, Domino data can be shared across platforms because
Domino supports two of the most widely used, multiple platform
technologies:

JavaServer pages (JSPs)

Extensible Markup Language (XML)

1-18 Application Development with Domino Designer

Note The JSP containing the Domino custom tag libraries must be
hosted by a server that provides a rich J2EE Web development
environment, like the IBM WebSphere Enterprise Edition server or
Application server 4.02.
For more information, see the book Domino Designer Programming Guide,
Volume 1.
XML
Domino data can now be exported and imported from a database as
XML. XML, the Extensible Markup Language, is a meta-language that
enables you to define data using tags. XML tags are similar to HTML
tags, except that they define the content within a tag, instead of defining
how to format the contents of a tag.
Since you can export data from a Notes database as XML, it can then be
transferred to other platforms. Once each platform agrees on a set of
XML tag definitions, transferring the data between them or transforming
it via a style sheet for optimum display on various devices, is easy.
For more information on viewing XML using DXL utilities, see the book
Domino Designer Programming Guide, Volume 1.
For information on using XML with Domino, see the book Domino
Designer Programming Guide, Volume 1.
For more information on the Domino DTD tags, see the book Domino
Designer Programming Guide, Volume 1.

Introduction to IBM Lotus Domino Designer 1-19

Planning Applications

JavaServer pages
You can now retrieve Domino data from an NSF database for use in a
JavaServer page(JSP). Domino Designer Release 6 includes custom tag
libraries that you can include in your Web site directory files. These
libraries are made up of several JSP tags. JSP tags are similar to HTML
tags, except that they contain instructions for executing complicated Java
programming logic, instead of instructions for defining how to format
the contents of the tag. The logic in the Domino tag library is specifically
designed to retrieve, edit, and otherwise manipulate Domino data, but
the complicated logic itself always takes place behind the scenes. Once
the libraries are included in a page, all the page developer has to do is
include a tag in a page and all the programmatic capabilities of the tag
are automatically available.

Begin your design work with an application plan. In addition to planning


the functionality of your application, consider how users will access the
application. For example, if you are designing your application for a
mixed audience of Notes and Web users, knowing what tools are
available for your design needs will make your task easier. The following
topics describe identify application design issue to consider as you plan
your design work.

Planning an application
Before you begin any design work, create a plan for how users will access
and use your application. At the minimum, your application plan should
address these questions:

Will users access the application from a Notes client only , Notes and
a Web application , or Web browser only?

Do you need to tailor this application for use by mobile users?

How can you make your application accessible to users with


disabilities?

Will the application be translated into multiple languages?

What demands will be placed on the application that is, will there
be large views containing many documents?

What are the performance expectations for the application?

How will users know how to navigate and use the application?

The more planning you do before design begins, the smoother the design
process will be. Designer provides you with a range of tools and services
to suit your design needs and application development styles.

2-1

Planning Applications

Chapter 2
Planning an Application

Planning a Notes application


If your application is only intended for use by Notes clients, use the
standard design elements provided by Domino Designer. When
programming, consider using the Notes formula language and
LotusScript, both of which were designed for use with the Notes client.

Planning a Notes and Web application


If you are planning an application that users will access via a Notes client
or via a Web browser, you will need to do some design work to tailor
your application for each platform. For example, a navigation structure
that is suited for a Notes client application may not be the best choice for
a Web application. When you design an application for both Notes and
Web, about 85% of your design will be suitable for both clients, and the
remaining 15% will require some modification. Here are some issues to
consider when planning an application for Notes and Web users:

Understanding the differences


The division of labor in a Notes application what the Domino server
does and what the Notes client does is very different from the
architecture of a browser-based application. This is because the
capabilities of a Notes client are very different from a Web browser, and
the protocols the browser and server use to communicate are very
different as well.
Domino uses Sun Microsystems Java(TM) and JavaScript(TM) to
translate Notes client functionality to the browser with fuller fidelity, so
that Web users can interact with action bars, rich text, views, and other
Notes features in familiar ways. But there is no Web functionality
equivalent to the Notes Document Object Model (DOM) and Remote
Procedure Call (RPC) protocol. A Notes client can send instructions to
the server to perform a task and receive back results that are refreshed
within the current open form or document. This kind of interaction is
nonexistent between a browser and server. All a browser can do is send a
request to a server, and all a server can do is send a complete page to a
browser.
Limitations of the Web browser and the browser/server architecture are
the basis for most of the problems you must solve as you consider how to
serve one application to Notes client and Web browser users.

2-2 Application Development with Domino Designer

The following are some areas to consider when planning an application


for both Notes and Web clients.

Security
The security model is different for Notes and Web users. Manager and
Designer access to databases is not available for Web users as it is for
Notes client users. Therefore, do not include LotusScript actions or
agents that require a user to have Manager or Designer access to
complete the task.
Authenticating users requires extra planning for applications available
via Web browsers. Most Web applications provide some level of access
for Anonymous users. For higher levels of access, you must match Web
users to the names in the Domino Directory. Because Web users
generally login to an application using an abbreviated name, consider
using the @UserName command to return their fully distinguished Notes
name for proper authentication.
Forms
Many times the same form will work in both a Notes client application
and a Web application. You can compensate for minor differences in
functionality using hide-when formulas for design elements on a form.
At times you may want to display one subform for a Notes client and
another for a Web browser. In this example, the formula calls one of two
computed subforms named NS and IE that include browser-specific code
by using the CGI variable for browser type in @BrowserInfo:
@If(@BrowserInfo("BrowserType")="Netscape";"NS";"IE")

Each subform has its own JavaScript Header, so you can selectively
include JavaScript as well as other data types in your forms by using
computed subforms.
All subforms open simultaneously with the main form. You cant display
a computed subform on the basis of calculations after the page opens.
Forms are quite flexible in a mixed-client environment. Using
programming designed to support multiple clients, you can program a
form event to execute one set of commands when accessed by a Notes
client and another set of commands when accessed by a Web client. In
some cases, you may find it easier to design two completely separate
forms one for a Notes client, and another for a Web client. In this case,
you assign the same alias to the two forms, hide one from the Notes
client, and the other from the Web client, so that the correct form
displays in the correct context.
Planning an Application 2-3

Planning Applications

Tips for designing Notes and Web applications

Fields
Consider that not all field types that are supported in a Notes application
are supported in a Web application. For example, the Web does not
support a multivalue keyword field that allows users to enter choices not
in the list. The workaround for this is to use two fields in a Web
application one field to accept new choices for the list and the other
field to build and display the list. If users can access the application from
either the Notes client or the Web, you must synchronize the field values
so that all users see the same values.
If you can solve a problem with two versions of a field formula, one that
works in Notes and the other that works on the Web, then include both
in the form and use the Hide from Notes/Hide from Web browsers
selection in the Field Properties box to display one or the other.
If youre using the same form for both Notes clients and browsers, the
Hide from Notes/Hide from Web browsers attribute on a design
elements properties can be very useful. However, note that hidden
has a different meaning for each client. In Notes, hidden fields are still
present in the document and can be used in scripted calculations. Fields
hidden from Web browsers, on the other hand, are cut out of the
document by Domino before the page is served to the browser. The field
contents are not available to be used by JavaScript.
Tip: If you want to make fields invisible in a browser, but keep their
contents available to JavaScript, dont use the Hide from Notes/Hide
from Web browsers and dont put type=hidden into the fields HTML
Body Attributes objects. Make sure that:

Their hide-when properties are set correctly for the Notes client.

Use JavaScript when generating pages is set in the Database


Properties box.

Generate HTML for all fields is selected in the Form Properties


box.

Domino will generate the appropriate <type=hidden> tags in the HTML


page:
<input type="hidden" name="fieldname" value="fieldcontents">

Be aware that names and values treated this way are not secure. They
can still be seen by any user who clicks on the browsers View Page
Source function.
Remember, too, that not all fields can be passed to a browser this way
the password field, for example, $Updatedby, $HtmlHead, and any
objects that contain NULL characters (which includes users public keys)
because NULLs cannot be expressed in HTML.
2-4 Application Development with Domino Designer

Actions play a more significant role in Web applications because Web


browser users do not have access to the Notes menu commands. You
must supply an action for tasks such as creating a document, switching
to Edit mode, switching views, or forwarding documents. Therefore, in
many cases you must design an action bar specifically for a Web
application that you hide from Notes client users.
Tip To Web-enable buttons in a database, check Web access: Use
JavaScript when generating pages in the Database Properties box. If this
property is not set, Domino recognizes only the first button in a
document and treats it by default as a Submit button that closes and
saves the document.

Views
Displaying Notes views in a Web application results in a loss of some
display attributes unless you first embed the view on a page. You can
embed multiple views on a page to achieve a sophisticated layout. You
can also specify a view template that will apply uniform style properties
to embedded views for use in Web applications.
For more information, see the topic Displaying views in Web
applications in the chapter Designing Views.

Navigation
Using an outline for navigation can provide a uniform structure for
Notes client and Web browser users. An outline lets users open views,
pages, or URLs. Embed the outline on a page to preserve all of the
display properties for Web browser users.
You might also consider an imagemap as a navigation tool.
For more information, see the chapter Navigating an Application later
in this book.

Agents
Programming with agents provides all of the processing power for an
application. Using agents is where you will encounter the most significant
differences in developing applications for Notes client and Web browsers.
Although you should be able to share a lot of code, there will be instances
when you need to write certain agents for the Web, and certain agents for
the Notes client. The key programmable server events for Web applications
are WebQueryOpen and WebQuerySave. To avoid performance problems,
use these events to perform key tasks, and use background agents to
perform more complex processing. Agents can be run from the Web using
@Command([ToolsRunMacro]) or @URLOpen formulas.
Planning an Application 2-5

Planning Applications

Actions

By default, Web agents run under the identity of the agent author (the
person who saved the agent). To run agents under the identity of the
Web user, open the Agent Properties box, click the Design tab, and select
Run Agent as Web user option in the For Web Access section. This
option can provide more security, because when a Web user tries to run
an agent with this property set, Domino prompts the user for a name and
password and checks them against the invokers rights in the database
ACL.
In the Notes client, many form, field, and button events can be scripted in
either JavaScript or LotusScript (or, to be sure, @formulas). Depending
on how your application uses scripted events, this may mean that you
write your agents using JavaScript and use the same form for both Notes
and Web clients. There are differences in the capabilities, however.
JavaScript in the Notes client has access only to the data in the currently
open form it lacks the access to the front-end and back-end Domino
Objects of LotusScript. Your application may work best if you write
LotusScript for execution in the Notes client and JavaScript for browsers,
and use hide-whens or separate forms to keep the execution straight.
Keep in mind that many @functions and @commands dont work in a
browser. The @functions that dont work fall into three major categories:

They work only in the Notes client interface. There are no browser
counterparts to @DialogBox, @Picklist, and @Prompt, for example.
And several advanced mail-handling functions are unique to the
Notes client, such as @MailSend and @IsDocBeingMailed.

The much simpler structure of Web views doesnt support many


functions, including @DocChildren, @DocLevel, @DocNumber,
@IsCategory, or @Responses.

Many features associated with Notes access, preferences, and the


workstation environment dont carry over to a browser
@Certificate, @IsAgentEnabled, @MailEncryptSavedPreference, and
@UserPrivileges, for example.

Most @commands are associated with controlling the Notes client


interface, so they dont work in Web applications. The handful that do
work on the Web work hard, though, because theyre used often.
@Command([FileSave]) and @Command([FileCloseWindow]), for
example are used frequently together to simulate a Submit button.
You can check to see whether @formulas and properties of other
programming constructs work for the Web by looking through the topics
listed in the appendix Overview of features to avoid using in Web
applications.

2-6 Application Development with Domino Designer

Create your form and save it with the name


$$ReturnAuthenticationFailure. In order to make this form available for
public access, you must do two things. First, you must set the Default
role in the Access Control List to read public documents.
Second, set the forms security properties to make it available to public
users by choosing Available to public Access Users on the Security tab
of the Form Properties box.
There are four reserved form names that you can use to create
customized error messages for browser users:
$$ReturnAuthenticationFailure, $$ReturnAuthorizationFailure,
$$ReturnDocumentDeleted, and $$ReturnGeneralError.
For more information about these fields and how to use them, see
Displaying a customized error message in the chapter Designing
Forms.

Programming for multiple platforms


You can now program the same event in Designer for the Notes client
and the Web browser. You can optimize the code in an event for
example, the Click event of a button for the platform it will run on.
Code you supply for the Client platform executes when a user runs the
application in the Notes Client. Code you supply for the Web platform
executes when a user runs the application in a browser. These dual
platform events are available for selected events on Forms, Pages,
Subforms, Fields, Buttons, Actions, and Hotspots.

Planning for browser differences


If your users will be accessing Web applications using different browsers
or different versions of browsers, you must test your application
accordingly and tailor it for browser differences. In cases where you need
to code around differences between browsers, you can use @BrowserInfo
to help you determine what browser or version the user is running.
For more information on @BrowserInfo, see the Domino Designer
Programming Guide.

Planning an Application 2-7

Planning Applications

Replacing dialog boxes for Web applications


You should consider designing forms for your application to replace
error messages and Help dialog boxes that are missing on the Web.
Particularly if you require users to authenticate in order to use your
application, you should create a $$ReturnAuthenticationFailure form to
inform users that authentication failed and give them links they can use
to navigate back to familiar territory in the application.

Planning a Web application


Perhaps your widest range of design options is available when designing
an application that will only be accessed via a Web browser. You can
build a Web application using the full range of Designer features and
tools, or you can build an application using the latest Web technologies.
This range of tools and features, coupled with all of the benefits of a
Domino application such as the security model and replication give
you the most control over the design and delivery of an application.
Designer features with special relevance for developing Web applications
include:

An HTML editor

HTML-rendering for design elements

JavaScript libraries

Imagemaps and outlines for navigation. Note that large graphics


used in imagemaps can present a performance problem for Web
applications.

Pages

Applets

Style sheets for transforming HTML and XML

Java features include:

Java servlets

Support for Web-based Distributed Authoring and Versioning


(WebDAV)

Tips for designing Web applications


Databases viewed from a Web browser may look somewhat different
than they do when viewed from the Notes client. Browsers render design
elements with slight differences. Be sure to preview your database
through each browser that will access it so that you can make
adjustments to your design. Also, for databases that will be accessed
through Web browsers, it is best to:

Make sure the database is in the Domino Data directory or a


subdirectory of the Data directory.

Add form actions. such as Create, Edit, and Save.


For more information, see Actions in the chapter Automation in
Applications later in this book.

2-8 Application Development with Domino Designer

Avoid using featuresthat arent supported in Web Applications.


Refer to the appendix Features to Avoid Using in Web
Applications later in this book.

Use additional @commands and/or create multiple buttons on a


form by selecting the database property Web access: Use JavaScript
when generating pages.

Change from the Lotus Software color palette to a Web color palette
to provide greater color fidelity on the Web. To change palettes,
choose File - Preferences - User Preferences. Check Use Web
Palette on the Advanced options list of the Basics page.

Set views, outline controls, action bars, and rich text fields to be
displayed as Domino applets when viewed with a browser.
For more information, see the topic Domino Applets.

Check the Access Control List (ACL) setting to make sure it allows
appropriate access for Internet users.
For more information, see Setting up database access for Internet
users.

Prevent users from accessing forms and views in a Web application


by selecting the database property Dont allow URL open.

HTML tag attributes for a Domino server


The HTML tab appears on many properties boxes. If you are designing a
Web application and are using HTML 4.0, the HTML tab lets you apply
core attributes that are common to a number of objects, such as
Cascading Style Sheet (CSS), easily. Domino incorporates the values of
these attributes in the HTML that it creates at runtime. When you are
using the HTML tag attributes, remember:

The HTML must be ASCII characters.

Do not place quotation marks around the attributes, except around


the attributes you use in the Other box.

The Other attribute needs quotation marks, as shown in the


example below.

Planning an Application 2-9

Planning Applications

HTML tag attributes


HTML tag attributes Description
Name/ID

References an object using JavaScript or CSS. For example,


the object could be
ID = ZipCode

Class

Applies a CSS class for a defined object. For example, if the


objects name is ZipCode, the class could be Numeric. CSS
styles are defined in the HTML Head Content event for a
form or page.

Style

Applies a specific CSS style to an object using in-line CSS.


For example, if the objects name is ZipCode, the class is
Numeric, the style could be font-size:10pt. If you have
more then one value, separate them with a semi-colon; for
example, font-size:10pt; color:blue.

Title

Explorer 4.x and later provides the user with a tip or


prompt. For example, if the objects name is ZipCode, the
class is Numeric, the title could be Enter your Zip Code.
The title displays differently on different browsers.

Other

Adds other HTML tag attributes, and must be written as


pure HTML code. For example, instead of writing ZipCode
in the Name/ID box, you write ID=ZipCode in the
Other box.

Domino applets
When users run a Domino application from a Web browser, some
Domino design elements are more effectively presented to Web users
using Java instead of HTML. Domino provides Java applets for these
design elements so that the interface is more similar to the Notes client
interface. You can easily enable the Java applets when you create the
design element.
When you consider whether to use the Java applets or HTML, keep these
points in mind:

The applets provide a more interactive interface.

The Domino applets require download time on the Web.

The applets use the Java Developers Kit (JDK), Release 1.1.8 to
support Java-enabled Web browsers. The only fonts available are
typically Courier, Helvetica, and Times.

2-10 Application Development with Domino Designer

Outline applet
The outline applet lets Web users work with outlines embedded in a
page or form.

View applet
The view applet lets Web users use many of the Domino view
features, including column resizing, multiple document selection,
and section collapse/expand without page regeneration.

Action bar applet


The action bar applet lets users scroll and easily view and select
subactions.

Editor applet
The editor applet lets Web users change the font, color, size, and
style for text in rich text fields.

Creating formulas and buttons for the Web


To use certain @commands or create multiple form buttons for Web
applications accessed on the Web, select the database property Web
access: Use JavaScript when generating pages on the Database Info tab
of the Database Properties box. To open the Database Properties box,
open or select the database and choose File - Database - Database
Properties.
Note There is no Web Formula module in the new dual platform event
model. If you write Client Formula code to perform an action in a Web
application, check the Hide option Notes 4.6 or later clients on the
Hide tab of the properties box for the element you are programming.

Planning an Application 2-11

Planning Applications

For a complete description of how the applets work, see the description
for each design element:

Web application performance tips


Selecting the Web access: Use JavaScript when generating pages affects
display, buttons, and @commands throughout the application in the
following ways:
If you select Use JavaScript

If you dont select Use JavaScript

Display: Documents and navigators


display faster because hotspot formulas
are not evaluated until users click each
hotspot.

Display: Documents and navigators


display more slowly because the
hotspot formulas are all evaluated at
the display time.

Buttons: Domino doesnt generate a


Submit button automatically.

Buttons: Domino automatically


generates a Submit button, at the
bottom of the form.

To allow users to save and close a form


on the Web, you must create a button,
hotspot, or action that contains these
commands:
@Command([FileSave]);
@Command([CloseWindow])

If there is already one or more buttons


on the form, Domino converts the first
button it recognizes to a Submit button
automatically and ignores all other
buttons on the form.

You can have multiple buttons on a


form.

You can have only one button, a Submit


button, on a form.

@Commands: The following


commands are supported on the Web:
@Command([CloseWindow])
@Command([FileSave])
@Command([ViewRefreshFields])

@Commands: The following


commands are not supported on the
Web:
@Command([CloseWindow])
@Command([FileSave])
@Command([ViewRefreshFields])

Domino does not check the formulas


before displaying pages.

Domino checks the formulas before


displaying pages. Actions that contain
unsupported @commands or
@functions will not be displayed on the
Web.

Planning an application for mobile users


You may want an application you design for Notes or Web users to be
available to mobile users. You can easily tailor an existing application for
Mobile Notes(TM) users by excluding certain design elements from a
mobile application to streamline it for better performance. For example,
you may to exclude a large, complex view or a graphical navigator from
the design elements that get served to mobile users to avoid performance
problems.

2-12 Application Development with Domino Designer

For more information, see Hide-when options for all applications.

Hide-when options for all applications


Designer lets you hide many of the design elements and components of
an application according to the context you specify. You can hide design
elements from certain types of users to help you tailor an application for
use by Notes, Web, or Mobile clients. You can also hide individual
design elements according to a particular context you specify. If hide
options are available, the Hide-When tab appears on the properties box
for that element.
You can hide elements, including their text, graphics, and fields, in any
of these situations:

When users read, hide information that is useful only when users
create or edit documents.

When users edit, print, and copy, hide information that is useful
when users read documents.

To set hide-when options on one or more elements according to


client type
1. Select a design element in the design pane. To select multiple
elements, hold down the shift key while you click to select multiple
elements.
2. Choose Design - Design Properties.
3. On the Design tab, choose one or more hide options in the Hide
design element from section.
To set hide-when options on individual elements according to
context
1. Select the element you want to hide in the work pane and open the
Properties box.
2. Click the Hide tab.
3. For basic options, select all situations in the Hide paragraph when
document is: section where components should be hidden from
users. Consider the options in the following table.

Planning an Application 2-13

Planning Applications

You can specifically exclude design elements by using the option Hide
design element from Mobile clients option on the Design tab of the
Design document properties box. You can set this property for multiple
elements by holding down the Shift key while selecting elements from
the design pane, then choosing Design - Design Properties to display the
Design Document properties box.

4. For programming options, select Hide paragraph if formula is true


and write a formula in the design pane to describe the situations in
which users dont need to see the layout region.
If an element is hidden when

Then

Previewed for reading

The hidden information isnt visible when users


read documents in the document preview pane.

Previewed for editing

The hidden information isnt visible when users


work on documents in Edit mode in the document
preview pane.

Opened for reading

The hidden information isnt visible when users


open documents in Read mode. A layout region
that cant be read cant be printed either.

Opened for editing

The hidden information isnt visible when users


work on documents in Edit mode.

Printed

The hidden information isnt visible on printed


documents.

Copied to the clipboard

Hides the contents of the component when users


copy a document. Note that this setting does not
affect documents copied at the view level.
If you create or save a document from a form that
contains a field with Hide when copied to the
clipboard checked and then copy the contents of
the document somewhere else, the contents of that
field will not be pasted.

Embedded

The element isnt visible when users access a


document in which you have used the embedded
editor to embed the element.

Hide paragraph if formula is A formula determines the circumstances in which


true
information is hidden.

Planning for integration with WebSphere and DB2


You can use Domino Designer to build applications that exploit the
collaborative features of the Domino server as well as the transactional
power of the WebSphere server and the data storage capacity of a
DB2 database, resulting in end-to-end business solutions for
applications such as supply chain management, sales force automations,
or customer relationship management.
Using Java technologies such as Overview of Java servlets, you can share
code with and link to WebSphere applications. Single Sign-On (SSO) a

2-14 Application Development with Domino Designer

For more information on using Single Sign On, see Administering the
Domino System.

Designing an application for maximum accessibility


When designing an application, there are things you can do to make your
application accessible to people with physical disabilities. To meet
federal accessibility guidelines, your application must be:

Keyboard-accessible An application is keyboard-accessible if it


can be used without a mouse or other pointing device.

Screen reader-accessible An application is screen reader-accessible


if vision-impaired users can access your application with screen
readers. Screen reader software, in conjunction with a digital speech
synthesizer, provides an auditory representation of what is on the
screen or what the cursor shows. In order to function, the screen
reader software must have detailed information about the graphical
user interface (GUI), so that it can translate the graphical display into
speech.

The Notes client is both keyboard-accessible and screen


reader-accessible. On those platforms which support it, Notes uses MS
Active Accessibility (currently only available on Microsoft Windows 95
and NT 4). Although many of the objects you create in Designer have the
capacity to be made accessible for example, you can provide
descriptions, called alternate text, for images and applets it is
possible to create an application in Designer that is not accessible. And
some design elements are not accessible. However, the Domino server
automatically generates accessible HTML whenever possible.

Design considerations for accessible applications


To create an application that is accessible to people with disabilities, keep
the following design considerations in mind.

Use text as the primary means of communicating information. Text


and rich text are accessible in almost every situation.

Use the Alternate text tag on all images and applets.


Both images and Java applets allow you to specify a short piece of
text to be displayed with the graphical object. Typically the alternate
text appears only when the object is loading or when image or applet
loading is turned off in browser preferences. However, alternate text
Planning an Application 2-15

Planning Applications

shared authentication service allows for further seamless integration


between Domino and WebSphere applications.

is also used by screen reader software to describe the contents of an


object. Specify alternate text on the Info tab (i) of the Picture and Java
Applet Properties box.

Echo the action button tasks in the Action menu and echo the forms
you create in the Create menu.
Screen readers cannot always provide information about action
buttons. For this reason, when you design an application, you should
provide users with an alternative way to trigger actions and create
forms. Echoing action button tasks in menus provides this alternative
route. To echo an action button on the Action menu, open the
properties box for the action and select Include in Action Menu. To
provide access to a form that might otherwise be triggered by an
action button in a view, for instance, open the properties box for the
form and select Include in menu.

Place the most frequently accessed menu items at the top of the
menu list.
The vertical order in which the Action buttons appear in the action
pane indicates the order in which they appear on the Action menu
and bar. You can create the order in which forms appear on the
Create menu. You can cut and paste the most frequently used actions
to the top of the list in the action pane. To place the form that is most
often accessed by users at the top of the Create menu list, insert the
number 1 followed by a period (1.) in front of the name in the forms
name field. You can number the remaining forms accordingly to
control their order in the menu list.

Check that the accelerator keys assigned to menu items make sense.
If an application has more than one menu item that starts with the
same letter, Notes assigns a default accelerator key using the first
letter not already in use. If the accelerator key assigned to an action
or form does not make sense, you can force the assignment of a
specific key. In the name field for the action or form, add an
underscore before the letter you want to assign as the accelerator
key. For example, if you want to assign p as the accelerator key for
the form entitled Complete evaluation, enter Com_plete evaluation
in the forms name field.

Avoid:

Using Java applets as the sole means of navigating or performing an


action. Java accessibility is currently not widely supported, and a
keyboard-only user cannot navigate to a Java applet in many
browsers.

2-16 Application Development with Domino Designer

Excessive use of embedded objects. Although these are


keyboard-accessible, navigating through too many objects can be a
burden for keyboard-only users.

Excessive use of framesets. It is laborious for keyboard-only users to


navigate through framesets. The fewer frames used in an application,
the easier it will be for a keyboard user to navigate.

Using color and graphics as the sole means of communicating


meaning in your application. To test if your application is legible for
color-blind users, set your display to monochrome and view all
graphics.

Using text smaller than 10 point Helvetica. Some operating systems


support a large font user preference, but this preference is not
respected by all objects in an application.

Graphical navigators. Use outline controls instead as they are screen


reader accessible.

Layout regions.

If accessibility is a major priority for your application, you may want to


consider creating an alternate interface for your application using only
text and non-embedded controls.
For more information about accessibility, see the following resources:

The IBM Special Needs Web site at


http://www.austin.ibm.com/sns/

The W3 Web Accessibility Initiative (WAI) site at


http://www.w3.org/WAI

Customizing Designer for Accessibility

Creating multilingual applications


The following Domino features allow you to create applications that can
support different languages.

Setting a default language and region


If you are creating an application that will have different language
versions of some or all of its design elements, select Multilingual
Database on the Design tab of the Database Properties box. Then you
can select a default language and region. This property works in
conjunction with the language preference setting on users browsers. For
example, if you have three versions of design elements in your database,
one in English, one in French, and one in Spanish, and the users browser
Planning an Application 2-17

Planning Applications

or Notes client user preference is set to Spanish as their default language,


the Domino server displays the Spanish version of the home page.
If you create a multilingual database and build design elements
associated with particular languages, the list of design elements displays
a column identifying the language associated with the element.
Note If you create an application for Macintosh users or users on
another platform who do not have Designer access in the database ACL,
users will be unable to assign a language to a view or folder they create.
If the user creates a view or folder with the same name and alias as
another view or folder in the database, because the version the user
created has no assigned language, when Notes attempts to discern which
language settings to use, the results can be unpredictable.

Creating multilingual design elements


You can design a multilingual database so that it includes copies of
design elements for each language you support. For example, if you are
designing an expense tracking database for users in several countries,
you can design a copy of each form for each country in its native
language. Use the following steps to create copies of design elements
such as pages, forms, views, or outlines.
1. Make sure your database is designated as multilingual. Select the
database, choose Design - Design properties, and check the
Multilingual Database option on the Design tab.
2. Assign a default language and, optionally, a region.
3. Create a design element for the default language. When you name
the element, assign it an alias. The alias is the common point of
identification for multiple copies of the same design element.
Note Create one and only one alias for design elements in a
multilingual database.
4. Make a copy of the design element and open the copy for editing in
the Work pane.
5. On the Info (i) tab of the properties box for the design element, assign
a name and an alias. The name can be the same as the original design
element or it can be unique; the alias must be the same.
6. Translate the text of the design element into another language and
save and close the element.
7. Select the element name from the work pane and choose Design Design Properties to open the Design Document properties box.

2-18 Application Development with Domino Designer

9. Select a corresponding sort order for the language or choose Unicode


standard sorting.
For information on naming an element and assigning an alias, refer to the
documentation for creating that element. For example, see the topic
Naming Forms in the Designing Forms chapter.

Translating an application using IBM Domino Global Workbench


Domino Designer includes the Domino Global Workbench, a fully
integrated translation tool specifically designed to facilitate the
translation of Designer applications into a variety of languages.
If you decide to use Domino Global Workbench, a number of
design-stage tasks makes the localization process simpler. For example,
you should use aliases for the names of design elements wherever you
can. Use a system of standard prefixes for the aliases so that they can
easily be identified as text to exclude from translation. To launch Domino
Global Workbench, click the Domino Global Workbench icon.
For more information, see Preparing Source Databases in Domino
Global Workbench Help.
Domino Global Workbench elements
Domino Global Workbench, a set of software tools that facilitates the
localization (translation) of Domino applications, consists of the
following elements:

The Workbench The Workbench extracts terminology from a


database application and stores it in glossaries, builds localized
versions of the application using the translated glossaries, and if the
application changes, the WorkBenchs update features transmit the
changes to the localized versions.

The Glossary A Web-enabled Domino application that holds the


terminology extracted by the Workbench. Each item in the glossary
has a unique ID, linking it back to its source database. The glossary
contains views and agents that assist translators (for example, by
providing context information), and prevent unnecessary work (for
example, by making it easy to select and mark terms as DNT (do not
translate)).

Planning an Application 2-19

Planning Applications

8. On the Design tab of the Design Document properties box, select a


Language and, optionally, a Region to associate with the design
element.

The Language Synchronizer In a multi-language application, such


as an international Web site, translation of documents is usually a
requirement. New documents authored in one language must be
copied and then translated into the other Web site languages. The
Language Synchronizer automates much of this process.

Domino Global Workbench advantages


Domino Global Workbench provides the following advantages over
conventional localization methods:

Reuse of technical up-front investment. One technical person can do


the initial analysis of the application, define what needs to be
translated and what should remain in the source language, provide
contextual comments for translators, and so on. This effort speeds the
work of all translators, who do not need to concern themselves with
issues such as what should and should not be translated (translators
do not see much of the text that should not be translated).

Efficient use of resources. Technical people perform technical tasks,


whereas translators concentrate on translation.

Translation is done with full contextual information. Translators


know what design element they are translating and they can always
trace it back in the source application.

Reusability of translations. Because all translations are stored in


glossary databases with full contextual information, they can be
reused in other applications that use similar terminology.

Multilingual applications. You can build several translated databases


from a single source, or you can build one multilingual database
with design elements in several languages. This simplifies the
creation of multilingual Web sites.

Domino Global Workbench features


Features in Domino Global Workbench include:

Support for the localization of design elements

Enhanced glossary functionality, including XML import and export,


and Lotus Translation Component (LTC) enabling

Unicode support

Support for the localization of external LotusScript files

Support for the localization of XML content

For more information, see the following resources:

The Domino Global Workbench Help

2-20 Application Development with Domino Designer

The Lotus international Web site at


http://www.lotus.com/international

Adding translation components to a Designer application


The Lotus Translation Components (LTC) are programming objects and
server-based software services that provide a secure, reliable, and robust
environment to connect a set of heterogeneous translation services to
Lotus software and WebSphere-based platforms such as Domino,
Sametime, QuickPlace(TM), the WebSphere Application Server and the
WebSphere Portal Server. The LTC help IBM customers break language
barriers with their employees, partners, suppliers, and customers by
providing an enhanced set of linguistic services that facilitate the
integration of third-party linguistic solutions.
Although primarily designed to work with machine translation software,
such as the IBM server-based machine translation engines, the LTC can
connect to any third-party translation services that support the Linguistic
Services API (LSAPI) developed by IBM.
Because of their open architecture, the translation components allow
developers to integrate translation services rapidly and intuitively into
Domino applications, facilitating communication across languages and
breaking language barriers in an ever-growing global environment.
The Lotus Translation Components consist of the following parts, which
provide a connection to a translation connector and its associated
services:

Domino Translation Object (DTO)


The DTO, provided by Lotus software, handles the API calls made
from within a Notes or Domino application to set up and activate a
service request. It communicates with the Translation Services
Gateway (TSG).

Translation Services Gateway (TSG)


The TSG serves as a connection between the DTO and the
multilingual services provided by the different third-party vendors.
When the DTO is asked to provide information about the various
services available, it communicates with the specified TSG, which
calls each of its services in turn, collates the information, and passes
it back to the DTO. When the DTO sends a request to the TSG, the
TSG determines which services are required and passes the request
to the appropriate services or connectors attached to it. The TSG also
acts as a storehouse for various core services provided by Lotus
software, such as text filters or the ability to load and unload a
service.
Planning an Application 2-21

Planning Applications

Lotus Translation Components Features


Features in Lotus Translation Components include:

Improved install and startup procedures.

Certification with Java 1.2 and 1.3.

Support for AS400, AIX, Solaris and Linux platforms.

A Web Administrator that allows translation gateways to be


remotely configured from a browser.

A servlet that allows a translation portlet to be incorporated into


applications, making translations accessible to users of browsers or
Wireless Application Protocol phones.

LiteTransObj (Java), a low-profile version of the existing TransObj


class, suitable for use in an applet or mobile device. A core service,
ServiceLiteTransObj, supports the LiteTransObj class, creating a
micro-http server that listens for LiteTransObj requests and services
them. LiteTransObj provides an alternative transport layer to Remote
Method Invocation.

CLiteTransObj, a C++ / C version of LiteTransObj.

For more information, see the following resources:

LTC Users Guide

LTC Reference Manual

The Lotus globalization Web site at


http://www.lotus.com/international

2-22 Application Development with Domino Designer

The following table summarizes the known maximum limits of various


Notes and Domino features.
Item

Maximum limit

Database size

The maximum OS file size limit (up to 64GB)

Text field size

32KB (storage); 32KB displayed in a views column

Rich text field size

Limited only by available disk space up to 1GB

Response levels in a
hierarchical view;
number of documents
per level

31 levels; 300,000 documents

Characters in names

Database Title: 96 bytes


Filenames: On Windows and UNIX platforms
minimum of 255 and/or OS limits; on local Macintosh
workstation 31
Field names: 32
View names: 64
Form names: 32
Agent names: 32

Fields in a database

~ 3000 (limited to ~ 64K total length for all field


names). You can enable the database property Allow
more fields in database to get up to 22,893
uniquely-named fields in the database.

Columns in a table

64

Rows in a table

255

Views in a database

No limit; however, as the number of views increases,


the length of time to display other views also increases

Forms in a database

Limited only by database size.

Columns in a view

289 ten-character columns; dependent upon # or


characters per column

Documents imported
into a view

Documents totaling at least 350K

Cascading views in a
database

200

Margin size (in inches) 46


Page cropping size (in
inches)

46
continued

Planning an Application 2-23

Planning Applications

Table of Notes and Domino known limits

Item

Maximum limit

Point size to select or


print

250

Documents in a view

Maximum of 130MB for a view index

Documents that can be Limited only by available disk space


exported to tabular
text
Entries in an Access
Control List (ACL)

~950 names (ACL size is limited to 32767 bytes)

Roles in an Access
Control List

75 Roles

ID password length

63 characters

Authorized users on a
multiple password ID

8 users

Outline entries in an
outline

~21,000 entries

2-24 Application Development with Domino Designer

Chapter 3
Creating an Application

Domino databases
All Domino applications begin with a Domino database. Domino
databases are the containers for your application. Databases hold the
data, logic, and design elements for your application. Your Domino
application can be made up of one or more Domino databases.

DATABASE

Design Elements:
Pages, Forms, Views ...

DOCUMENT

Fields

Data
Documents

FIELD
Field Type:
Rich Text

Field Name:
Body

Data:
'Dear John ...'

With Designer, you create one application to use on both your intranet
and the Internet. The structure of a database is the same whether for the
Notes client or a Web browser. What makes a database a Web database is
the viewing mechanism: users view it through a Web browser instead of
the Notes client. You do all design work in Designer and use the same
design elements framesets, pages, forms, fields, views, outlines to
display and organize the content.

3-1

Building Applications

This chapter provides an overview of creating , including information on


organizing an application and tips for efficient application design.

Creating databases
There are three ways to create a new database:

Using a template

Copying an existing database

Starting from scratch

Creating a database from a template


Designer comes with a collection of templates that you can use to create
applications. You can recognize these templates by their NTF extensions.
A template is a file that contains the structure for the database that is,
pages, forms, and views but does not contain documents. For
example, to design a discussion database, use the Discussion template
(DISCSW6.NTF), which contains forms that track discussion threads in a
hierarchy, as well as views that display the entries by date, author, or
category. Designer templates have NTF as their file extension.
See the appendix Domino Designer Templates for a list of common
Designer templates.

Customizing a template
The templates that ship with Designer are master templates by default.
This means that changes made to a master template are passed along to
all databases created from that template. Inheriting design changes from
a master template can be initiated by the end user or by the Domino
server, which runs a nightly Designer task. You can disable this feature
by deselecting Inherit design from master template on the Design tab
of the Database Properties box.
For more information on customizing a template, see the topic Creating
templates in the chapter Completing an Application and Managing
Design Changes.

To create a new database from a template


After creating a database from a template, you may want to make
changes to the database. Keep in mind that if you have selected Inherit
design from master template, changes you make to a database can be
overwritten nightly by the Domino server Designer task or by refreshing
the design of the database. If you plan to make design changes to the
database and want to avoid the possibility of writing over design
changes, deselect the database property Inherit design from template
or protect individual design elements.
3-2 Application Development with Domino Designer

1. Choose File - Database - New. In the Server field do one of the


following:
Keep Local selected to store the new database on your hard disk.
Select or enter a server name to store the new database on a
server. This allows multiple people to work on the database
design.

Note As you type, Designer adds the title to the File Name field.
You can accept this database file name or change it, as follows:
File names can be any number of characters long (within the limits
of your operating system).
File names must end with the NSF file extension.
If you plan to use the database you are creating as a template, use
the NTF file extension instead of NSF.
3. Select a template from the list. To display additional templates, do
one of the following:
Click Show advanced templates and select a template from the
list.
Click Template Server to use templates that reside on a server.
4. (Optional) Click Encryption. Select Locally encrypt this database
using, select an encryption type, and then click OK. For information
on encrypting a database, see the topic Notes and Domino
encryption in the chapter Security in an Application.
5. (Optional) If you are developing an application for use with Lotus
Notes and Domino Release 4.x or if you will be on a Domino 4.x
server, click Size limit and select a size (in gigabytes).
6. (Optional) Click Advanced and select the options that you want
applied to your database.
For a description of the advanced options, see the topic To set
database properties that optimize database performance in the
chapter Optimizing and Troubleshooting Databases.
7. Click OK.
8. (Optional) Choose File - Database - Properties, click the Design tab
and deselect Inherit design from template. This prevents the new
database from inheriting design changes from the master template
whose design the database is based on.

Creating an Application 3-3

Building Applications

2. In the Title field, enter a title for the new database, using a maximum
of 96 characters.

Copying an existing Domino database


If you have found an application that contains all or most of the
functionality you are looking for, you can:

Copy the design of the database and use it as the basis for a new
application.

Copy individual design elements.

You can use the database as is, or you can modify it. If you modify a
database, be sure to protect the individual design elements from being
overwritten by a design refresh or replace.

To create a new database by copying an existing database


Before you copy the design of a database, check its Database Properties.
If No design information available is shown on the Design tab of the
Database Properties box, the designer has hidden the design of the
database, and you will not be able to modify the design of the new
database.
If you copy the design of an existing database, keep in mind that the
settings for the full-text index are copied as part of the design. When you
complete the new application, be sure to ask the database manager to
create a new full-text index.
For information on creating a full-text index for a database copy, see
Administering the Domino System.
1. Open the database you want to copy.
2. Choose File - Database - New Copy.
3. In the Server field do one of the following:
Leave Local selected to store the new database on your
workstation hard disk.
Select or enter a server name to store the new database on a
server. This allows multiple people to work on the database
design.
4. (Optional) In the Title field, enter a title for the new database. The
title can have a maximum of 96 characters.
Note When you copy a database, Designer automatically gives the
new database the same title and file name as the original database.
You can accept the database title and file name or change it.
Database file names can be any number of characters long (within
the limits of your operating system), and must end with the NSF file

3-4 Application Development with Domino Designer

extension. If you plan to use the database you are creating as a


template, use the file extension NTF rather than NSF.
5. (Optional) Click Encryption, select Locally encrypt this database
using: and select an encryption type. For information on encrypting
a database, see the topic Notes and Domino encryption in the
chapter Security in an Application.

7. Select Database design only so that the databases documents will


not be copied to your new database.
8. Deselect Access Control List so that the original databases access
control list will not be copied to your new database.
9. Click OK.
10. (Optional) Choose File - Database - Properties, click the Design tab,
and deselect Inherit design from template. This will prevent the
new database from inheriting design changes from the template
whose design the database is based on.

To copy individual design elements


In addition to copying the entire design of a database, you can copy
individual design elements. If there is a form, view, or other design
element you would like in your database, copy it from the original
database or template and paste it into your database.
1. Open the database or template containing the design element you
want to copy.
2. From the Work pane, select the element or elements that you want to
copy, such as a form or a view, and choose Edit - Copy.
To select multiple elements, hold down the CTRL key while you are
selecting the elements you want to copy.
3. Open the database where you want to paste the element or elements.
4. In the Design pane, click the type of element you are pasting, such as
forms or views, and choose Edit - Paste.
If your database inherits its design from a template, you should protect
views, forms, subforms, navigators, shared fields, or agents that you
copy into your database.
For another way to copy design elements, see the topic Copying a
design element to a new location later in this chapter.

Creating an Application 3-5

Building Applications

6. (Optional) If you are developing an application for use with Lotus


Notes and Domino 4.x or will be on a Domino 4.x server, click Size
Limit and select a size (in gigabytes).

To protect individual design elements


If your database inherits its design from a template, you can protect
views, forms, subforms, pages, framesets, and other design elements.
1. Select each design element in the Work pane.
2. Choose Design - Design Properties.
3. On the Design tab select Prohibit design refresh or replace to
modify.
If you use a template to refresh or replace the database design, to ensure
that this option takes effect, select this option as well as the option
Propagate this prohibition of design change in the design properties of
the template.
For additional information on protecting design elements, see the topic
Preventing design changes in the chapter Completing an Application
and Managing Design Changes.

Starting a database from scratch


If you need a unique application, start from scratch. To do this, begin by
creating a blank database, based on the -Blank- template. A blank
database contains no design elements such as pages or forms. Blank
databases have one default view. You must create all of the elements you
need for the application.
1. Choose File - Database - New.
2. In the Server field do one of the following:
Leave Local selected to store the new database on your computer.
Select or enter a server name to store the new database on a
server. This allows multiple people to work on the database
design.
3. In the Title field, enter a title for the new database. The title can have
a maximum of 96 characters.
Note As you type a title, Designer adds the name to the File Name
field. You can accept this database file name or change it. Database
file names can be any number of characters long (within the limits of
your operating system). If you want the database to appear in the
Database Open dialog box, it must end with the file extension NSF. If
you plan to use the database you are creating as a template, use the
file extension NTF rather than NSF. For more information about
creating templates, see the topic "Creating templates" in the chapter
"Completing an Application and Managing Design Changes."
3-6 Application Development with Domino Designer

4. (Optional) Click Encryption, select Locally encrypt this database


using, and select an encryption type. For information on encrypting
a database, see the topic Notes and Domino encryption in the
chapter Security in an Application.
5. (Optional) If you are developing an application for use with Lotus
Notes and Domino 4.x or if the application will be on a Domino 4.x
server, click Size Limit and select a size (in gigabytes).
7. Click OK.
You are now ready to begin creating the design elements for your
application.

Organizing your application


Bookmarks and folders allow you to organize your work according to
your needs, and to easily reorganize your work as your design
progresses. Create bookmarks that link to applications and databases
that you frequently use. Create folders to contain bookmarks, databases,
design elements, and even other folders.
Working with the Bookmark bar, you can organize databases and
applications in the following ways:

Bookmark a database or application

Copy a design element to a new location or to a new database

Create a folder for bookmarks or design elements

Using toolbars
Toolbars contain icon buttons that when clicked perform simple actions
like printing a document or opening a database. Toolbars give you a
quick alternative to looking through a series of menus to initiate an
action. Notes provides a number of pre-defined toolbars that contain a
set of icon buttons for specific tasks, as well as the capability to create
your own.
For more information on toolbars, see the topic Toolbars in Lotus Notes 6
Help. Or, go to http://www.lotus.com/ldd/doc to download or view
Lotus Notes 6 Help.
For information on creating toolbar buttons to run custom formulas, see
the topic Toolbars in the Domino Designer Programming Guide.
Creating an Application 3-7

Building Applications

6. Select -Blank- as the template.

Creating a bookmark on the Bookmark bar


You can create bookmarks from the Designer menu or by using drag and
drop.
To create a bookmark using drag and drop
For easy access to application and databases you use frequently, you can
drag and drop these items to the Bookmark bar or to a folder on the
Bookmark bar:

An application shortcut from your desktop

A program executable file from Windows Explorer

A database icon from the Design pane

A database Window tab

To create a database bookmark from the Designer menu bar


1. Choose File - Database - Open.
2. Select the database you want to bookmark.
3. Click Bookmark.
4. Do one of the following in the Add to dialog box:
To display the bookmark directly on the Bookmark bar, select
-Bookmark Bar-.
To add the bookmark to a folder on the Bookmark bar, select a
folder.
To create a new folder, click New folder, type a name for the
folder, and click OK.
5. Click OK. You can access the database by clicking the icon on the
Bookmark bar or folder.

3-8 Application Development with Domino Designer

To manage your bookmarks and bookmark folders


Once youve created your bookmarks, you can work with them in the
following ways:
To

Do this

Rename a bookmark or bookmark folder Right-click on the bookmark or


bookmark folder and select
Rename Bookmark or Rename
Folder.
Type the new name for the
bookmark or bookmark folder.
Change the bookmark icon size on the
Bookmark bar

Choose File - Preferences - User


Preferences.
Click Basics.
Under Display Options, choose a
size from the Bookmark icon size
list.
Restart Designer to see your
changes.

Change the bookmark icon color scheme Choose File - Preferences - User
on the Bookmark bar
Preferences.
Click Basics.
Under Display Options, choose a
color scheme in the Icon color
scheme list.
Restart Designer to see your
changes.
Change a bookmark icon or a Bookmark
folder icon

Right-click on the bookmark or


bookmark folder and select Change
Bookmark Icon or Change Folder
Icon.
Select an icon from the list of
available options in the Insert
Image Resource" dialog box.

Creating an Application 3-9

Building Applications

Remove a bookmark or bookmark folder Right-click on the bookmark or


bookmark folder and select
Remove Bookmark or Remove
Folder.
When you remove a bookmark
folder, you also remove all of the
bookmarks in the folder.

Creating folders for bookmarks or design elements


To organize your design work, you can create the following:

A folder on the Bookmark bar for easy access to items that you use
frequently such as applications, databases.

A folder within a folder on the Bookmark bar

A folder in a database as a way of organizing and structuring the


design elements in your database.

A folder within a folder in a database

To create a folder on the Bookmark bar


1. In the Design pane, click the folder icon. If the Design pane is not
open, right-click the Recent Databases folder on the Bookmark bar
and select Create New Folder.
2. In the Folder name text box, type a folder name.
3. In the Create Folder dialog box, select the -Folders- location and click
OK.
The folder appears on the Bookmark bar. If you move the cursor over
the folder, its name appears as pop-up text. You can now populate
this folder with applications, databases, and other folders.
To create a folder within a folder on the Bookmark bar
1. Right-click the folder.
2. Select Create New Folder.
3. In the Folder name text box, type a folder name.
4. In the Select a location for the new folder list box, select the folder
in which you want to create the folder and click OK.
When you click the containing folder on the Bookmark bar, the new
folder appears in the Design pane. You can now populate this folder
with applications and databases.
To create a folder in a database
1. Create a bookmark to a database on the Bookmark bar or in a folder
on the Bookmark bar.
2. In the Design pane, click the folder icon. If the Design pane is not
open, right-click the Recent Databases folder on the Bookmark bar
and select Create New Folder.
3. In the Folder name text box, type a folder name.

3-10 Application Development with Domino Designer

4. In the Select a location for the new folder list box, select the
database in which you want to create the folder and click OK.
Designer places the folder at the end of the database design element
list. You can now populate this folder with design elements and
other folders.

2. Select Create New Folder.


3. In the Folder name text box, type a folder name.
4. In the Select a location for the new folder list box, select the folder
in which you want to create the folder and click OK.
The new folder appears in the database folder. You can now
populate this folder with design elements and other folders.

Copying a design element to a new location


Using the drag and drop feature in Designer, you can copy a design
element into a folder or another database.
To copy a design element to a database folder
1. Click a design element icon to expand the design element list.
2. From the expanded design element list, drag a design element to a
database folder.
or
Drag the design element Window tab to a database folder.
To copy a design element from one database to another
1. Click a design element icon to expand the design element list.
2. From the expanded design element list, drag a design element into
the design element list in another database.

Enabling subscriptions
Subscriptions work in conjunction with the Headlines database. The
Headlines database enables users to stay informed of current events both
within their company and on the Web by subscribing to databases that
are of interest to them and then receiving notification when a posting
meets their subscription profile.
When you design a database you can enable it to for subscriptions,
consider the following:

Creating an Application 3-11

Building Applications

To create a folder within a folder in a database


1. Right-click the folder.

The database must reside on a server that allows subscription


monitoring. The Domino administrator must enable subscriptions in
the Server document. See Administering the Domino System for more
information on enabling subscriptions at the server level.

The database must enable headline monitoring. This is enabled by


default on the Advanced tab of the Database Properties box. For
more information on performance and headline monitoring, see the
topic Properties that improve database performance in the chapter
Optimizing and troubleshooting databases.

The database must have a default view specified. For more


information on specifying a default view, see the topic Default
views in the chapter Designing Views.

(Optional) The database can contain a subscription form. You can


design one yourself or copy the subscription form from the
HEADLINES.NSF database in the Notes client. To copy the
subscription form from the headlines database to your database, see
the topic To copy an individual design element earlier in this
chapter. If you are creating a new subscription form, you must use a
formula field. For more information on formula fields, see the topic
Formula fields in the chapter Designing Fields.

Reducing database maintenance with shared code and shared


resources
You can designate many items, such as graphics, fields, subforms, and
even programs, as shared resources. Sharing resources lets you reference
a resource repeatedly throughout an application, while only having to
maintain in one standard place. For example, if you use your company
logo in many places throughout your application and the design of your
logo changes, you need only change it once and the change will be
implemented everywhere that image is referenced. Each database can
contain its own library of shared code and shared resources, and you can
access shared elements in other databases.
You can create the following resources:

Image resources
Image resources are graphic files that can be used throughout your
application. While image resources can be GIF, JPEG, or BMP format,
they are saved in Designer as GIF or JPEG. An image resource can be
used as a graphic or icon on pages, forms, subforms, action buttons,
outline entries, and as background images on forms, documents,

3-12 Application Development with Domino Designer

pages, table cells, and action buttons. For more information, see the
topic Creating an image resource later in this chapter.

Shared Fields

Non-NSF file resources


You can share non-NSF files within and across databases. For more
information, see the topic Sharing file resources later in this
chapter.

Subforms
A subform is a collection of fields, graphics, buttons, and actions you
plan to use in more than one form. For example, you might create a
corporate letterhead in a subform and then use the subform on a
variety of business forms. For more information, see the topic
Subforms in the chapter Designing Forms.

Script libraries
A script library is a place for storing code that can be shared in the
current application using LotusScript, JavaScript, and Java or in
other applications using JavaScript and Java. Using script libraries
allows you to maintain code in one place. For more information
about script libraries, see Using script libraries in the Domino
Designer Programming Guide.

Shared Java files


For large Java applets with multiple files, it is most efficient to store
some of the related files as shared resources in the database. When
you set up files as shared resources, all the applets can use a single
copy of the file, instead of each applet storing its own copy. Then, if a
file requires updating, you only need to update one file. For more
information, see the topic Setting up shared applet resources in the
chapter Including Java Applets in Applications.

Shared actions
Use shared actions in forms, pages, folders, or views to set up
user-activated tasks. You can add shared actions to the Actions menu
or as buttons on the action bar. In particular, actions let users
complete tasks when accessing Domino databases on the Web. For
more information on shared actions, see the topic Creating and
Creating an Application 3-13

Building Applications

You can define a field for use on more than one form. For example,
many forms have a creation date field; you can define this field once
and reuse it. When you define a field as a shared field, Designer
displays the field with a dark border and adds the field name to a list
of shared fields available for use in a database. For more information,
see the topic Creating shared fields in the chapter Designing
Fields.

inserting shared actions in the chapter Adding Automation to


Applications.

Cascading style sheets


You can browse your local file system for a cascading style sheet (CSS) and
insert one into a page, form, or subform. For more information, see the

topic Creating style sheets as shared resources in the chapter


Designing Pages.

Sharing file resources


Designer allows you to share non-NSF files within and across databases.
This capability gives you greater flexibility in designing your application.
For example, you might need to reference a shared company logo that is
a GIF file, or all applications in your company might share a welcome
page that is an HTML file, created by and maintained in a tool other than
Lotus Notes or Domino Designer. To share these files, you must
designate them as file resources.

Create a file resource

Open a file resource

Refresh a file resource

Prevent a file resource from being refreshed

Export a file resource

Delete a file resource

Deploy a file resource to the Web

To create a file resource


1. On the Design pane, click Shared Resources.
2. Click Files. The files work pane opens.
3. Click New File Resource.
4. Select the file you want to designate as a shared resource. You can
also select multiple files.
In the Open dialog box, click Open to add the files to the work
pane as shared resources in the database.

3-14 Application Development with Domino Designer

5. Choose Resource - Resource Properties. At the Basics tab, you can


assign the following file resource properties:
Name
The name of the file resource (for example, welcome.html). Each
file resource in a database should have a unique name.
Alias

Comment
Additional information that is helpful in identifying the file
resource.
Needs refresh

To open a file resource


1. In the files work pane, highlight the file resource that you want to
open.
2. Do one of the following:
Click Open File to let Designer select an application to open the
file resource.
Click Open With and then select an application to open the file
resource.
You can now edit the file.

To refresh a file resource


To save changes to a file resource you have edited, you must refresh it. A
file resource that has been edited but not yet refreshed is identified in
two places:

In the files work pane, the filename is preceded by a refresh icon

In the File Resource properties box, the Needs refresh check box is
selected.

1. In the files work pane, highlight the file resource that you have
edited.
2. Click Refresh.
3. In the Open dialog box, select the updated file name (it appears
preceded by a tilde (~)), and click Open.

Creating an Application 3-15

Building Applications

A file resource can have additional names (aliases). Using aliases


lets you change the file resource name without having to rewrite
every formula that references a file resource name.

The file resource is refreshed. The refresh icon disappears from the
files work pane and the Needs refresh check box in the File
Resource properties box is cleared.

To prevent a file resource from being refreshed


When you have edited a file resource and do not want to save the
changes, do not refresh it. You can identify a file resource that has been
edited but not yet refreshed in two ways:

In the files work pane, the filename is preceded by a refresh icon.

In the File Resource properties box, the Needs refresh check box is
selected.

To prevent a file resource from being refreshed:


1. In the files work pane, highlight the file resource that you have
edited.
2. In the File Resource properties box, clear the Needs refresh check
box.
The file resource is not refreshed and the refresh icon disappears
from the files work pane.

To copy a file resource to your computer


To save a copy of a file resource on your computer, you can export a
copy.
1. In the files work pane, highlight the file resource that you want to
export.
2. Click Export.
3. In the Save As dialog box, select a location for the file resource in
your directory structure. The file is saved in the location that you
specified.

To delete a file resource


Delete a file if you no longer want to include it as a shared resource.
1. In the files work pane, highlight the file resource that you want to
delete. You can also select multiple delete files at one time.
2. Press DELETE. The files are removed as shared resources and no
longer appear in the files work pane.

3-16 Application Development with Domino Designer

To set up a file resource for use on the Web


If you plan to use your file resource on the Web, click the following fields
on the Web Properties tab to set up the file resource appropriately.
Read Only - checking this causes the selected design element(s) to be
read only on the Web.

MIME type - the MIME type of the file resource for Web clients. The
Content-Type header of the HTTP response is set to this value.
Domino Designer fills in this field if it recognizes the extension of the
file resource (for example, a GIF image file or an EXE application file).

Creating an image resource


You can create a resource library of images to use throughout your
database. Image resources let you maintain the image in only one
location. If there are any changes to the image, changing and refreshing
the source file distributes the changes wherever the image is referenced.

To create a shared image resource


1. Expand Shared Resources in the Design pane.
2. Select Images from the list of Resources.
3. Click New Image Resource.
4. Select GIF, BMP or JPG in the Files of type list.
5. Select one or more graphic files you want to include as image
resources.
6. Click Open. The graphic files you selected are added to the list of
image resources.

To set image resource properties


To open the Image Resource Properties box, select the image from the list
of images and choose Resource - Resource Properties.
Basics tab
On the Basics tab, the name of the image appears automatically. You can
also provide an alias and a comment, both of which appear next to the
image resource name in the list of images.
You can also specify:

Images across and Images down (if you are creating image sets).

Colorize grays - lets an image blend with the users system colors.

Creating an Application 3-17

Building Applications

Needs refresh - adds the refresh symbol next to the image resource
name in the list of images and targets it as an image to be refreshed.

Web browser compatible - appears if you are creating a horizontal


image set (Images down) and want the images to work on the Web.

Design tab
On the Design tab of the Image Resource Properties box, select any of the
following design options:
Field or box

Description

Inherit from the design


template

Type the name of a template from which the


design element might inherit changes.

Prohibit design refresh or


replace to modify

Select this to prevent this design element from


being modified during a refresh or replace.
If you use a template to refresh or replace the
database design, to ensure that this option
takes effect, select this option as well as the
option Propagate this prohibition of design
change in the design properties of the
template.

Propagate this prohibition of


design change

Select this so that if a database inherits this


design element, the Prohibit design refresh or
Replace to modify box option will be
inherited also, and it will still be selected.

Hide design elements from


(Web Browsers)

Select to hide the design element from Web


users.

Hide design elements from


(Notes R4.6 or later clients)

Select to hide the design element from Release


4.6 or later clients.

To colorize grays
If you want an image to blend with the users system colors, select the
option Colorize grays on the Basics tab of the Image Resource
Properties box. When enabled, the grays in an image that use the Lotus
palette change to the color scheme of the users operating system. This
feature lets the image resources blend in with the other elements of the
users system, such as dialog boxes and menu bars.

To insert an image resource


1. Open a form, document, or page.
2. Place the cursor where you want to add the image.
3. Choose Create - Insert Resource.

3-18 Application Development with Domino Designer

4. Under Databases, select the database from which you want to insert
the image resource.
5. Under Resource type, select Images.
6. Under Additional resources, select an image to insert from the list
of images.
7. Click OK to display the image in the form, document, or page.

For more information on creating templates and inheriting design, see


the topic Templates in the chapter Completing an Application and
Managing Design Changes.

To insert an image resource from a file in the current database


You can insert an image resource from a file that you created and stored
in your current database.
1. Open a form, document, or page.
2. Place the cursor where you want to add the image.
3. Choose Create - Image Resource.
4. In the Insert Image Resource dialog box, make sure that the
Database is set to -Current database-.
5. Click New.
Browse your directory to include an image resource in the current
database.
6. After you have selected a file, in the Insert Image Resource dialog
box, click OK.
The image resource appears in the form, document, or page.

To rename an image resource


Perform the following steps to rename an image resource that you
created.
1. Open a form, document, or page.
2. Choose Create - Image Resource.
3. In the Insert Image Resource box, select the image resource that you
want to rename.
4. Click Rename.

Creating an Application 3-19

Building Applications

Tip You can use the images among multiple databases by putting the
image into a template. Databases inheriting from that template have easy
access to the image.

5. Type a new image resource name. You should also specify an alias if
there is a chance that the image resource could be renamed. To
specify an alias, after the image resource name, type a vertical bar (|)
followed by the alias name. For example, ImageName|ImageAlias.
The new name appears in the image resource list.

To delete an image resource


Perform the following steps to delete an image resource that you created.
1. Open a form, document, or page.
2. Choose Create - Image Resource.
3. In the Insert Image Resource box, select the image resource that you
want to delete.
4. Click Delete. The image resource is deleted from the image resource
list and from the database.

To reference an image resource with HTML


You can use Pass-thru HTML to reference image resources within a
database.
1. Enter the HTML <img src> tag using the name of the image resource.
For example:
<img src="r5-banner.gif">

2. Select text and choose Text - Pass-thru HTML.


3. (Optional) Use other HTML formatting tags to position the image.

To make design changes to an image resource


To make design changes to a graphic used as an image resource, export
the image to a graphics program. Once the changes are made, update the
image resource and distribute the design changes.
Exporting an image resource
1. Select the image or images you want to redesign.
2. Choose Resource - Export.
3. Select the directory you want to copy the image to.
4. Click Open.

3-20 Application Development with Domino Designer

Distributing design changes for an image


When you redesign an image resource, you can distribute the changes
wherever the image appears in the database.
1. In the list of images in Designer, select the images that have changed
and click Refresh.
2. In the Open dialog box, select the images from your directory.
Designer automatically updates the image in all of the places it is
referenced in the application.

Creating a custom letterhead


You can select a graphic to appear as the mail header for all employee
mail. Simply add your companys logo to the image resources of your
organizations mail templates. Only employees who have access to the
mail template will see the letterhead; other recipients, such as those
outside your company or with an Internet mail account, will receive a
standard letterhead.
For details on creating a custom letterhead, see Creating a custom
letterhead on the Lotus Developer Domain.

Creating image resource sets


There are two types of image resource sets: horizontal and vertical.
Use a horizontal image set to create an image that appears to change
depending on its state. For example, when a user passes the mouse over
an image you might want it to appear to light up. To effect this, create a
second image in the set and adjust the background color of the graphic.
You may also want the image to appear to get darker as the user clicks
on it, and dimmer once it has been clicked.
Use a vertical image set for icons you are adding to the bookmark bar on
the Notes, Designer, and Administration client. The bookmark bar can
display small, medium, or large icons provided that the image resources
for those icons are part of a vertical image set. A vertical image set
includes an icon in three different sizes. To set the size for icons on the
bookmark bar, users choose File - User Preferences. At the Bookmark
icon size setting on the Basics page, they can choose Small, Medium, or
Large.

Creating an Application 3-21

Building Applications

3. Click Open.

To create a horizontal image set


1. In a graphics program, copy and modify an image to create a series
of images in different states.
All of the images must be the same size.
2. In a single GIF, BMP, or JPG file, line up the images horizontally and
separate them with a one-pixel-wide well or line.
3. Create an image resource from the graphic file.
4. Double-click the image resource in the list of image resources in the
Work pane.
5. On the Basics tab of the Image Resource Properties box, enter the
number of images across in Images Across.
The number of images corresponds to the number of states you are
using. The four images map to the four states as follows:
Images across
property to select

State

Position of image used

Normal image

First position

Mouse-over image

Second position

Selected image

Third position

Mouse-down image

Fourth position

Note The order of the states is predetermined and cannot be


changed. However, if you want to take advantage of only two of the
states, for example, if you want to use a different image in the
normal state (the first position) only, copy the second image two or
three times so that the different image is in the first position.

3-22 Application Development with Domino Designer

To create a vertical image set


To create a vertical image set:
1. In a graphics program, copy and modify an image to create a series
of images in different states.
All of the images must be the same size.

3. Create an image resource from the graphic file.


4. Double-click the image resource in the list of image resources in the
Work pane.
5. On the Basics tab of the Image Resource Properties box, enter the
number of images down in Images Down.
6. Create a rectangle background around the images to create a
rectangle.

To use the image set on the Web


When you are using a horizontal image set in a Web application, select
the option Web browser compatible on the Basics tab of the Image
Resource Properties box. The Web browser compatible option appears
only when the number of images across (entered on the Basics tab of the
Image Resource Properties box) is greater than 1.
If you are not using multiple images in a Web application, deselect this
option to save space in your application.

Creating an Application 3-23

Building Applications

2. In a single GIF, BMP, or JPG file, line up the images vertically, with a
one-pixel-wide well between each one.

Document locking
When you set the database property Allow document locking, users
with Author access or higher can lock documents in that database.
Locking a document prevents editing and replication conflicts by
ensuring that person who locks the document has exclusive rights to
modify the document; others with the same rights cannot modify a locked
document even if they are working on a different replica on the same LAN.
Managers of a database cannot edit a locked document. However,
managers can unlock documents that are locked.
For information on how users lock a document, see Lotus Notes 6 Help.
Or, go to http://www.lotus.com/ldd/doc to download or view Lotus
Notes 6 Help.
To allow document locking
1. Specify an administration server for the database. This server will be
used as the master lock server when a user locks a document.
2. Choose File - Database - Properties and click the Basics tab.
3. Select Allow document locking.
To prevent document locking
1. Choose File - Database - Properties and click the Basics tab.
2. Deselect Allow document locking.

Customizing twisties
The triangular icons that indicate a row or a section may be expanded or
collapsed are called twisties. Twisties are green in Notes and blue on
the Web. You can customize these icons by importing your own images.
Expandable rows appear in views that contain categorized columns;
document sections are also expandable. For your icons to be visible in a
view, each image should be no wider than 6 pixels. The font size of the
column text determines how high your image should be. For a column
with text that has a font size of 10, each image should be no higher than
12 pixels.
1. Using a graphics program, create an image well by importing two
images into one graphic. One of the images will appear as the icon
that expands a row or section, and the other will appear as the icon
that collapses the row or section. Place the expand image on the left
and the collapse image on the right.
2. In Designer, create an image resource from the icon file.

3-24 Application Development with Domino Designer

3. In the Image Resource work pane, double-click the image resource to


open the Image Resources Properties box:
Enter 2 next to Images across.
Check Web browser compatible.
4. In the View work pane, select the expandable column and open the
Column Properties box. At the Column Info tab:
Enter the name of the image resource file you just created in the
Twistie Image setting. Click the folder button to browse for the
image file.

Previewing your design work


To see how your application looks and behaves on the Notes client and
on the Web, you can preview your work in Notes and in supported
browsers. When you start up your computer, Designer searches for the
following browsers:

Internet Explorer

Netscape

For each supported browser Designer finds, it adds an icon to the Preview
tool bar. If you have both Netscape version 3.x and 4.x both icons appear.
The toolbar also displays icons for previewing the application through the
Notes browser and the Notes client. Note that previewing in Notes serves
the application through the Domino server, while previewing in Notes
serves the application directly to the Notes client.
Clicking a browser icon previews the current design element that is,
the page, form, or navigator you are designing in the associated
browser.
You can also preview elements from the Design list. For example, you do
not need to open up a form to preview it; you can select it in the list of
forms and click one of the preview icons.

Creating an Application 3-25

Building Applications

Check Show twistie when row is expandable.

To preview in Notes or in the default Web browser using the menu


1. Open the design element you want to preview or select it from the
Design list.
2. Make design changes if necessary.
3. Choose Design - Preview in Notes or Preview in Web browser <Web
browser>. You will be prompted to save any changes. If you do not
save your changes, Designer will preview your work without the
changes.
4. (Optional) To stop the Web browser preview without exiting Notes,
choose File - Tools - Stop Local Web Preview Process.

To preview in Notes or in the default Web browser using the preview


icons
1. Open the design element you want to preview or select it from the
Design list.
2. Make design changes if necessary.
3. Click the icon on the Menu bar for the browser you want to use. You
are prompted to save any changes. If you do not save your changes,
Designer displays your work without the changes.
4. (Optional) To stop the Web browser preview without exiting Notes,
choose File - Tools - Stop Local Web Preview Process.

To set up a default browser for previewing


To set up previewing, you must override the proxy settings so the
preview process can find the databases both on your local machine
and on any servers that have databases you need to preview.
1. In Designer, choose File - Preferences - Location Preferences.
2. Next to Proxy, click the Advanced icon.
3. Next to No proxy for these domains, add these case-sensitive
entries:
localhost
<Domino server name>

4. Click OK.
5. Close and save the Location document.

3-26 Application Development with Domino Designer

To override proxy settings for additional browsers


If you use alternate browsers, you must also set them up for previewing.
See the Help for your browsers for more specific information on proxy
settings.
1. Open each browser, and then open its Proxy settings page.
2. Specify these case-sensitive entries:
<Domino server name>

3. Click OK.

Requirements for previewing your design work on the Web

You must be using Windows 95, Windows 98, Windows 2000,


Windows XP, or NT workstation.

You must modify the applications access control list. The Web
preview process uses the access assigned to -Default- or, if available,
an entry called Anonymous. One of those entries needs Reader
access to let you preview pages, framesets, documents, navigators,
and views. One of those entries needs Author access with create
document permission to let you preview forms.

The element to be previewed must reside in a database under the


Notes data directory on the local machine or on a server running the
HTTP task.

The element to be previewed must not be marked as hidden from


Web browsers.

Your browser(s) must be set up to override proxy settings (described


below).

Adding instant messaging to an application


Some applications, such as mail or discussion applications, can benefit
from instant message services that allow users who are online at the
same time to communicate directly with each other. You can integrate
Lotus Sametime messaging in an application to provide this capability.
For an example of how Sametime works in an application, see the Lotus
Notes 6 mail template.
For information on how to integrate Sametime in a Domino application,
see the appendix Enabling your Notes application in the Sametime 2.5
Java Toolkit Developers Guide. You can download the Java Toolkit
Developers Guide from the Documentation Library of the Lotus Developer
Domain at http://www.lotus.com/ldd/doc.

Creating an Application 3-27

Building Applications

localhost

Preventing users from accessing forms and views in a Web application


As you design an application users will access with a browser, you may
want to restrict browser users from using URL commands that would
open forms and views in your application. For example, you can design
your application so that a servlet that uses forms or views will only use
the forms and views using URL commands. With the "Don't allow URL
open" property set, it will be impossible for browser users to manipulate
these application components using Domino URL commands.

To restrict users from opening parts of an application using URL


commands
1. Select a database and choose Design - Design properties.
2. In the Web Access section of the Database properties box, select
"Don't allow URL open."
The set of URLs that gets restricted is
http://Host/Database.nsf/*Command. This set of URLs includes any
command that will open a database such as http://Host/Database.nsf
and all URL commands that are prefixed with a ?, such as
http://host/database.nsf?OpenDatabase. When this property is set, the
error displayed is:
Error 500
HTTP Web Server Lotus Notes Exception - You are not
authorized to access that database.

3-28 Application Development with Domino Designer

Chapter 4
Designing Pages

Pages
Pages and forms are similar in certain ways. A page is a database design
element that displays information. Pages can be used anywhere in your
application that you have text, graphics, or an embedded control, such as
an outline, to present to the user. A page or form can contain the following:
Elements to use
on a page

Description

Actions

Actions automate tasks for the user. Add actions to the


menu in the Notes client, or add actions with buttons or
hotspots on a page or form. For more information, see the
topic Actions in the chapter Adding Automation to
Applications.

Applets

Use Java applets to include small programs, such as an


animated logo or a self-contained application, in a page or
form. For more information about including Java applets
on a page or form, see the chapter Including Java Applets
in Applications.

Attachments

Attach files to a page or form so users can detach or launch


files locally.

Computed text

Use computed text to generate dynamic text based on


formula results.

Embedded
elements

You can embed the following elements in a page or form: a


view or folder pane, navigator, outline, or date picker. Use
these elements alone or combine them to control how users
navigate through your application.

Graphics

Place a graphic anywhere on a page or form. Use graphics


to add color to a page or form or to create imagemaps.
continued

4-1

Building Applications

This chapter describes how to design pages for Web and Notes
applications and includes detailed descriptions of the components you
can add to a page. The components you can add to a page can also be
added to forms and subforms.

Elements to use
on a page

Description

Horizontal rules

Add horizontal rules to separate different parts of a page


or form, or to make a page or form more interesting
visually.

HTML

If you have existing HTML or you prefer using HTML to


using the formatting tools Designer offers, you can import,
paste, or write your own HTML on a page or form. You
can also convert pages and forms to HTML.

Imagemaps

An imagemap is a graphic you enhance with


programmable hotspots. Hotspots, in the form of pop-up
text, actions, links, and formulas, perform an action when
clicked by a user. Use imagemaps as navigational
structures in an application.

JavaScript libraries You can find and insert JavaScript libraries into a page,
form or subform. For more information on inserting
JavaScript libraries, see the topic Inserting a JavaScript
library in this chapter.
Layers

Layers let you position overlapping blocks of content on a


page, form, or subform. Layers give you greater design
flexibility because you can control the placement, size, and
content of information. For more information on layers, see
the topic "Layers" in this chapter.

Links

Add links to take users to other pages, views, databases, or


URLs when they click on text or a graphic.

OLE objects and


custom controls

Designer supports objects that are linked and embedded


(OLE) as well as custom controls, sometimes called OCX
controls. Including a linked or embedded object on a page
or form lets you use a page or form as a gateway to
another application. For example, an Employee
Information page or form can include an OLE object that
links to a Word Pro file where the employee annual
performance reviews are stored. Notes/FXTM 2.0 fields
create a two-way exchange between Notes and a
supporting application by allowing field data to be shared
and updated from either application. For more information
on including OLE objects and custom controls on a form,
see the chapter Including OLE Objects in Applications.

Sections

A section is a collapsible and expandable area that can


include objects, text, and graphics.
continued

4-2 Application Development with Domino Designer

Description

Style Sheet (CSS)


shared resources

You can find and insert a cascading style sheet (CSS) as a


shared resource on a page, form, or subform. For more
information on style sheets, see the topic Creating style
sheets as shared resources in this chapter.

Tables

Use tables to summarize information, align text and


graphics in rows and columns, or position elements on a
page or form. For more information on creating
programmable tables, see the topic Creating
programmable tables in this chapter.

Text

Use text anywhere on a page or form and apply text


attributes, such as color, size, and font styles to the text. For
complete information on creating and formatting text, see
Notes Client Help.

For all other information on creating and formatting tables, see the topic
Creating tables in the Notes Client Help.

How pages compare to forms


Pages and forms both display information to users. Forms let you collect
information as well. Fields, subforms, layout regions, and some
embedded controls can only be used on forms. A page is best suited for
displaying information, while a form is more suitable for gathering
information.

Creating pages
A page is a design element that displays information to users. It is similar
to a form except that it does not contain fields or subforms.
To create a page:
1. Click Pages in the Design pane.
2. Click New Page.
3. Create the contents for the page, using elements such as text and
graphics.

Designing Pages 4-3

Building Applications

Elements to use
on a page

4. Choose Design - Page Properties to assign the following page


properties:
Page Properties box
Tab

Action

Page Info tab

Give the page a name.


Optionally, enter a comment.
Check No Initial Focus if you want the page to have no
focus when first opened.
Check No focus on F6 if you want to disable the F6 and
Shift F6 keys, which give focus to a frame.
Check Render pass through HTML in Notes so the page
containing the HTML appears correctly in Notes.
In the Web Access section, you can check one of the
following for the type of content:
- Notes
- HTML
- Other - if you specify Other, enter the type of content you
want.
You can also choose a character set for the Web user.
Set the default color for links appearing on the page. You
can set colors for active, unvisited, and visited links.

Background
tab

Select the background color or graphic for the page.

Launch tab

Select launch options for the page.

Security tab

Set security options for the page.

To delete a page
1. Click Pages in the Design pane.
2. Select the page you want to delete.
3. Choose Edit - Delete.
4. Click Yes to confirm.

4-4 Application Development with Domino Designer

Displaying a page
Pages do not display in views. To work around this, you can display
pages in the following ways:
Options for displaying pages

For more information, see

Make the page a frame in a


frameset.

The chapter Designing framesets.

Create an action that opens the


page.

The topic Actions in the chapter Adding


Automation to Applications.

Create an outline entry that opens The topic Outlines in the chapter
the page.
Designing Navigation for an Application.
Set the database launch property
to launch the page when the
database is opened.

The topic Setting database launch


properties in the chapter Completing an
Application and Managing Design
Changes.

Creating a home page for an application


A home page gives users a logical entry point to an application and
provides a summary of the information in the application. Make sure to
provide links back to the home page from other places within the site.
A home page should contain the following elements in a pleasing mix of
graphics and text:

A brief description of the company, product, service, or site

Links that navigate to other parts of a site

Information for new visitors

Information for frequent visitors who need to know what is new

A way to search for information

If necessary, a way to register on the site to view restricted areas

Create a page with links to other pages, views, documents, or navigators


in the same database or other related databases at the site. You should
take security issues into account when you decide whether to store the
home page in its own database or in a database used for other purposes,
such as discussions, user registration, or product information. You
generally provide fairly open access to a home page and limit access to
other parts of a site.

Designing Pages 4-5

Building Applications

Create a link to the page from a


The topic Creating links in this chapter.
form, subform, outline, or another
page.

For more information about security, see the chapter Security in an


application.
To set the home page to launch automatically
1. Choose File - Database - Properties.
2. Click the Launch tab.
3. Select the page you want to launch for Notes clients and for Web
clients.
For more information, see the topic Setting database launch properties
in the chapter Completing an Application and Managing Design
Changes.
To specify a default home page for a Web server
A server administrator can specify a Web sites default home page in the
server document for the server. When the administrator sets a default
home page in the server document, all databases on that server have the
same default page. Contact your server administrator for more
information.

Styling text for the Web


For Web applications, Domino automatically converts text styles to
HTML tags when there is a corresponding HTML equivalent. Bullets,
numbers, alignment (except Full Justification and No Wrap), spacing,
and named styles are some HTML equivalents. Certain types of
formatting such as indents, interline spacing, and tabs do not appear
when viewed from a Web browser because HTML has no corresponding
format. Be aware that different browsers may display tags differently
and that not all browsers support the HTML tags that Domino generates.
Fonts
If the fonts used are not the system defaults for example, in Windows,
Default Sans Serif and Default Serif Domino converts font instructions
to the HTML <FONT> tag and FACE= attribute to approximate the
original font choice. Text may look different to a Web user than it does to
a Notes user because the browser determines which fonts to use.

4-6 Application Development with Domino Designer

Size
Domino maps the text size you select in Designer to an HTML text size.
The following table lists the text size in Notes and the corresponding
HTML size. Note that Domino does not map font sizes to HTML heading
tags (H1, H2, and so on).
Maps to HTML size

11

3 (default size)

13

17

23

greater than 23

Preserving spaces
To align a column of numbers or to preserve or insert spaces, use the
default monospaced font. On a Windows system, the default
monospaced font is Courier. Domino converts the default monospaced
font to a monospaced font on the Web and preserves any spaces you
enter.
Text colors
Web users see the same approximate text colors as Notes users, but the
colors may not match exactly.

Creating computed text


You can use computed text to generate dynamic text based on formula
results.
1. Move the cursor to where you want the computed text to appear.
2. Choose Create - Computed Text.
3. In the Programmers pane, click the Objects tab of the Info List and
select Value (located under Computed Text).
4. Write a formula whose value displays the text for the page.
Example: Computed text
To personalize the message a user sees on a page or form, create
computed text that displays the users name.
On the page or form, enter the text:
Welcome <computed text>.

Designing Pages 4-7

Building Applications

Notes text size less than or equal to

Select Value (located under Computed Text on the Objects tab of the Info
List).
In the Script area, enter the formula:
@Name([CN];@UserName)

If the users name is Sara Ryan/Acme, when she opens the page or form
she will see:
Welcome Sara Ryan.
Note Domino publishes a <span> tag around the computed text for
access via JavaScript.

Changing all text styles


There may be times when you want to change the text style of all the text
on a page or form. For example, you might want to customize the mail
template to display all text in a different font type or size.
1. Open the page or form.
2. Choose Edit - Select All.
3. Choose Text - Text Properties and select the style options for the new
text.
4. Save and close the page or form.

Creating and formatting horizontal rules


To separate different parts of a page or form, or to make the document
more interesting visually, add horizontal rules. You can set width,
height, and color (including gradient color) for horizontal rules.
To create a horizontal rule
1. Move the cursor to the place for the horizontal rule.
2. Choose Create - Horizontal Rule.
To change the style of a horizontal rule
1. Select the horizontal rule; choose Horizontal Rule - Horizontal Rule
Properties.
2. Click the Horizontal Rule Info tab. On the Info tab you can:

Change the width and height.


To change the width in inches, choose Fixed width.
To change the width as a relative percent of the window, choose
Percent (%).
Note that height is always in inches.

4-8 Application Development with Domino Designer

Select a solid color. You can select a color from the palette or
customize colors by using the color wheel button in the top right
corner of the Color box. To set the color of your horizontal rule to
your systems color scheme, click the Color box menu and click the
System button.
To select a solid color, select a color and click the solid rectangle.

To select a gradient color, select the first color, click the shaded
rectangle and select the To color.

Make a horizontal rule transparent.


Click the Color box menu and click the Transparent button.
To undo transparency, click the Color box menu and click the Undo
transparent button.

Select No 3D shading.

Creating programmable tables


There are four types of tables you can create in Designer:

Basic tables Tables with a designated number of columns and


rows.

Tabbed tables Tables that let users switch rows by clicking on tabs
at the top of the table.

Animated tables Tables that switch rows at an interval you


designate.
Note that animated tables do not work on the Web. Also, animated
tables on forms are not designed for field entry.

Programmable tables Table that switch rows based on an action or


field formula.

Because creating a basic, tabbed, or animated table in Designer is the


same as creating tables in the Notes client, see the topic Creating tables
in the Notes Client Help. You can also press F1 for online help when you
are creating a table.

How programmable tables work


Programmable tables let you create a table that displays one row at a
time, based on an action or field formula. A programmable table starts as
a tabbed table that looks like a Designer Properties box. One tab, or row,
of the table is visible at a time to the user. With regular tabbed tables, the
Designing Pages 4-9

Building Applications

Select a gradient color. A gradient color is a color that blends and


fades into the other original color within a horizontal rule. Gradient
color is not supported on the Web.

user clicks the tabs at the top of the table to select which row displays.
With programmable tables, the user clicks on an action, a link, or an
outline entry to select which row appears.
You write a formula in the Script area of the Programmers pane to
control which row displays and to associate the row with an action, link,
or outline entry. Include a field in the formula that has the same name as
the name you give to the table in the Table Properties box, except
precede the field name by a dollar sign ($). Remember that table field
names are case-sensitive: $table is a different table field name than
$Table.
For example, on your companys home page, you could put a
programmable table that displays different information about your
company depending on what your site visitors want to see. If they click
the Location Information hot text they would see the row of the table
that gives them the location of your company. If they click the Company
History hot text they see the row of the table that describes your
companys history.
Note When you are designing programmable tables on a form, you can
use a field on the form to control the table. You can use a choice list field
that refreshes on change or use a computed field.
To create a programmable table
1. Move the cursor to where the table will appear on the page or form.
In a document, you must be in a rich-text field.
2. Choose Create - Table. The Create Table dialog box appears.
3. Select the number of rows and columns for the table.
Note All columns in a row will appear when the row is displayed.
4. Under Table Type, click the programmable table button.
5. Click OK.
6. Choose Table - Table Properties.
7. Do the following on the Table Programming tab of the Tables
Properties box:
In the Table HTML Tags field, enter a Name/ID for the table.
Click each row of the table and enter a name for each row in the
Row Tags field.
8. (Optional) To display tabs so users can switch rows, select Also
show tabs so user can pick row on the Table Rows tab.
9. Format the table.

4-10 Application Development with Domino Designer

For more information on tables, see the topic Creating tables in


Notes Client Help.
10. Enter text, graphics, or objects in the table.
11. Create links, a button, or an outline entry that will set the fields for
the table and control what displays.

Example: Creating hotspots to control a programmable table

2. Enter text and graphics in each row and column of the table.
3. Enter a line of text on the page (below the table) that is related to
what users will see when that row of the table is displayed. Enter a
line for each row of the table. For example, if you have a two-row
table one row has the company location and the other has the
company history enter two lines of text:
Our company locations
Our company history
4. Select the text for the first line and choose Create - Hotspot - Action
Hotspot.
5. Select the Hotspot Click event in the Objects tab of the Info List in the
Programmers pane.
6. Enter a formula in the Script area of the Programmers pane that sets
the field $CompanyInfo to the name of the row of the table you want
to display.
FIELD $CompanyInfo:= "a";
@Command([RefreshHideFormulas])

7. Select the second line of text and create a hotspot with the formula:
FIELD $CompanyInfo:= "b";
@Command([RefreshHideFormulas])

When users click on the first hotspot they will see the text and graphics
in the first row of the table only. When they click on the second hotspot
they will see the text and graphics in the second row of the table only.
For more information about writing formulas, see the Domino Designer
Programming Guide.

Designing Pages 4-11

Building Applications

1. Create a two-row, two-column, programmable table on a page.


Name the table CompanyInfo. Name the first row a and the
second row b.

Creating sections
Use sections to group and organize elements on a page or form. Sections
work well to present large amounts of information in an uncluttered
way. For example, if you have two different procedures on a page, and
users only need to see one at a time, you can put each procedure into a
collapsible section so that the users can expand only the section that they
need.

To create a section
1. Open the page or form.
2. Highlight the text, graphics, and other elements to include in the
section.
3. Choose Create - Section.

To format a section
1. Select the section and choose Section - Section Properties.
2. On the Section Title and Border tab, you can:
Enter a title for the section. Titles can be either text or a formula.
Use text if the title should be the same all the time.
Use a formula if you want the title to appear differently under
different conditions.
Select the border style. The border appears around the section.
Select a border color.
3. On the Expand/Collapse tab:
Select options for showing the section expanded or collapsed
depending on whether a document is being previewed, opened
for reading, opened for editing, or printed.
Select Hide title when expanded if users dont need to see the
section title when the fields are displayed.
Select Show as text when not previewing so that the user sees
the section only when the document is being previewed. If the
document is being printed or is opened for reading or editing, the
user sees the text with no visible sign that the text is contained in a
section.

To delete a section
Select the section and choose Section - Remove Section.

4-12 Application Development with Domino Designer

Creating links
You can create text or graphic links that users click on to navigate to
other parts of an application or to external sites on the Web. In the
properties box, you can set how the link displays to users. You can use a
different color text for text links, or a hotspot around a graphic that
shows when a user moves the mouse over it. Domino converts these links
to Hypertext links on the Web.

To link to a design element, create a Named Element link. Named


elements are:

Pages

Forms

Framesets

Views

Folders

Navigators

When you link to a named element, the link references the elements
name. Any change in the name of the element will break the link.
Whenever possible, create aliases for design elements. If the design
element has an alias, the link will be maintained as long as the alias does
not change.
There are two ways to link to a named element. You can copy and paste,
or you can use the Link Properties box.
To copy and paste a link
1. Select the design element you want to link to.
2. Choose Edit - Copy as Link - Named Element.
3. Select the text or graphic that will serve as the link and choose Create
- Hotspot - Link Hotspot.
The HotSpot Resource Link Properties box appears.
4. At the Hotspot Info tab, click the Paste icon.
5. (Optional) Enter a target frame for the link.
6. (Optional) Select Show border around hotspot. (Not supported on
the Web.)

Designing Pages 4-13

Building Applications

To create a Named Element link

To create a link using the properties box


1. Select the text or graphic that you want to serve as the link.
2. Choose Create - Hotspot - Link Hotspot.
3. On the Hotspot Info tab of the Hotspot Resource Link Properties box,
select Named Element as the type of link.
4. Select the type of Named element you want to link to and do one of
the following:
Enter the name of the element.
Click the folder icon to browse.
Click the @ icon to enter a formula that resolves to a link.
5. (Optional) Enter a target frame for the link.
6. (Optional) Select Show border around hotspot. (Not supported on
the Web.)

To create a link to a document, view, anchor, or database


Hotspot links are more stable than traditional HTML links because they
do not reference file names; rather, they reference the unique internal ID
of the element. If the name of the linked item changes, the link remains
valid.
To create a link to a document, view, anchor, or database:
1. Open or select the element you want to link to. For database links,
you can open the database in either the Notes client or in Designer.
For document, view, or anchor links, open or select from the Notes
client.
2. Choose Edit - Copy as Link - <type of link>.
3. Select the text or graphic that will serve as the link and choose Create
- Hotspot - Link Hotspot.
The Hotspot Resource Link Properties box appears.
4. On the Hotspot Info tab, select Link for the type.
5. Click the Paste icon.
6. (Optional) Enter a target frame for the link.
7. (Optional) Select Show border around hotspot. (Not supported on
the Web.)

4-14 Application Development with Domino Designer

To create a URL link


Use a URL link to create a link based on a URL name. Since this type of
link is based on a hard-coded URL name, any changes to the URL break
the link.
1. Select the text or graphic that you want to use as the URL link.
2. Choose Create - Hotspot - Link Hotspot.

4. Enter a full URL (including protocol) for the value. For example:
http://www.lotus.com

5. (Optional) Enter a target frame for the link.


6. (Optional) Select Show border around hotspot. (Not supported on
the Web.)

Example: links
For each concert schedule you send out, you want to provide a
cross-reference for more information about the performer. Create a link
in the document you create for a specific concert and specify a URL with
detailed information about the performer.
1. Edit the document announcing the concert.
2. Select text for the link hotspot.
3. Choose Create - Hotspot - Link Hotspot.
4. At the Hotspot Info tab of the Hotspot Resources Link Properties
box:
Type: Select URL
Value: Specify the Web address; for example:
http://www.concertseries.org/performers/luke.html
5. Save the document.

Using graphics
A page or form that contains a graphic is visually appealing but takes
more time to display and print. You can paste or import graphics into
pages, as you can into documents, forms, views, and navigators.
Designer stores graphics in Graphics Interchange Format (GIF) and Joint
Photographic Experts Group (JPEG) in their native formats. Therefore,
these are the best choices for graphic fidelity. Designer stores other types
of graphics in a platform-independent 256-color format that is similar to
GIF89a format. (GIFs are 256-color images.)
Designing Pages 4-15

Building Applications

3. On the Hotspot Info tab of the Hotspot Resource Link Properties box,
select URL as the type of link.

Graphics can be:

Stand-alone graphics that add aesthetics or focus to a page or form

Background graphics

Imagemaps navigation structures composed of graphics that


contain links

Preparing graphics
Your goal, when preparing a graphic, is to have it look as much as
possible like the graphic you created in your drawing program. How
graphics look depends on the users viewer, operating system, and color
mode.

Viewer Notes client or a Web browser.


If your audience is Notes users only, use either the Lotus color
palette or the Web color palette.
If your audience is Web users only, use the Web color palette.
If your audience is both Notes and Web users, either use black and
white or very simply colored graphics, or use the Web color
palette.

Operating system Macintosh, Windows NT, Windows XP


Professional, Windows 95/98/2000, OS/2, or UNIX.
Always reduce the color in graphics with formats other than GIF or
JPEG to 256 or fewer colors. Although doing this may reduce the
quality of high-resolution graphics, it ensures a more reliable color
display across platforms.

Color mode 16-color mode, 256-color mode, or High/True/24-bit


color mode.
If all users have machines that display in true color mode, reducing
the colors to 256 or fewer is all you need to do to prepare a graphic. If
users have machines running in 256-color mode, use a color palette
to map colors in the graphic to a table of predefined colors.

4-16 Application Development with Domino Designer

Changing the color palette


If you are designing applications for users to access on the Web, you can
change from the Lotus color palette to a Web color palette to provide
greater color fidelity. To change palettes:
1. Choose File - Preferences - User Preferences.

Note When Web users open a database, Domino converts non-GIF and
non-JPEG graphics to GIF or JPEG formats. The system administrator
specifies the format in the Image conversion format field, which is part
of the HTTP Server section of the Server document. For more
information, see Administering the Domino System.

Adding graphics to a page, form, or subform


There are four ways to add a graphic to a page, form, or subform:

Copy and paste

Import a graphics file

Create a picture

Insert an image resource

To copy and paste a graphic


1. Copy a graphic to the clipboard.
2. Open the page or form and move the cursor to where you want to
place the graphic.
3. Choose Edit - Paste.
To import a BMP, JPEG, GIF, PCX Image, or TIFF 5.0 bitmap
You can import different types of graphics files into a page, form, or
subform.
1. Move the cursor where you want to place the graphic.
2. Choose File - Import.
3. Select the graphic file to import and click Import.
To create a picture
1. Move the cursor to where you want to place the picture.
2. Choose Create - Picture.
3. Select a graphic to import and click Import.

Designing Pages 4-17

Building Applications

2. Check Use Web Palette on the Additional Options list of the Basics
tab. If this option is unchecked, Designer uses the Lotus color palette.

To insert an image resource


1. Move the cursor where you want to place the graphic.
2. Choose Create - Resource - Insert Resource.
3. Under Databases, select the database from which you want to insert
the image resource.
4. Under Resource type, select Images.
5. Under Additional resources, select an image to insert from the list
of images.
6. Click OK to display the image in the form, document, or page.

Changing the display properties of the graphic


Once you have added a graphic, you can change its display properties
using the properties box. Keep in mind that Domino passes the size and
scaling information for graphics to the browser. If the browser supports
scaling, the graphic has the same size and scale as it does in Notes;
otherwise, the graphic appears in its original size, regardless of how you
size it.
To resize a graphic
1. Select the graphic.
2. Choose Picture - Picture Properties.
3. Do one of the following:
Drag the box in the graphics lower right corner to resize the
graphic.
In the Scaling field of the properties box, enter a value for the
width and height.
To return a graphic to its original size
1. Select the graphic.
2. Choose Picture - Picture Properties.
3. On the Picture Info tab, click Reset.
To set the text wrap properties for the graphic
There are several alignment and text wrap properties you can set in the
Picture Properties box.
1. Select the graphic.
2. Choose Picture - Properties.
3. At the Picture Info tab, choose one of the options for wrapping text
around the graphic from the Text Wrap drop-down list.

4-18 Application Development with Domino Designer

By default, Designer aligns a picture with the bottom of the text


around it. To wrap text around the picture, choose either Wrap,
float image left (so that text appears to the right of the image) or
Wrap, float image right (so that text appears to the left of the
image).

1. Select the graphic.


2. Choose Picture - Picture Properties.
3. At the Picture Info tab, enter text in the Alternate text box.
To add a caption
1. Select the graphic.
2. Choose Picture - Picture Properties.
3. At the Picture Info tab, enter text in the Caption box. Click the check
mark to accept the text.
4. Select a display option for the caption.

Adding a background color or graphic


You can paste or import a BMP, JPEG, GIF, PCX Image, or TIFF 5.0
bitmap graphic file as a background for a page, form, or subform. If the
graphic is the same size as the page, form, or subform, it appears once;
smaller graphics tile to fill the background. All page or form elements
appear in front of background.
In addition, you can add a background color to enhance a page or form.
You might want to use a standard color for a particular type of page or
form, for example, white for a request page.
To have the background show through part of an image, create a
transparent GIF file with an image editor or utility and then import the
image. Both Notes and Web users see transparent background images.

Designing Pages 4-19

Building Applications

To add alternate text for the Web


You can make your application accessible to people with physical
disabilities. Many of these users access applications with screen readers.
Screen reader software, in conjunction with a digital speech synthesizer,
provides an aural representation of what is on the screen or the cursor. In
order to function, the screen reader software must have detailed
information about graphics, so that it can translate the graphical display
into speech. You can provide this information by making sure you
include alternate text for all the graphics in your application.

To choose a background color


1. Open the page, form, or subform.
2. Choose Design - <Design element > Properties and click the
Background tab.
3. Select a background color.
To paste a bitmap as a background
1. Copy to the clipboard the bitmap you want to use as a background.
2. Open the page, form, or subform.
3. Choose Design - <Design element> Properties and click the
Background tab.
4. Click Paste Graphic to display the graphic as the background.
To import a BMP, JPEG, GIF, PCX Image, or TIFF 5.0 bitmap as a
background
1. Choose Design -<Design element> Properties and click the
Background tab.
2. Click Import Graphic and select the file to import.
3. Click OK.
To delete the background
1. Choose Design - <Design element> Properties.
2. Click the Background tab and then click Remove Graphic.
For more information on pictures and on graphics, see the Notes Client
Help.

Adding an applet
You can add a Java applet to a page or form to provide visual interest or
additional functionality for example, you might use animation to
make your home page or form appealing. Applets can range from
programs you build yourself to prebuilt programs that you simply drop
into a page or form. In Web applications, you might want to display an
embedded view or embedded outline as an applet rather than as HTML
to provide a richer user interface.
The Designer elements that you can display as applets include outlines,
views, rich-text fields, and action bars. For more information, see the
topics for creating an outline applet, view applet, editor applet, and
action bar applet.
For custom or prebuilt applets you want to include in a page or form,
follow the steps for inserting, modifying, and running applets described
in the chapter Including Java Applets in an Application.
4-20 Application Development with Domino Designer

Creating an attachment
Add a file attachment to make the file available for users to launch or
detach. You can also create attachments to store files. For example, attach
a file for use in a Web application, so that it can be accessed using a
Domino URL.

1. Open the page, form, or subform.


2. Move the cursor to where you want to create the attachment.
3. Choose File - Attach.
4. Select the file and click Create.

Embedding elements
Embedded elements are objects and controls that can be embedded on a
page, form, subform, or document. Elements that can be embedded
include:

Views

Folders

Outlines

Navigators

Date pickers

Embedding elements makes it easier to design a single application for


use by both Notes clients and Web browsers. Many Notes elements
display differently when viewed on a browser. Embedded elements
provide functionality in Web applications that closely resemble
functionality already available in Notes applications. Additionally,
embedding lets you combine elements on a page or form and use a full
range of design features, including frames, tables, styled text, borders,
and graphics, to create a high-impact design.

To embed an element
1. Place the cursor where you want the embedded element to display
on a page, form, subform, or rich-text field of a document.
2. Choose Create - Embedded Element and select the type of element to
embed.
3. (Optional) If available for the element, you can enter a formula that
specifies under what circumstances it should display.

Designing Pages 4-21

Building Applications

For more information about opening an attachment with a URL


command, see the appendix URL commands for Web Applications.

4. (Optional) Click the embedded element and choose Element <element> Properties to change the alignment, style, or hide options.

To delete an embedded element


1. Select the embedded element.
2. Choose Edit - Delete.

Embedding a date picker


The embedded date picker is a navigational tool that works with open
calendar views. You can use an embedded date picker on a page or form to
customize a calendar application. The embedded date picker displays a
monthly calendar and the user can choose a month and a day of the month.
If you use a date picker in a frameset with a calendar view, clicking a
specific day in the date picker broadcasts a message to the frameset to
display the corresponding day in the calendar view and also displays all
calendar entries for that day. Note that the embedded date picker must
be in the same frameset as the calendar view and the calendar view must
be open. This feature is not supported on the Web.
To use a graphical calendar pop-up to make filling in a date/time field
easier for users, see the topic Creating a graphical display for
Date/Time in the chapter Designing Fields.
Beginning with Lotus Domino Designer 6, you can specify the calendar
view with which to use the embedded date picker. This is important if
there is more than one calendar view in a frameset. To specify the
calendar view, go to the Info tab of the Date Picker Properties box. Enter
a target frame so that the date selected appears only in the calendar in
the target frame. If you do not specify a target frame, all calendar views
in the frameset switch to the day selected in the date picker.
To embed a date picker
1. Move the cursor where you want the date picker to display on a
page, form, subform, or the rich-text field of a document.
2. Choose Create - Embedded element - Date picker.
3. Select the date picker and choose Element - Date Picker Properties to
set the following properties:
Horizontal and vertical size
Font style and color
Alignment and spacing
Hide-when options
Target frame
4-22 Application Development with Domino Designer

Inserting a JavaScript library


A JavaScript library is a place for storing and sharing common JavaScript
programs and code. You can insert an existing JavaScript library into a
page, form, or subform either in-line or into the JS Header.
For more information on Script libraries, see the Domino Designer
Programming Guide.

2. Choose Create - Resource - Insert Resource.


3. Highlight JavaScript Libraries, select an available JavaScript
library, and click OK.
To Insert a JavaScript Library into the JS Header:
1. Open a page, form, or subform in Designer.
2.

Select the JS Header event in the info list under the Objects tab

3.

Choose Create - Resource - Insert Resource.

4.

Select an available JavaScript library, and click OK.

Using HTML on a page, form, or subform


There are a number of ways you can include HTML on a page, form, or
subform when you are designing. If you have existing HTML or you
prefer to use HTML instead of the formatting tools Designer offers, you
have the following options:

Convert a page, form, or subform (or sections of the page, form, or


subform) to HTML and use the HTML editor to change the HTML.

Import HTML, thus using the source of an existing Web page or form
as the base of a new page or form. Designer renders the imported
HTML on the page, form, or subform already translated from HTML.

Paste HTML directly on a page, form, or subform. The HTML stays


in HTML format.

Enter HTML directly on a page, form, or subform. The HTML stays


in HTML format.

Designing Pages 4-23

Building Applications

To insert a JavaScript library in-line


1. Open a page, form, or subform in Designer.

To convert pages, forms, or subforms into HTML


You can convert some or all of the contents of a page, form, or subform
into HTML source code and then use the HTML editor to make changes
to the HTML source code.
1. Open a page, form, or subform in Designer.
2. Select the contents of the page, form, or subform that you want to
convert to HTML.
3. Choose Edit - Convert to HTML. The selected contents are converted
into HTML source code.
Because not everything in Notes has an exact equivalent in HTML,
the conversion to HTML is an approximation. You should always
check your conversion results.
If you mistakenly convert something to HTML, choose Edit - Undo
Delete to recover. Do not choose Edit - Convert to Notes because the
conversion is not exact.
Note Buttons that have Web or client JavaScript associated with the
Click event are converted to HTML as expected. However, buttons
that do not have Web or client JavaScript associated with the Click
event are not converted to HTML. For the buttons not converted to
HTML, it is recommended that you choose Edit - Undo Delete so that
the deleted button reappears on the page, form, or subform.
4. To use the HTML editor, place the cursor anywhere in the newly
created HTML source code and choose View - HTML pane.
The screen splits. The page, form, or subform appears in the top pane
(in an embedded Internet Explorer browser control) and its HTML
source code appears in the bottom pane.
5. You can edit the HTML source code in the bottom pane. Click
Refresh to see the results in the top pane of your HTML changes.
6. Press ESC to exit from the HTML editor.
7. (Optional) To convert the HTML to a Notes format, place the cursor
anywhere in the HTML source code in the top pane and choose Edit Convert to Notes Format.
Note that the conversion to Notes format is an approximation. You
should check your conversion results. If you convert to HTML and
then back to Notes, you may get unexpected results.

4-24 Application Development with Domino Designer

To import HTML
To import HTML you must first save it as a file that you can access.
1. Open a page, form, or subform.
2. Choose File - Import.

To paste HTML
1. Select the content you want to paste from the source of an existing
Web page, form, or subform.
2. Copy the content to the clipboard.
3. Open a page, form, or subform.
4. Choose Edit - Paste.
5. Open the Properties box for the page, form, or subform (Design <design element> Properties).
6. At the Info tab, check Render pass through HTML in Notes.
To enter HTML directly on a page, form, or subform
1. Open a page, form, or subform.
2. Enter the HTML directly on the page, form, or subform.
3. Open the Properties box for the page, form, or subform (Design <design element> Properties).
4. At the Info tab, check Render pass through HTML in Notes.
When you check Render pass through HTML in Notes, Domino passes
all data on the page, form, or subform directly to the browser. Domino
ignores embedded navigators and folders and any embedded views that
dont have Render pass through HTML in Notes selected.
To include some HTML on a page, form, or subform
If you do not want the entire page, form, or subform treated as HTML,
you can include some HTML on the page, form, or subform and mark
this text as HTML. Designer serves it correctly to the browser.
1. Enter or paste HTML on the page, form, or subform.
2. Select the text and choose Text - Pass-Thru HTML.
Note Pages, forms, or subforms containing pass-thru HTML may
display differently in the Notes client than on a browser. For example, if
you create nested tables by using pass-thru HTML, the table may contain
more white space when displayed in the Notes client than when
displayed in a browser.
Designing Pages 4-25

Building Applications

3. Select the file containing the HTML you want to import and click
OK. Designer translates the HTML and then adds it to the page,
form, or subform.

Layers
Layers let you position overlapping blocks of content on a page, form, or
subform. Layers give you design flexibility because you can control the
placement, size, and content of information. You can create and stack
multiple layers beneath and above one another. Transparent layers
reveal layers underneath; opaque layers conceal layers underneath.
The content of a layer depends on whether you create a layer on a page
or a form. When you create a layer on a page, a layer can contain the
same elements that a page can contain; for example, you can add text and
graphics, and so on. When you create a layer on a form, a layer can
contain the same elements that a form can contain; for example, you can
add text and graphics, as well as controlled-access sections, fields, and
subforms.
After you create a layer, you can change the following properties of the
layer:

Position

HTML properties

Background color and image

Creating a layer
If the layer you need is similar to one that exists in the same database,
another database, or a Designer template, you can copy and paste the
layer and then modify it. If no existing layer suits your purpose, create a
new layer.
To create a new layer
Follow these steps to create a new layer on a page. Note that you follow a
similar process to create a layer on a form or subform.
1. Click Pages in the Design pane.
2. Click New Page.
3. Choose Create - Layer.
4. Create the contents for the layer, such as text and graphics.
5. Choose Layer - Layer Properties to assign the following layer
properties:
On the Position tab, change the position of the layer.
On the Background tab, select the background color or graphic for
the layer.
On the HTML tab, specify the HTML for the layer.

4-26 Application Development with Domino Designer

To copy an existing layer


1. Select the layer that you want to copy.
2. Choose Edit - Copy to copy the layer to the clipboard.
3. Choose the location for the new layer.
4. Choose Edit - Paste to paste the copy into the new location.

2. Press Delete or choose Edit - Cut.


Layer anchors
Each layer has its own anchor. If you move the layer, the anchor remains
in place. To display or change the name of the layer, right-click the layer
anchor. The Layer Anchor Properties box appears with the current name
of the layer.
To hide a layer
You can hide a layer by changing the Hide When properties of the
paragraph containing the layer anchor. Move the cursor to the paragraph
containing the layer anchor, choose Text - Text Properties, and click the
Hide When tab.
If a layer anchor is contained in a collapsed section or in a non-current
row of a tabbed table, the layer and its contents are not visible until the
collapsed section is expanded or until the row is current.
To hide a layer for the current session only
You can hide a layer for the current Designer session by using the Layer
Tree dialog box.
1. Open a page, form, or subform and create one or more layers.
2. Choose Design - Layer Tree. The Layer Tree dialog box appears
listing all the layers (and their hierarchies) on the page, form, or
subform.
3. Select a layer. Click the Hide/Show button to hide or show the layer
while you edit the form or page in Designer.
4. To hide all layers for the current session, click Hide All. To show
all layers for the current session click Show All.
5. Click Close.

Designing Pages 4-27

Building Applications

To delete a layer
1. Select the layer that you want to delete.

Changing the position of a layer


When you create a layer, it contains default position values. You can
change the position of a layer in several dimensions by changing its
position values. Note that you specify a layer position in relation to the
block that contains it (also called the parent element).
1. Select the layer.
2. Choose Layer - Layer Properties and click the Positioning tab.
3. Choose a position and position value, as described in the following
table:
Layer
Position

Description

Top

Specifies the location of the top Auto aligns the top of the
layer vertically with its original
edge of the layer.
location (insertion point).

Left

Specifies the location of the left Auto aligns the left edge
horizontally with its original
edge of the layer.
location (insertion point).

Width

Specifies the width of the


layer, a value based on the
location of its right edge
relative to its left edge.

One-third of the width of the


window or the parent element,
whichever applies.

Height

Specifies the height of the


layer, a value based on the
location of its bottom edge
relative to the top edge.

One-third of the height of the


window or the parent element,
whichever applies.

Z-Index

Specifies the stacking order of


the layer; that is, how close to
or far from the front of the
parent element the layer is
located.

0; that is, in front of the parent


element.

4-28 Application Development with Domino Designer

Default value

Table of values for layer positions


The following table summarizes the possible values for each position.
Description

Top

Pixels

The location in pixels from the top edge of the


parent element.

Inches

The location in inches from the top edge of the


parent element.

Ems

The location in em units from the top edge of the


parent element.

Percent

The location from the top edge of the parent


element, computed as a percentage of the height of
the parent element.

Characters The location in characters from the top edge of the


parent element.

Left

Auto

The default location of the top edge. The layer top


edge is aligned vertically with the top edge of the
original insertion point.

Pixels

The location in pixels from the left edge of the parent


element.

Inches

The location in inches from the left edge of the


parent element.

Ems

The location in em units from the left edge of the


parent element.

Percent

The location from the left edge of the parent


element, computed as a percentage of the width of
the parent element.

Characters The location in characters from the left edge of the


parent element.

Width

Auto

The default location of the left edge. The layer left


edge is aligned horizontally with the left edge of the
original insertion point.

Pixels

The layers width in pixels.

Inches

The layers width in inches.

Ems

The layers width in em units.

Percent

The layers width, computed as a percentage of the


width of the parent element

Characters The layers width in characters.


Auto

Auto sets the width automatically based on the


layers contents.
continued
Designing Pages 4-29

Building Applications

Layer Position Value

Layer Position Value

Description

Height

Pixels

The layers height in pixels.

inches

The layers height in inches.

Ems

The layers height in em units.

Percent

The layers height, computed as a percentage of the


height of the parent element.

Characters The layers height in characters.

Z-Index

Auto

Auto sets the height automatically based on the


layers contents.

Integer

A layer with a higher Z-Index value (for example,


layer A) is located closer to the user; that is, it is
stacked in front of a layer with a lower Z-Index
value (for example, layer B). If the layers overlap
and layer A is opaque, the contents of layer A
obscure the contents of layer B. In addition, the
contents of layer B cannot be clicked or selected,
even if layer A is tranparent.
A negative Z-Index is placed behind the parent
elements contents (so that it cannot be clicked or
selected); a positive Z-Index (>=0) is placed in front
of the parent elements contents (and prevents
overlapped parent element content from being
clicked or selected).

Changing the HTML properties of a layer


If you are designing an application for the Web and are using HTML 4.0,
the HTML tab lets you apply core attributes that are common to layers.
Domino incorporates the values of these attributes to the HTML that it
creates at run time. When you are using the HTML tag attributes,
remember that the HTML must be ASCII characters. Also, do not include
quotation marks when you enter the attributes in the various boxes,
except in the Other box, as described in the table that follows.
1. Select a layer.
2. Choose Layer - Layer Properties and click the HTML tab.

4-30 Application Development with Domino Designer

3. Specify HTML attributes, as described in the table that follows:


Description

ID

The ID attribute; in this case, Layer.

Class

Use the Class attribute to apply a CSS class for a defined object.
For example, if the objects name is ZipCode, the class could be
Numeric. CSS styles are defined in the HTML Head Content
event for a form or page.

Style

Use the Style attribute to apply a specific CSS style to an object


using inline CSS. For example, if the objects name is ZipCode,
the class is Numeric, the style could be font-size:10pt. If you have
more then one value, separate them with a semicolon; for
example, font-size:10pt; color:blue.

Title

Generally use the Title attribute in Explorer 4.x and later to


provide the user with a tip or prompt. For example, if the objects
name is ZipCode, the class is Numeric, the title could be:
Enter your Zip Code.
Note that the title displays differently on different browsers.

Other

Use the Other attribute for additional HTML tag attributes,


which must be written as pure HTML code. For example, instead
of writing ZipCode in the Name/ID box, you write
ID=ZipCode.

Changing the background color and image for a layer


You can use color and images in stacked layers to great effect. If you
have created several layers and want to obscure layers stacked
underneath, use colors and images on layers with a higher Z-Index
value; if you want layers stacked underneath to show through, do not
use background colors and images on layers with a higher Z-Index value.
To choose a background color
1. Select a layer.
2. Choose Layer - Layer Properties and click the Background tab.
3. Select a background color.
To insert an image resource as the background
1. Select a layer.
2. Choose Layer - Layer Properties and click the Background tab.
3. Click the folder icon. The Insert Image Resource dialog box appears.
4. Select an image resource and click OK. The image becomes the
background for the layer.

Designing Pages 4-31

Building Applications

Tag

To create an image using a formula


1. Select a layer.
2. Choose Layer - Layer Properties and click the Background tab.
3. Click the @ icon to enter a formula that resolves to an image.
To change the tile pattern of an image
1. Select a layer.
2. Choose Layer - Layer Properties and click the Background tab.
3. Choose one of the following tile patterns.
If you choose this pattern The image
Tile

Repeats in rows and columns to fill the entire


layer

Repeat once

Appears in the upper left corner of the layer

Repeat vertically

Appears in multiple copies along the left edge of


the layer

Repeat horizontally

Appears in multiple copies along the top edge of


the layer

Center

Appears in the center of the layer

Size to fit

Expands to fill the entire layer

Setting launch properties for pages or forms


You can set auto launch properties for pages and for forms at the Launch
tab of the appropriate properties box.

To set the launch property for a page


1. Open the page.
2. Choose Design - Page Properties. The Page Properties box opens.
3. Click the Launch tab.
4. Select one of the following objects to launch automatically when a
user opens the page:
First Attachment
First Document Link
First OLE Object
None (default)
URL

4-32 Application Development with Domino Designer

5. Set the frameset that the page will be associated with and the frame
within that frameset.

To set the launch property for a form


1. Open the form.
2. Choose Design - Form Properties to open the Form Properties box.
4. For forms, select one of the following objects to launch automatically
when a user opens the document created with this form:
First Attachment
First Document Link
First OLE Object
None (default)
URL
Other objects, including the following:
Bitmap Image, Lotus ScreenCam Movie, Lotus Word Pro 9
Document, Media Clip, MIDI Sequence, Netscape Hypertext
Document, Package, Paintbrush Picture, Wave Sound, WordPad
Document.
5. (URL only) If you choose URL, follow these steps:
Create a rich text field on the form and name the field URL.
At the Launch tab of the Form Properties box, select URL.
Create a document using this form.
In the rich text field named URL, create a Link Hotspot (Create Hotspot - Link Hotspot) for the URL you want to automatically
launch.
Close and reopen the document and the Web page should display
in your browser.
6. If applicable, set the frameset that the form will be associated with
and the frame within that frameset.

Designing Pages 4-33

Building Applications

3. Click the Launch tab.

Creating style sheets as shared resources


Cascading style sheets (CSS) give you the ability to control many aspects
of your page layout, including headers, links, text, fonts, styles, color,
and margins. You can browse your local file system for a CSS, turn it into
a shared resource, and then insert it into a page, form, or subform.
To create a new style sheet resource
1. Expand Shared Resources in the Design pane.
2. Select Style Sheets from the list of resources.
3. Click New Style Sheet Resource. The Browse dialog box opens.
Only files with a CSS extension appear.
4. Find and select the cascading style sheet you want to use.
5. Click Open to add the style sheet to the list of style sheet resources.
The Style Sheet Resource Properties box opens, so you can change
the name or other properties of the style sheet.
To insert a style sheet resource into a page, form, or subform
1. Open a page, form, or subform.
2. Place the cursor where you want to add the style sheet.
3. Choose Create - Resource - Insert Resource. The Insert Resource
dialog box appears.
4. Select the database containing the style sheet. The default is the
current database.
5. Select Style Sheets as the resource type.
6. In the Available resources section, highlight the style sheet resource
to add.
7. Click OK.
8. (Optional) To view the name of the inserted style sheet resource or to
change to another style sheet resource, choose Style Sheet - Style
Sheet Properties. The Style Sheet Properties box appears with the
name of the style sheet resource. To select a different style sheet
resource, click the Locate Object folder.
To edit a style sheet resource
1. Expand Shared Resources in the Design pane.
2. Select Style Sheets from the list of resources.
3. Select a style sheet resource.
4. Do one of the following:

4-34 Application Development with Domino Designer

If you have a default style sheet editor, click Open File to edit
the resource.
Click Open With and select an editor to open the style sheet
resource.

1. Expand Shared Resources in the Design pane.


2. Select Style Sheets from the list of resources.
3. Select a style sheet resource.
4. Click Refresh. The Open dialog box appears.
5. Select the CSS file to refresh your style sheet resource and click
Open. The style sheet resource is updated.

Table of supported CSS properties


The following table shows the Cascading Style Sheet properties that
Domino Designer supports. The HTML tags automatically map to Notes.
For example, this tag automatically maps to Notes:
BODY {Font-Family: Arial; Color: Blue}

Use this key to read the table:


Yes = property is supported
N/A = not applicable
N/S = not supported
Note the following:

A property set via the style sheet resource takes precedence over a
conflicting property set in the elements properties box.

Border-top-color and border-color are applied to all four sides of the


element.

Border-top-style and border-style are applied to all four sides of the


element.

For image, the following properties are applied to the image caption:
color, font-weight, font-style, font-size, font-family, and
text-decoration.

The visibility property is not listed in the table because of its minimal
support. It is supported only for the <DIV> tag for hidden and
collapse values.

Designing Pages 4-35

Building Applications

To refresh a style sheet resource


To update a file you have copied as a shared resource, you can refresh
the style sheet resource.

List of Properties

Document
<Body>

Layer
Paragraph
<DIV> <P>

List Item
<LI>

Table
Cell
<TABLE> <TD>

Graphic
<IMG>

background-color

Yes

Yes

N/S

N/S

Yes

N/A

background-image

N/S

N/S

N/A

N/A

background-repeat

N/S

N/S

N/A

N/A

Yes

border-bottom-width

N/A

N/A

Yes

Yes

Yes

Yes

Yes

border-color shorthand

N/A

N/A

Yes

Yes

Yes

Yes

Yes

border-left-width

N/A

N/A

Yes

Yes

Yes

Yes

Yes

border-right-width

N/A

N/A

Yes

Yes

Yes

Yes

Yes

border shorthand

N/A

N/A

Yes

Yes

Yes

Yes

Yes

border-style shorthand

N/A

N/A

Yes

Yes

Yes

Yes

Yes

border-top-width

N/A

N/A

Yes

Yes

Yes

Yes

Yes

border-top-color

N/A

N/A

Yes

Yes

Yes

Yes

Yes

border-top-style

N/A

N/A

Yes

Yes

Yes

Yes

Yes

border-width shorthand

N/A

N/A

Yes

Yes

Yes

Yes

Yes

color

Yes

Yes

Yes

Yes

Yes

Yes

Yes

font-family

Yes

Yes

Yes

Yes

Yes

Yes

Yes

font-size

Yes

Yes

Yes

Yes

Yes

Yes

Yes

font-style

Yes

Yes

Yes

Yes

Yes

Yes

Yes

font-weight

Yes

Yes

Yes

Yes

Yes

Yes

Yes

height

N/A

Yes

N/A

N/A

N/A

N/A

N/A

left

N/A

Yes

N/A

N/A

N/A

N/A

N/A

margin-bottom

N/A

N/A

Yes

Yes

Yes

N/A

Yes

margin-left

N/A

N/A

Yes

Yes

Yes

N/A

Yes

margin-right

N/A

N/A

Yes

Yes

Yes

N/A

Yes

margin shorthand

N/A

N/A

Yes

Yes

Yes

N/A

Yes

margin-top

N/A

N/A

Yes

Yes

Yes

N/A

Yes

padding-bottom

N/A

N/A

Yes

Yes

Yes

N/A

Yes

padding-left

N/A

N/A

Yes

Yes

Yes

N/A

Yes

padding-right

N/A

N/A

Yes

Yes

Yes

N/A

Yes

padding shorthand

N/A

N/A

Yes

Yes

Yes

N/A

Yes

padding-top

N/A

N/A

Yes

Yes

Yes

N/A

Yes

position

N/A

Yes

N/A

N/A

N/A

N/A

N/A
continued

4-36 Application Development with Domino Designer

List of Properties

Document
<Body>

Layer
Paragraph
<DIV> <P>

List Item
<LI>

Table
Cell
<TABLE> <TD>

Graphic
<IMG>

text-decoration

Yes

Yes

Yes

Yes

Yes

Yes

Yes

top

N/A

Yes

N/A

N/A

N/A

N/A

N/A

width

N/A

Yes

N/A

N/A

N/A

N/A

N/A

z-index

N/A

Yes

N/A

N/A

N/A

N/A

N/A

A page or form has events associated with it that you can use to run a
simple action, a formula, a LotusScript routine, or a JavaScript program.
To see what events are available for a page or form, open the page or
form in Designer and look at the list of events in the Objects tab in the
Programmers pane. When you select an event, the programming choice
for that event appears to the right of the Object tab. For example, if you
select the onLoad event for the Web, you program it using JavaScript or
Common JavaScript. If you select the onLoad event for the client, you can
use JavaScript, Common JavaScript, LotusScript, or Formula.
For information on each event and an example of how to program them,
see the Domino Designer Programming Guide.

Adding HTML header information


The HTML Head Content event on a page or form lets you pass HTML
information, such as a Meta tag, to the <Head> tag for a document.
To add HTML header information
1. In the Programmers pane, click the Objects tab.
2. Select the HTML Head Content event.
3. Enter the HTML in the Script area of the Programmers pane.
4. Click the green check mark to validate your work.
Example: Adding HTML to the Head tag
This example uses the HTML Head Content event to add the Meta tag
keyword with a value of gold to the <Head> tag in a document.
"<meta name=\"keyword\" content=\"gold\">"

Designing Pages 4-37

Building Applications

Programming a page or form

Adding JavaScript header information


Use the JS Header event to store any JavaScript functions that you want
to call from other events on the page or form. You do not have to include
the <SCRIPT> tags. Domino creates those for you and puts the script into
the <HEAD> tag of the HTML page or form.
To add JavaScript header information
1. In the Programmers pane, click the Objects tab.
2. Select the JS Header event.
3. Enter script in the Script area.
4. Click the green check mark to validate your work.
Example: Adding JavaScript header information
This example uses JavaScript and cookies to load a page or form into the
browser and save a cookie called Cookie_Man in the users cookie file.
It also displays a message that shows the number of times a user has
visited the site. It uses two functions, doCookie() and getTimes(), written
in the JS Header. These functions are called from the onLoad event.
Note The actual expiration date in the code has to be changed to a
future date in order to make the cookies work properly.
In the JS Header Event enter the following code:
cookieName = "Cookie_Man";
function doCookie() {
var index = -1;
if(document.cookie) {
index = document.cookie.indexOf(cookieName);
}
if (index == -1) {
document.cookie = cookieName +
"=1; expires=Saturday, 03-Apr-2010 08:00:00 GMT";
} else {
var countbegin = (document.cookie.indexOf("=", index) +
1);
var countend = document.cookie.indexOf(";", index);
if (countend == -1) {
countend = document.cookie.length

4-38 Application Development with Domino Designer

}
var count = eval(document.cookie.substring(countbegin,
countend)) + 1;
document.cookie=cookieName+"="+count+";
expires=Saturday, 03-Apr-2010 08:00:00 GMT";
}

function getTimes() {
if(document.cookie) {
var index = document.cookie.indexOf(cookieName);
if (index != -1) {
var countbegin = document.cookie.indexOf("=", index)+
1);
var countend = document.cookie.indexOf(";", index);
if (countend == -1) {
countend = document.cookie.length;
}
return document.cookie.substring(countbegin,
countend);
}
}
return 0;
}

The onLoad page or form event contains the following code:


doCookie(); // Grab the cookie information
document.forms[0].visited.value = getTimes(); // format
visited count into the document

Create a text field on the form named "Visited."


Include the text on the form:
You have visited this site <Visited> time(s) before.

Designing Pages 4-39

Building Applications

Chapter 5
Designing Forms

Forms
Forms, like pages, display information. Everything that can be done with
a page can be done with a form. What sets forms apart from pages is that
forms can be used to collect information. A form provides the structure
for creating and displaying documents, and documents are the design
elements that store data in the database. When a user fills out the
information in a form and saves it, the information is saved as a
document. When a user opens the document, the document uses the
form as a template to provide the structure for displaying the data.
Here are the basic steps involved in designing a form:
1. Decide on the purpose and type of form you need. To do so,
consider:
The kind of information you want to collect and which elements
you need.
How and where the resulting documents, which contain and
display the collected information, appear.
2. Create the form.
3. Add elements to the form.
4. Name the form.
5. Assign its properties.
6. Preview and test the form in the browsers users access it with.

5-1

Building Applications

This chapter describes designing forms as well as information on


designing some special types of forms. This chapter works in conjunction
with the chapter Designing Pages, which describes elements you can
use with either a page or a form.

Form elements
You can use the following elements in a form or subform. Many of these
elements can also be used in pages.
Element to use on Description
a form or subform
Actions

Actions automate tasks for the user. Add actions to the menu
in the Notes client, or add actions with buttons or hotspots on
a form, subform, or page. For more information, see the topic
Actions in the chapter Adding Automation to Applications.

Applets

Use Java applets to include small programs, such as an


animated logo or a self-contained application, in a form,
subform, or page. For more information on including Java
applets, see the chapter Including Java Applets in
Applications.

Attachments

You can attach files to a form, subform, or page so users can


detach or launch files locally.

Automation

You can create form actions, buttons, or hotspots on a form,


subform, or page to automate simple or complex tasks. For
more information on creating these elements see the chapter
Adding Automation to Applications.

Computed text

Use computed text to generate dynamic text based on formula


results.

Embedded
elements

You can embed the following elements in a form, subform, or


page:
Embedded outline
Embedded view or folder pane
Embedded navigator
Embedded date picker
You can embed the following elements only in a form or
subform:
Embedded file upload
Embedded scheduler
Embedded editor
You can use any of these embedded elements alone or
combine them to control how users navigate through your
application.
continued

5-2 Application Development with Domino Designer

Description

Fields

Fields are the design elements that collect data. You can
create fields only on forms or subforms. Each field on a
form stores a single type of information. A fields field type
defines the kind of information a field accepts. You can
place fields anywhere on a form. For information on fields,
see the chapter Designing Fields.

Graphics

You can place a graphic anywhere on a form, subform, or


page. The graphic appears on the page or on any document
created with the form or subform. For example, on a form
for correspondence, placing your company logo at the top
of the form creates a letterhead. For more information on
using graphics on a page, form, or subform, see the topic
Using graphics in the chapter Designing Pages.

Horizontal rules

You can add horizontal rules to separate different parts of


a form, subform, or page.

HTML

You can use HTML on forms, subforms, and pages. You


can either write your own HTML or use existing HTML by
importing or pasting the HTML. You can also convert a
form or page to HTML and use the HTML editor.

Imagemaps

Imagemaps are graphics you enhance with programmable


hotspots that perform some action when clicked by a user.
Imagemaps are often used as navigational structures in an
application. You can use them on a form, subform, or page.

JavaScript libraries You can find and insert JavaScript libraries into a page,
form or subform. For more information on inserting
JavaScript libraries, see the topic Inserting a JavaScript
library in the chapter Designing Pages.
Layers

Layers let you position overlapping blocks of content on a


form, subform, or page. Layers give you greater design
flexibility because you can control the placement, size, and
content of the information. For more information on layers,
see the topic Layers in the chapter Designing Pages.

Layout region

A layout region is a fixed-length design area in which


related elements can be moved easily and be displayed in
ways not possible on regular forms and subforms. A
layout region can contain static text, graphics, buttons, and
all fields except rich text fields. You can hide or collapse a
layout region and all its components under certain
conditions. Layout regions are not supported for Web
applications. For more information on layout regions, see
the topic Layout regions in this chapter.
continued

Designing Forms 5-3

Building Applications

Element to use on a
form or subform

Element to use on a
form or subform

Description

Links

Within a form, subform, or page, you can add links to


databases, views, specific documents, or URL links that
open pages on the Internet.

Sections

A section is a collapsible and expandable area defined on a


form or subform. It can include fields, objects, layout
regions, and text. For more information on sections, see the
topic Creating sections in the chapter Designing Pages.
An access-controlled section allows only certain users to
edit the fields in the section. For information on creating an
access-control list for a section, see the topic Creating
access-controlled sections in the chapter Security in an
application.

Shared resource

The following shared resources can be added to a form or


subform:

Images
JavaScript libraries
Shared fields
Subforms
Style sheets
HTML Files

Style sheet (CSS)


shared resources

You can find and insert a cascading style sheet (CSS) as a


shared resource on a page, form, or subform. For more
information on style sheets, see the topic Creating style
sheets as shared resources in the Designing Pages
chapter.

Subforms

A subform is a collection of form elements stored as a single


object. A subform can be a permanent part of a form or can
appear conditionally, depending on the result of a formula.
Subforms save redesign time. When you change a field on a
subform, every form that uses the subform changes.
Common uses of subforms include adding a company logo
to business documents or adding mailing label information
to mail and memo forms. For more information on
including subforms, see the topic Subforms in this chapter.

Tables

Use tables in forms, subforms, and pages to summarize


information or to align elements such as fields and
graphics in rows and columns. For information on creating
programmable tables, see the topic Creating
programmable tables in the chapter Designing Pages.

Text

Text is often used to label fields so users understand the


purpose of each field. For more information on formatting
text, see Lotus Notes 6 Help.

5-4 Application Development with Domino Designer

For information on creating and formatting tables, see the topic


Creating tables in Lotus Notes 6 Help. You can also press F1 while you
are creating a table to get online help.

Forms and documents

A form is stored in the database it was created in and used to display all
associated documents. However, there may be times when you are
mailing a document to a database that does not have the form that was
used to create the document. In those cases you can designate the form to
be stored with each document created from it. Storing the form with each
document does consume more memory.
When a user opens a document, Domino uses these rules to determine
which form to use to display it:
Condition

Form used to display document

If the form used to create the


document is available and there is
no form stored in the document
and no form formula

The form that was used to create the


document. The original form name is
stored in a hidden field called Form in
the document. To find the value of the field
you can check the Document Properties
box under the Fields tab.

If a form is stored with the


document

The form stored with the document.


(When a form is stored in a document, the
form name is stored in an internal field
called $Title.)

If the view has a form formula

The form is determined by the views form


formula.

If the form used to create the


document is not available in the
database

The default form for the database. Each


database can have only one default form,
which is marked with an arrow in the
Forms list.

Designing Forms 5-5

Building Applications

When a user creates and fills out the information in a form and saves it,
the information is saved as a document. When a user opens the
document, the document uses the form as a template to provide the
structure for displaying the data. When designing forms, you should
consider where and how the resulting documents will be displayed.

Storing a form with each document


Storing the form with each document allows the document to display
correctly even in a database where the form is missing, renamed, or
deleted. This feature uses more system memory and may require as
much as 20 times more disk space. Note that if you change the form
design, there is no easy way to update all of the stored copies of the form.
In general, store a form in a document only under these conditions:

The database to which documents are mailed or pasted does not


contain a copy of the original form.

The database to which documents are mailed or pasted doesnt share


an alias with the original form.

The form contains an embedded OLE object or a subscription, and


you want documents to reflect any changes to the object.

You selected Include in Search Builder in the Form Properties box


and want the forms static text to be searchable.

Note Be aware that forwarding a document does not forward a form or


its field definitions. If there are instances where you need to forward the
form and its definitions, you can check Store form in document on the
Form Info tab of the Form Properties box.
To store a form with each document
1. Open the form.
2. Choose Design - Form Properties.
3. Click the Form Info tab.
4. Select Store form in document and close the Form Properties box.
5. Open the Database Properties box. At the Database Basics tab, check
Allow use of stored forms in this database and close the Database
Properties box.
Overriding the stored form
When a form is stored in a document, the form name is stored in a
hidden field called $Title. Additional information is stored in the $Info,
$WindowTitle, and $Body fields. To use a different form to display the
document, create an agent that deletes this stored form information and
designates another form to display the document.
Shared fields and documents with stored forms
If the form contains a shared field, that field is converted to a single-use
field in the copy of the form that is stored in the document. This ensures
that if a copy of the document is stored in a database that does not
contain the shared field definition, the field can still be used. In the
original form, the field is still defined as shared.
5-6 Application Development with Domino Designer

Form formulas
To override the default form selection, write a form formula for a
particular view. For example, you can write a form formula that uses one
form to display all fields when a user edits a document and a different
form that re-sequences or omits fields when a user reads a document.
Since form formulas apply only to a specific view, documents created in
other views do not use the form formula.

Designating a default form for a database


1. Open the Form Properties box.
2. Click the Form Info tab.
3. Select Default database form.

Alternatives to storing forms


As an alternative to storing the form in a document, you can use the
LotusScript Send method to design a form you can mail along with a
document. This ensures that the database will have the correct form to
display the document but wont need to store the form with each
document.
For more information on using LotusScript to mail forms with
documents, see the Domino Designer Programming Guide.

Creating and deleting forms


To create a form, you must have at least Designer access in the database
ACL.
If the form you need is similar to one that exists in the same database,
another database, or a Designer template, copy the form and then modify
it.
To create a new form
1. In an open database, click Forms in the Design pane, and then click
New Form.
2. Design the form. Create fields, text, and other elements on the form.
3. Choose Design - Form Properties to assign a name and other form
properties.

Designing Forms 5-7

Building Applications

For more information on writing form formulas, see the Domino Designer
Programming Guide.

To copy an existing form


1. In the Design pane, click Forms.
2. From the list of forms in the Work pane, select the form you want to
copy.
3. Choose Edit - Copy to copy the form to the clipboard.
4. Open the database you want to copy the form into and click Forms in
the Design pane.
5. Choose Edit - Paste to paste the copy into the list of forms in the
target database.
If you are copying a form from a different database, resources such as
shared fields and shared images are not sent with the copied form. You
must copy shared resources separately to the new database.
Special types of forms
There are several types of forms that you can create for specific purposes.
See the following topics for information on creating any of these types of
forms.

Profile forms

Forms that prompt users for input

Forms for a Domino billing application

To delete a form
Remove a form when users no longer need it. After you delete the form,
documents that were created with the deleted form are displayed with
the default form instead. After you delete a form, to prevent users from
receiving a form cant be found message, create an agent that reassigns
the form name.
For information on using agents to reassign documents to a new form,
see the topic Using agents to update documents affected by form
changes in the chapter Completing an Application and Managing
Design Changes. changes.
1. Open the database.
2. In the Design pane, click Forms.
3. Select the form you want to delete.
4. Press DEL or choose Edit - Delete.

5-8 Application Development with Domino Designer

Tips for designing forms


Use the ruler to set tabs and to position elements. Choose View Ruler to see the current paragraph settings.

Use tables to align elements on a form. Nested tables give you very
precise control over how you present content. In addition, you can
use tables to create certain text effects, such as having text wrap
around a picture.

Group related information together. Use sections for approvals or


other special access needs. Create subforms that group design
elements you use in multiple forms.

When designing multiple forms for an application, locate particular


fields, especially data such as name, department, current date, and
due date, in a consistent place and a consistent order.

Place hidden fields together at the bottom or top of a form. Assign a


different text color to hidden fields.

Computed fields are evaluated from the top down and left-to-right.
Place dependent fields after the fields they depend on.

Use centered text at the top of a form only. It tends to get lost when
used farther down on the form.

Hide elements that users dont need to see when they are editing,
reading, or printing. In particular, hide nonessential graphics while
printing.

Provide actions and hotspots to let users take action quickly.

Use collapsible sections to organize a form and make it easier for


users to see the information they need. Set the section properties to
expand the section in one context and collapse it in another.

Naming forms
Each form in a database must have a unique name. If you make a copy of
a form and paste it into the same database it came from, Designer will
automatically prepend Copy Of to the form name to keep the names
unique. If you create multiple databases that contain the same
information, use the same names for the forms. Standard names enable
users to recognize commonly used forms; they also make it easier for
users with similar databases to communicate. For example, suppose you
have four customer-tracking databases, one in each regional sales office.
If the Southern regional manager wants to discuss a shared account with
the Western regional manager, both managers should know what a
Company Profile document is.

Designing Forms 5-9

Building Applications

To name or rename a form, choose Design - Form Properties and


enter a name for the form.

Name requirements
Keep the following in mind:

The name is case-sensitive and can be any combination of characters,


including letters, numbers, spaces, and punctuation.

If there are no synonyms or cascading name, the maximum length of


the form name is 64 bytes. When the full form name includes all
synonyms and the cascading name, the maximum length is 256
bytes. If youre using multibyte characters, 256 bytes is different from
256 characters.

Only the first 64 characters of a form name appear in the Create


menu.

Creating aliases
A form can have additional names, called aliases. If you create an alias
for a form, you can change the form name that appears on the Create
menu without having to rewrite every formula that references the form.
You can also reassign existing documents to the new form, and rewrite
formulas or reassign documents if the form name is translated. The form
name and its aliases are separated by a vertical bar (|).
If a form has only one name, it appears on the Create menu and in the
documents FORM field. If there are two or more names, the forms first
(leftmost) name always appears on the Create menu, while the forms
last (rightmost) name, which is typically the alias, appears in the FORM
field. Sometimes a form can have multiple names usually due to
translation. In those cases the middle names are ignored. As long as the
alias does not change, documents will display using the original form
and all formulas referencing the form will continue to work.
Tip If you add an alias to a form that is referred to in an existing view
(or folder) selection formula, the formula will not display documents
created or edited after the alias is assigned. It is good design practice to
assign an alias at the same time you name a form to avoid such problems.
To add an alias
1. Choose Design - Form Properties to open the Form Properties box.
2. In the Name field (at the Form Info tab), add a vertical bar (|) to the
right of any other names. Then add an alias.
In the following example, Interview is the alias and Main Topic is the
original name:
Main Topic | Interview
5-10 Application Development with Domino Designer

Form names and keyboard shortcuts


Windows users can select a menu item quickly by typing its keyboard
shortcut (an underlined letter). If each form begins with a different letter,
the keyboard shortcut is easy to see on the Create menu.

Inter_view

Ordering forms on the Create menu


A form structures the data for a document that a user creates. In a Notes
client application, a user chooses a form from the Create menu to create a
new document. The Create menu sorts form names in alphabetical order.
To display the forms in a different order for example, with the most
frequently used form appearing first precede the form name with a
number or a letter to force the forms into the correct sequence. If a
database has too many forms to display all the forms neatly on the Create
menu, you can design a cascading menu to embed the related forms
under one menu item. The Mail template uses cascading workflow
forms. When users choose Create - Special, they see these form choices:

Link Message

Phone Message

To create a cascading menu for Notes clients


1. Open the form.
2. Choose Design - Form Properties.
3. In the form name box, enter the name of the menu item you want to
appear at the top level, followed by a \ (backslash) and the form name.
To define an alias for a cascading form, insert the alias after the form
name, as in: Service Request\Hardware | HW, where HW is the alias.
4. Make sure the option Include in Menu: Create menu is checked.
To move a form to the Create - Other menu in the Notes client
If you dont expect a form to be used frequently, move it to the Create Other dialog box to shorten the list of forms in the main Create menu.
1. Open the form.
2. Choose Design - Form Properties.
3. Select Include in Menu and select Create - Other dialog.

Designing Forms 5-11

Building Applications

To specify the keyboard shortcut, type an underscore (_) before the letter
that you want to use. Each keyboard shortcut must still be unique within
the form list. For example, to force the letter v as the keyboard shortcut
for the Interview form, enter the name as:

To remove a form from the Create menu in the Notes client


Removing a form from the Create menu hides the form from all users.
For example, the Mail template hides the NonDelivery Report and
Return Receipt forms because only the Notes Mail Router uses them. For
compatibility with earlier releases of Notes, putting parentheses around
the form names when you name a form will also remove forms from the
Create menu.
1. In the Form Properties box deselect Include in Menu.
2. Save the form.
To hide a form from only some users, open the Security tab of the Form
Properties box and create an access list.
For more information on access lists, see the topic The database access
control list in the chapter Security in an application.
To hide a form
Another way to remove a form from the Create menu is to hide it. Hiding
allows you to specify conditions under which the form is hidden or
displayed. For example, you can hide a form from Notes clients, but
display it for Web clients.
1. Close the form you want to hide.
2. In the Design pane, click Forms in the Design pane.
3. From the forms list, select the form you want to hide.
4. Choose Design - Design Properties.
5. Click the Design tab.
6. Select a hide option.

Making a form available to Web browsers


Because users do not have access to the Notes menu structure in Web
applications, you must provide a mechanism for users to create and edit
documents. For example, you might design a view action for users to
create a document, and a button on the form to edit the document.
To make a form available to Web users
You must use this technique to allow Web users to create a document
from a form, but it also works in Notes applications.
1. Add a button, action, or hotspot to a form.
2. In the Programmers pane, choose the Click event and program the
event with a formula or script that creates a document from the form.
5-12 Application Development with Domino Designer

For example, this formula opens a new Main Topic document in the
current database:
@Command([Compose];"Main Topic")

Use this formula to compose a document in the current database:


@Command([Compose];"formname")

Use this formula to compose a document from another database:

Selected form properties


You can use the Form Properties box to set form attributes.
To open the Form Properties box
1. Open the form.
2. Choose Design - Form Properties.
Protecting author/editor anonymity
If you want a documents author or editors to remain anonymous, define
a form that doesnt record the names of people who create or edit it. For
complete anonymity, be sure that the author name does not appear
elsewhere on the document for example, in a visible computed field.
On the Form Info tab, select Anonymous Form.
Changing form focus
On the Form Info tab, you can choose:

No initial focus Lets you choose to have no initial focus on the


form.

No focus on F6 Lets you disable the F6 and SHIFT+F6 keys. These


keys usually give focus to a frame.

Handling replication conflicts


A replication-or-save conflict occurs when users in different locations
edit the same document. One version becomes the main document, and
the others become conflict documents that are marked with a diamond in
the view.

Designing Forms 5-13

Building Applications

@Command([Compose];"":"database";"formname")

At the Conflict Handling section of the Form Info tab, choose one of
the following options for the form:

Create Conflicts Creates conflicts so that a replication conflict


appears as a response document to the main document.

Merge Conflicts If a replication conflict occurs, saves the edits to


each field in a single document. However, if two users edit the same
field in the same document, Notes saves one document as a main
document and the other document as a response document marked
as a replication conflict.

Do Not Create Conflicts No merge occurs. Domino simply chooses


one document over another. The other document is lost.

For more information on replication conflicts, see Lotus Notes 6 Help.


Opening documents in edit mode automatically
For users convenience, you can specify that documents created with a
form automatically open in Edit mode.
On the Defaults tab, select On Open: Automatically enable Edit Mode.
Generating HTML for hidden fields
On the Defaults tab of the Form Properties box, select Generate HTML
for all fields to generate HTML information about hidden fields on a
form. This allows documents in a Web application to work like
documents in a Notes application. For example, if you create a form that
relies on a hidden field for a calculation, that form may not behave as
expected in a Web application in certain situations. By generating HTML
for the fields, the information is available for Domino to successfully
complete the calculation. The HTML generated for the hidden fields is
also accessible through JavaScript, so you can change the value or find
out the state of a hidden field with a script.
Selecting this option creates larger files on the Web and may decrease
application performance. Also consider security, since information in
hidden fields, though not visible in the browser, is visible through the
View Source menu item on the browser.
On the Defaults tab, in the On Web Access section, check the option
Generate HTML for all fields and deselect HTML in the Content type
section.

5-14 Application Development with Domino Designer

Using data sources on a form


If you have already created data connection resources in the database,
you can browse for data resources to use on the form.
1. On the Defaults tab of the Form Properties box, click the Browse
button in the Data Source Options section. A Browse External
Data Sources dialog box appears with a list of data connections
resources already created in the database.

Once the user starts to create fields on the form using an external data
resource, the default metadata object can be changed.
To define a header on a form
If you are designing a form for a Notes application, you can define a
header that does not scroll off the screen when the user scrolls down the
form or document created with that form. For example, in the Notes mail
template, a header displays all of the information contained in the mail
sender and recipient fields. This section remains static while you scroll
through a mail message. Headers can contain any element that a form
can contain. The only caveat is that a table cannot be the first element in a
header; it must be preceded by a text object, even if the text object is
blank.
1. Enter the text, graphics, tables, or other elements you want in the
header region of the form.
2. Move the cursor to the line below where you want the header to
start.
3. Choose Design - Form Properties.
4. On the Header tab select Add header to form to mark off the
header area.
5. Set the display properties for the header.
Height can be set in pixels or as a percentage of the form height.
You can choose Fit to content, which set the heights
automatically depending on the contents.
Select a scrolling option. Auto automatically turns scrolling on
when the content of the header exceeds the space allotted.
Allow resizing lets users reissue the header area. You can
choose this option only when the border width is greater than 0.

Designing Forms 5-15

Building Applications

2. Select a data connection resource and click OK. The resource


populates the Default data connection field on the Defaults tab of
the Form Properties box. The Default metadata object can be either
a backend database table, a view, or a procedure.

Border controls the display of the dividing line between the


header and the body of the form. You can change the thickness of
the line and the color of the border. You can turn the border off by
setting the width to 0. Select 3D shading to show the border
with a 3D effect.
To display a graphic in a header
To display a graphic in a header, add a background graphic to the form.
This becomes the background for the header only. Note that if you do
this, the remainder of the form is blank and cannot display another
background graphic.
If you want the user who creates a document to be able to add a graphic
to the body of the document when it is created, check Allow users to
change these properties at the Form Background tab of the Form
Properties box.

To create a print header and footer


You can define a header and footer that will print on all documents
created with that form. Headers and footers are not supported for Web
applications.
1. On the Printing tab, click Header and enter the text you want to
appear in the header text or click Footer and enter the text you want
to appear in the footer text.
2. Click one or more of the icons (located just below the text area) to
insert the following into the header or footer:
Page number (first icon on the left)
Date
Time
Tab
Title (last icon on the right)
3. (Optional) Assign a font, size, and style for header or footer text.
Header and footer alignment
Headers and footers have three preset, permanent tab stops: left, center,
and right. When you insert one tab, text to the left of the tab is left
justified, and text to its right is right justified. With two tabs, text to the
left of the first tab is left justified; text between the two tabs is centered;
and text to the right of the second tab is right justified. For example:
&D|&T|&P Left justifies the date, centers the time, and right justifies
the page number.

5-16 Application Development with Domino Designer

|URGENT| Centers the text URGENT.


||URGENT Right justifies the text URGENT.

Creating a response hierarchy

Document form The top level in a hierarchy of forms. It is often


called the Main topic form and can have zero or more response
forms associated with it. A form creates main (parent) documents
unless you designate it as a form that creates response documents.

Response form Creates response documents associated with a


main document. In a view, users select a main document and then
compose a response. The response documents appear under the
main document. Designers often create response documents that
inherit data from the main document for example, the topic title.

Response-to-response form Creates response documents


associated with either a main document or a response document.

For information on indenting a response document under its parent


document in a view, see the topic Indenting response documents in the
chapter Designing Views.

To create a response or response-to-response form


1. Open a form.
2. Choose Design - Form Properties.
3. On the Form Info tab, choose one of the following form types:
Select Response for the form used to create responses to main
documents.
Select Response to Response for the form used to create
responses to other responses.
To include a parent document in a new document
To make it easy for users to find a related document, a document can
include a parent or related document as a link, as collapsible rich text, or
as rich text. For example, a new response document can include a link to
its main document. A link takes up less disk space than a parent
document because Domino stores only a pointer to the document rather
than a copy of the document.

Designing Forms 5-17

Building Applications

If you are creating an application in which users can post responses to a


main document, and responses to the responses, you need to set up a
hierarchy between the forms. There are three types of forms you can
designate:

When inheritance is enabled, the user selects a document and then


chooses Create - <response/new form name>. The selected document
becomes the parent document. The documents do not need a main
document/response document relationship, because the selected
document is assumed to be the parent document. A user can suppress
inheritance by pressing CTRL while choosing Create.
1. Open the form.
2. Create a new rich text field to display the document or link.
3. Choose Design - Form Properties.
4. Click the Defaults tab.
5. Select On Create: Inherit entire selected document into rich text
field.
6. Select or enter the name of the rich text field you created in Step 2.
7. Select one of the following:
Link
Collapsible rich text
Rich text
8. (Optional) Select On Open: Show context pane and Parent.

Version tracking
Version tracking allows you to maintain a history of changes to a
document. In order to activate version tracking, you must designate the
form used to create documents as a version-tracking form.

To designate a form for version tracking


1. Open the form.
2. Choose Design - Form Properties.

5-18 Application Development with Domino Designer

3. On the Form Info tab, select None of one of the following versioning
methods, as follows:
Description

New versions
become
responses

Use this when the original document is the most


important. The original document is listed first in the
view; all successive versions follow. Choose this method if
the original document is the focal point of the view, with
responses being used for reference.
When new versions become responses, you can prevent
replication or save conflicts in the view. If users on
different servers modify and save the main document,
their versions are treated as two separate response
documents when the databases replicate. The two
responses are displayed in the view in chronological
order.

Prior versions
become
responses

Use this method when the new version is the most


important. The latest version is listed first in the view;
previous versions and the original follow. Use this method
if the update is the most important or most frequently read
document and you want to store older versions as a
backup or for historical reference.
When prior versions become responses, you cant prevent
replication or save conflicts. If users on different servers
modify and save the main document, the two new
versions of the document appear as conflicting main
documents when the databases replicate.

New versions
become
siblings

Use this method when all versions have equal importance.


The original document is listed first in the view; all
successive version follow as additional main documents
without introducing the risk of replication or save
conflicts.
This method is also useful when revisions arent based on
a historical or subordinate model for example, in a form
where workgroup members create their own replacement
versions of an original document or where the original
document is used as a template for each new document.
This method is most effective when you dont expect every
main document to be revised, since it is hard to find
updates in a view where many new documents have been
created in the updating process. To distinguish a revised
document from the original document, add identifying
information, such as New Proposal or Revised to the
field that displays in the view.

Designing Forms 5-19

Building Applications

Versioning
method

4. Then select one of the following Create versions choices:


Create versions choices

Description

Manual - File, New Version Manually creates a new version of the


document only when the user chooses File Save As New Version. This option allows the
user to choose when to create a new version
and when to overwrite the existing
document.
Automatic - File, Save

Automatically creates a new version of a


document each time the user saves a
document.

Make sure users know that version tracking is active, so that they
understand the impact of editing documents. Explain version tracking in
the Using Database document.
If there is a response hierarchy set up in the database, responses to
version-controlled documents display as responses to the original
document only.

Customizing a form's window title


The window title is the text that appears in the title bar when you
compose, read, or edit a document. By default, the word Untitled
appears in the title bar. To help users understand the context of the
document theyre reading, create a descriptive window title.
A window title can be static that is, it always displays the same
message or dynamic that is, it displays a message that changes
based on a formula you create. An example of a dynamic window title is
a title for a main document in a discussion database that includes the
number of responses to the document. The title changes each time a new
response gets created.
To create a window title, write a formula that supplies the text to display.
The text can be a text string you enter directly, text that results from a
function, or the contents of any field type except rich text or rich text lite.
If the field does not contain text or if a function does not return text, you
must convert the value to text using the @Text function. For example, the
following formula converts the date value in the DateCreated field to a
text value for display in the window title:
"Response created on " + @Text(DateCreated);

5-20 Application Development with Domino Designer

To customize a form's window title


1. Open the form.
2. On the Object tab in the Programmers pane, select Window Title attribute.
3. Enter text enclosed in quotation marks or a formula that evaluates to
text.
5. To test the window title, create, save, and read a new document.
Make sure the title is appropriate for all three situations.
For more information on creating window title formulas, see the Domino
Designer Programming Guide.
Examples: Customizing window titles
Title includes creation date and company name
This formula displays the date the document was created, form name,
and company that was billed. @Text converts the date to a text string,
and the extra spaces within the quotation marks force the words in the
title to be properly spaced.
@Text(@created) + " Inventory Invoice for " + CompanyName

This formula uses the field form to refer to the form name instead of
hard coding it into the formula.
@Text(@created) + " " + form + " for " + Company Name

Title includes number of responses


This formula is useful for a main document form in a discussion
database.
@If(@IsNewDoc;"New Topic";Subject +
@DocDescendants(" (No Responses)";" (1 Response)";" (%
Responses)));

If the document has never been saved, New Topic shows in the title bar
while the user composes the document. After the document is saved, the
title is the subject combined with the number of responses. If the subject
is Icebox 2000 and there are no responses, the title of the document is
Icebox 2000 (No Responses). With one response, the title becomes Icebox
2000 (1 Response). With two responses, the title becomes Icebox 2000 (2
Responses).

Designing Forms 5-21

Building Applications

4. Click the green check mark to save the formula.

Response includes the subject


When the response or response-to-response is first composed, this
formula displays New Response To and the subject of the main document.
@If(@IsNewDoc;"New Response to " + Subject;
"Response " + @DocNumber("") + " of " + @DocSiblings + " to
" + Subject);

When a user reads the response, the window title displays the total
number of responses to the main document, the response being
displayed, and the subject of the main document. For example, if the
response document is the second of four responses to Icebox 2000, the
title displays as Response 2 of 4 to Icebox 2000.

Using subforms
A subform is a collection of form elements that are stored as a single
object. Subforms can contain the same elements as regular forms.
Subforms save redesign time. When you change a field on a subform,
every form that uses the subform updates. Common uses of subforms
include adding a company logo to business documents or adding mailing
label information to mail and memo forms. A subform can be a
permanent part of a form or can appear conditionally, depending on the
result of a formula. For example, you might offer users a choice of
custom mail forms with different graphics and styles for various types of
mail messages, such as memos, alerts, or letters. Note that field names
used in the subform cant be used elsewhere on the form. Changes you
make to a subform affect all forms and documents that use the subform.

To creating a subform
You can copy and modify a subform that is similar to the one you need
or create a new subform and design it yourself.
1. Open the database that will have the new subform and click Shared
Code - Subforms.
2. Click New Subform.
3. Create the subform using the same elements you use to create a form.
4. Choose Design - Subform Properties. The Subform Properties box
appears.
5. At the Subform Info tab, enter a name for the new subform.
6. Optionally, you can enter a comment.

5-22 Application Development with Domino Designer

7. Choose from the following options for displaying the subform:


Use

Include in Insert Subform


dialog

Lets designers see the subform name when


inserting a subform. Excluding a subform
from the Insert Subform dialog box is not a
security measure. Users with Designer
access or higher can open any subform in
Designer and copy individual components.
Note that this field does not apply to
computed subforms.

Include in New Form dialog

Check this if you want the subform to


appear immediately when designers
choose Create - Design - Form. Note that
this field does not apply to computed
subforms.

Render pass through HTML in Lets you paste HTML directly into the
subform. For more information on pasting
Notes
in HTML, see the topic Using HTML on a
page or form in the Designing Pages
chapter.
Do not add field names to
field index

Check this setting to prevent new field


names on the subform from being saved in
the field index. Checking this setting saves
memory.
If you do not check this setting, field
names are saved to a table and then stored
in memory. Storing field names in memory
allows field names to appear in places
such as the Add Action dialog box.

8. Close and save the subform.

To insert a subform on a form


1. Open a form.
2. Place the cursor where you want to paste the subform.
3. Choose Create - Resource - Insert Subform. The Insert Subform
dialog box appears.
4. Select the subform you want and click OK. You can also insert
subforms contained in other databases by selecting a database listed
in the Database pull-down list.

Designing Forms 5-23

Building Applications

Subform property

To display a computed subform on a form


1. Open a form.
2. Place the cursor where you want to paste the subform.
3. Choose Create - Resource - Insert Subform.
4. Select Insert Subform based on formula.
5. Click OK.
6. Enter a formula in the Programmers pane that determines which
subform to display.
7. Close, name, and save the form.
Example of displaying a computed subform
In the Main Topic form of a discussion database, you want to display the
NewDocSubform when a document is created and the
SavedDocSubform when a saved document is opened. Each subform
contains different fields and graphics. The Insert Subform formula is:
@If(@IsNewDoc;"NewDocSubform";"SavedDocSubform");

Note Subform formulas cannot be refreshed while the document is


open.

Deleting subforms
When a user opens a document that references a deleted subform, the
message Subform: <subform name> not loaded appears on the status
bar. The document opens without any representation of the deleted
subform. When a designer opens a form that references a deleted
subform, the message Subform: <subform name> not loaded appears
on the status bar. When a designer clicks the deleted subform area on the
form, the message Invalid or nonexistent document appears and the
designer cant open the subform.
To avoid these messages, add another subform to the database and give
it the same name as the deleted one.
To delete a subform from a form
You can remove a subform from an individual form, without disturbing
other forms that use it.
1. Click the subform area on a form.
2. Choose Edit - Delete.
3. Adjust the formatting if necessary.

5-24 Application Development with Domino Designer

To delete a subform from a database


You can remove all instances of a subform from a database. Be aware
that this will cause errors in any form that refers to the subform.
1. Click Subforms in the design list for the database.
2. Choose Edit - Delete.

A layout region is a fixed-length design area on a form or subform. The


advantage of using layout regions is that related elements can be
dragged and moved easily and can be displayed in ways not possible on
regular forms and subforms. A layout region can contain static text,
graphics, buttons, and all fields except rich text fields. You can hide or
collapse a layout region and all its components under certain conditions.
Layout regions are not supported in Web applications.
A layout region can contain:

Text

Background graphics

Fields (except for the following fields: color, dialog list, formula,
password, rich text, rich text lite, and time zone)

Buttons

Button graphics

You should not add the following elements to a layout region:

Animated GIF files

Attachments

Computed text

Embedded elements

Horizontal rules

Hotspots

Image resources

Inserted resources

Java applets

Layers

Links

Objects
Designing Forms 5-25

Building Applications

Layout regions

OLE objects

Page breaks

Pop-ups

Sections

Shared actions

Shared fields

Subforms

Tables

You can hide or collapse a layout region and all its components under
certain conditions. For example, you can hide a layout region when Web
users view the application, or when users edit the form.

Creating a layout region


To create a layout region
1. Open the form.
2. Move the cursor to the location in the form where you want to place
the layout region.
3. Choose Create - Layout Region - New Layout Region.
To delete a layout region
1. Click the layout region and choose Edit - Delete.
2. Adjust the formatting if necessary.

Aligning and rearranging elements in a layout region


1. Open a form.
2. Click the layout region and choose Design - Layout Properties.
3. On the Layout Info tab, click Show grid to see the current spacing
between elements.
4. Do one or more of the following to align and rearrange elements:
Click Snap to grid to align all elements with the grid.
Change the grid size if you want a narrower or wider
arrangement of elements.
Click and drag an element to move it to a new location within the
layout region.

5-26 Application Development with Domino Designer

Click an element and choose Design - Send to Back to move it


behind all other elements. Choose Design - Send Back One to
move the element behind one other element.
Click an element and choose Design - Bring to Front to move the
element on top of all other others. Choose Design - Bring Forward
One to move the element on top of one other element.

You can adjust the size, position, and look of a layout region.
1. Open a form.
2. Click the layout region and choose Design - Layout Properties.
3. Select a different Left setting to move the layout region horizontally.
Elements within the layout region stay in a fixed position, relative to
the borders of the layout region.
4. Select a different Width or Height setting to size the layout region
perimeter.
5. Check Show border to make the layout region borders visible. To
make the borders invisible, uncheck this field.
6. Check 3D style to show the layout region in gray and to show
fields and buttons as they look in dialog boxes.
7. Check Wrap text around region to have text in the form wrap
around the layout region. The default is to have text appear above
the layout region.
8. Click Show grid to see the current spacing between elements.
9. (Optional) Do one or more of the following to align and rearrange
elements:
Click Snap to grid to align all elements with the grid.
Change the grid size if you want a narrower or wider
arrangement of elements.

Adding graphics to a layout region


1. Click on the layout region to select it.
2. Choose Create - Picture and select the graphic file.
3. Select either Graphic or Graphic Button. The graphic file is pasted
into the center of the layout region. You can move the graphic by
dragging and dropping.
4. To change the left and top position of the graphic, select the graphic
and choose Design - Object Properties. The Control Properties box
appears.
Designing Forms 5-27

Building Applications

Changing the size and style of a layout region

5. (Optional) Click the Hide tab of the Control Properties box to adjust
the hide properties.
6. (Optional) Choose Design - Send to Back to position the graphic
behind other elements.

Adding graphic buttons to a layout region


A graphic button adds a hotspot to a layout region.
1. Copy a graphic to the clipboard.
2. Click on the layout region to select it.
3. Choose Create - Layout Region - Graphic Button.
4. The graphic file is pasted into the center of the layout region. You can
move the graphic by dragging and dropping.
5. From the Objects tab on the Info List in the Programmers pane,
select Hotspot - Click.
6. In the Script area of the Programmers pane, enter a formula for what
you want the hotspot to do.
7. To change the left and top position of the graphic, select the graphic
and choose Design - Object Properties. The Control Properties box
appears.
8. (Optional) Click the Hide tab of the Control Properties box to adjust
the hide properties.
9. (Optional) Choose Design - Send to Back to position the graphic
behind other elements.

Embedded controls
There are three types of embedded controls that can only be used on a
form:

The embedded file upload control Allows you to create a form so


that Web users can attach files to documents

The embedded scheduler Allows you to create a form that


displays the schedules of specified users

The embedded editor Allows you to embed one or more forms


into an existing form and can also allow you to link an embedded
editor to an embedded view.

5-28 Application Development with Domino Designer

Creating an embedded file upload control

1. Open the form in which you want to add the file upload control.
2. Move the cursor where you want the upload control to appear.
3. Choose Create - Embedded Element - File Upload Control.
4. Select the control and right-click to open the File Upload Control
Properties box.
5. On the Hide tab select Hide paragraph from Notes R4.6 or later.

Creating an embedded scheduler


The embedded scheduler allows you to design a form or subform that
displays the schedules of users. For example, you can create a form for
users to schedule department meetings. Embedding a scheduler on the
form lets users check everyones schedules before planning the meeting
time. Also, within the embedded scheduler users can click on a persons
name to open that persons calendar view (provided the user has been
given access in the persons mail preferences). You can program the
calendar to open in a separate frame, or in its own window. For an
example of an embedded scheduler form, see the Group Calendar form
in the Mail template.
There are four parts to using an embedded scheduler:

Create an embedded scheduler on a form or subform (Create Embedded Element - Scheduler).

Create the fields that collect the data needed to display the
embedded scheduler.

Program the embedded scheduler to retrieve the data from the fields.

Set properties for the embedded scheduler.

To create an embedded scheduler on a form or subform


You can embed one or more embedded schedulers on a form or subform.
1. Open or create a form or subform for the embedded scheduler.
2. Move the cursor where you want the embedded scheduler to appear.
3. Choose Create - Embedded Element - Scheduler.
Designing Forms 5-29

Building Applications

To allow Web users to attach files to documents, include a file upload


control on a form. When Web users create a form or open a document in
Edit mode, they can attach a file by typing the path and file name or by
clicking Browse and selecting a file from the filing system. In addition,
the server administrator must define a temp directory on the server or
the attachment will not saved with the document. The file upload control
is not supported in Notes.

Note The embedded scheduler does not display scheduling information


while you are designing the form or subform.
To create fields for the embedded scheduler
The embedded scheduler needs three pieces of information before it can
display anyones schedule.

Whose schedule to display (individuals or group).

What week to start the schedule information from.

How many hours per day of schedule information to display.

One way to collect this data is to create editable fields on the form and
have users enter in those fields the information they want displayed. You
can also use LotusScript or the Formula language to create the field
items. For an example of collecting the data using an action button and
Formula language, look at the GroupScheduler form in the Mail
Template.
Once you have created the fields or other method for collecting the data,
you must associate those fields with the Embedded Scheduler attributes,
as described in the following section.
To program the embedded scheduler
Once you have created the fields for collecting the data, you must
program the embedded scheduler so that it can retrieve the data from the
fields. You can program the embedded scheduler using the following
attributes.
To associate the fields with the attributes:
1. Select the attribute from Objects tab of the Info List and
2. Enter a field name in quotation marks in the Script area of the
Programmers Pane.
Attribute

Description

Required people
items

A formula that evaluates to a text list of one or more


item names. At runtime, the scheduler displays the set
of required people.
If you are writing a LotusScript formula to obtain the
data for this attribute, the formula must evaluate to a
text list of one or more field names.

Optional people
items

A formula that evaluates to a text list of one or more


item names. At runtime, the scheduler displays the set
of optional people.
continued

5-30 Application Development with Domino Designer

Attribute

Description

Rooms items

A formula that evaluates to a text list of one or more


item names. At runtime, the scheduler displays the set
of rooms.

Resources items

A formula that evaluates to a text list of one or more


item names. At runtime, the scheduler displays the set
of resource rooms.

Interval end time

A formula that evaluates to an item name. At runtime,


the time/date value contained in this item indicates the
end date/time of the meeting.

Grid Start time

A formula that evaluates to an item name. If this


attribute is not specified, the schedulers busy time grid
begins on the current time and date. If the event is
specified, the time/date value contained in this item is
examined.
If the time portion of the time/date value is set to
ALLDAY, the busy time grid uses the specified date
and the current time. If the date portion of the
time/date value is set to ANYDAY, the busy time grid
uses the current date and the specified time.
The value of this field should be a date and time. If the
value is not a date and time, the current date and time
of the users system is the default. If the value is a date
only, that date and the current time on the users
system are the default. If the value is a time only, that
time and the current date on the users system are the
default.
When a user accesses the form, the scheduling
information starts from the specified date. The user can
change which week is displayed by clicking on the left
and right arrow keys. Each day will begin at the
specified time. The time is rounded down to the
nearest hour.
Note that the schedules are displayed in terms of the
users local time zone for example, a Pacific time
zone user free between 9 and 5 PST will appear free
between 12 and 8 to an EST user.
continued

Designing Forms 5-31

Building Applications

Interval start time A formula that evaluates to an item name. At runtime,


the time/date value contained in this item indicates the
start date/time of the meeting.

Attribute

Description

Display hours per A formula that evaluates to an item name. At runtime,


the number value contained in this item indicates the
day
number of hours that the busy time grid displays for
each day.
This attribute is examined to determine how many
hours of each persons schedule to display. The value
of this field should be an integer between 1 and 24,
inclusive. A value less than 1 will be defaulted to 1 and
a value greater than 24 will be defaulted to 12.
Schedule Detail
items

A formula that evaluates to a text list of one or more


item names. When the scheduler retrieves scheduling
data, detailed data is requested for these items.

Displaying a legend
You can create a reserved field on the form that contains the embedded
scheduler to allow users to turn the legend off or on. The reserved field
name is $GroupScheduleShowLegend. Valid values are 0 (to turn the
legend off), and 1 (to display the legend).
To set properties for the embedded scheduler
1. Open the Embedded Scheduler Properties box.
2. At the Info tab, you can set any of the following properties for the
embedded:

Name Name of the scheduling element. This is the name used to


obtain a LotusScript object for this scheduler control.

Target frame specify the frame in which to display the group


members calendar views and appointment documents.

Show interval indicator Indicates whether or not to display the


appointment indicator (the appointment indicator is one you can
drag).

Show color legend Checking this displays the busy time color
legend.

Show twisties Checking this displays twistie icons for required


and optional people, allowing the user to collapse and expand the
required and optional list of people.

Initialize from item values Checking this causes the scheduler


control initially to determine which participants to display based on
the values of the items previously specified (see the preceding
attributes table ). You may want to uncheck this field for R5
backward compatibility with group calendars.

5-32 Application Development with Domino Designer

Refresh from item values Checking this causes the scheduler


control to refresh data from the values of the items previously
specified. When a DocRecalc event occurs and this attribute is
checked, the scheduler control discards any participant data it has
and generates a new list of participants from the values of the items
on the form. It also updates the meeting start and end times as well
as the hours to display and the display start time. Because problems
may occur when the NotesUIScheduler object has been used to add
or remove participants, you may want to disable this field if a call to
AddAttendee or RemoveAttendee is made through the
NotesUIScheduler object.

Allow sorting Checking this field turns on the sorting button that
is displayed above the attendee names.

Top, Middle, and Bottom titles Lets you specify titles for the top,
middle, and bottom of the embedded scheduler. You can click the
formula symbol for each title and enter a formula that evaluates to a
title.

3. At the Colors tab of the Embedded Scheduler Properties box, you can
customize various foreground and background colors.
4. At the Layout tab of the Embedded Scheduler Properties box, you
can set the width and height properties for the embedded scheduler.

Creating an embedded editor


You can embed an editor into a form. One use of the embedded editor is
to let you embed one or more forms into an existing form. Another use of
the embedded editor is targeting in which you link an embedded editor
to an embedded view. Targeting allows the user to edit documents in a
view without having to open separate windows.
You can do almost everything in an embedded editor that you can do in
a document. However, you cannot include the following in an embedded
editor: buttons, action hotspots, formula popup hotspots, computed text,
or navigators. Note also that you should not use embedded editors in
animated tables.
To create an embedded editor
1. Create a form or open an existing form.
2. In the form, place the cursor where you want to create the embedded
editor.
3. Choose Create - Embedded Element - Editor. The Insert Embedded
Form dialog box appears.

Designing Forms 5-33

Building Applications

4. Choose one of the following options:


None
This is the first choice under Choose a form. Choose None if you
want to paste a document or anchor link into the embedded editor
or if you want to use targeting by linking an embedded editor to
an embedded view.
An existing form from the list of forms
The list of forms in the current database appears under Choose a
form. To insert an existing form into the embedded editor,
choose one of the forms.
To insert a form from another database, select a database from the
pull-down list of databases and then choose a form listed under
Choose a form.
Insert form based on formula
To insert a form based on a formula, check Insert form based on
formula.
5. Choose Element - Editor Properties to open the Embedded Editor
Properties box. Click the Info tab, and then set any of the following
properties:
Name - enter a name for the embedded editor. Entering a name is
necessary only if you are targeting to an embedded view.
Size - enter a size in inches for the width and height of the
embedded editor. Alternately, you can check Fit to window for
the width and for the height.
Type and Value - these fields are automatically filled out,
depending on how the editor is created. The following values may
appear:
- Link
Link appears in the Type field if you selected None in the Insert
Embedded Form dialog box. The field next to the Type field and
the Value field are both left blank.
Link requires that you paste a link that youve already copied to
the Clipboard. Click the Paste icon to paste in this link. Note that
you can paste only an anchor or a document link. You cannot
paste a view or a database link.
- Named Element
Named Element appears if you selected an existing form in the
Insert Embedded Form dialog box. The field next to Named

5-34 Application Development with Domino Designer

Element displays as Form. The Value field contains the name of


the form you chose in the Insert Embedded Form dialog box.
Hide action bar - selecting this causes the action bar of the form
you inserted to be hidden. If it is unchecked, the action bar is
displayed.

To use an embedded editor for targeting


You can place one of more embedded views on a form and then link
them to one or more embedded editors. This feature, called targeting,
allows users to edit documents in a view without having to open
separate windows.
1. Create a new form.
2. Choose Create - Embedded Element - Editor.
3. Select None in the Insert Embedded Form dialog box and click OK.
4. Choose Element - Editor Properties. The Embedded Editor Properties
box opens.
5. Specify a name for the embedded editor and close the properties box.
6. Choose Create - Embedded Element - View. The Insert Embedded
View properties box appears.
7. Choose a view and click OK.
8. Choose Element - View Properties. The Embedded View Properties
box opens.
9. In the "Target Frame" (for single click) field, enter the name of the
embedded editor that you want to link to. Close the properties box.
10. Save and close the new form.
11. Create a new document with the form.
12. Highlight a document in the embedded view. The document opens
in the embedded editor. You can now edit that document in the
embedded editor. You can then switch to another document in the
embedded view and continue editing.

Designing Forms 5-35

Building Applications

Disable scroll bars - selecting this hides scroll bars. If it is


deselected, the embedded editor shows scroll bars when all of its
content does not fit on the screen.

Profile forms
Profile forms are useful for collecting user-specific or database-specific
values. These values are stored in Profile documents. What sets profile
documents from other documents is the way profile documents are
displayed and the values in the fields passed back. Only one profile
document per form can exist for each user of a database. Or, only one
profile document can exist for a database if that form is available to all
users.
Profile documents allow for quick data retrieval, because they are cached
while the database that stores them is open. Profile documents are like
other database documents except they are somewhat invisible they do
not display in views and are not included in a document count for the
database. Users create profile documents by using an action button or
agent you design that uses LotusScript or the formula language.
A database can have a single profile document or multiple profile
documents that match a key you specify for example, an @username
key that creates one profile document for each user of a database, or a
key that specifies a different profile document for each day of the week.
Whether you use one profile document for a database or use multiple
profile documents depends on your design needs. Use a single profile
document to contain settings that all documents in the database need,
such as environment variables. Use multiple profile documents for more
customizable settings, such as user preferences. A user must have at least
Author access in the ACL of a database to create a profile document that
is available to all users.
You can use any form to create a profile document. After creating the
form, you create a button, action, or agent for the application that uses
either @CommandEditProfile in a formula or UIWorkspace.EditProfile or
NotesDatabase GetProfileDocument in a LotusScript program to create
or retrieve a document. In each case, Notes looks for a profile document
with the form name you specify, and creates a profile document if one
does not already exist. For an example of a profile document, see the
Interest Profile form in the Discussion - Notes & Web template.
For more information about accessing or editing a profile document
using Formula language or LotusScript, see the Domino Designer
Programming Guide.

5-36 Application Development with Domino Designer

Creating a profile form


1. Create a form with fields to hold the values you want to store in
profile documents.
2. Choose Design - Form Properties and deselect "Include in Menu."
3. Save the form.
4. Do not include the form in any view.

See the Domino Designer Programming Guide for more information about
Formula language and LotusScript.
In Notes, you can create or edit a profile document by using
@Command([EditProfileDocument]) or @SetProfileField. In Web
applications, use @SetProfileField to create profile documents. Note that
@Command([EditProfileDocument]) does not work on the Web.
You can use @SetProfileField and @GetProfileField to set and retrieve
field values in profile documents in both Notes and Web applications.
If you prefer scripts to formulas, use LotusScript routines to create and
edit profile documents. The EditProfile method of the
NotesUIWorkspace class produces the same result as the
@Command([EditProfileDocument]) command used in a formula.
To set or retrieve field values for a profile document with a script, use the
GetProfileDocument method to access the document. You can then
retrieve values from the document or set new ones, just as you would
with any document.
Use the IsProfile property for the NotesDocument class to determine if a
NotesDocument object is a profile document. Use the NameOfProfile
property to retrieve the name of the profile document.
Note You cannot delete a profile document using an @command or
@function. Use LotusScript if you must delete a profile document.

Designing Forms 5-37

Building Applications

5. Create a button, action, or agent that uses either the LotusScript


NotesDatabase GetProfileDocument method or
UIWorkspace.EditProfile, or the Formula language
@Command([EditProfileDocument]) to create or access the
document.

Forms that prompt users for input


You can create forms that prompt users for input. For example, you can
create a form that mimics the behavior of a dialog box. Use this kind of
form to collect user input to populate fields in a host form.

Designing a form that presents a dialog box


To help users to fill out documents, create a custom dialog box that
prompts for specific input. You can do this by using the @DialogBox
function or LotusScript. Using @DialogBox requires two forms: one, the
dialog form, has a layout region that contains fields, text, and graphics,
and looks like a dialog box; the other, the host form, contains a button
that uses @DialogBox to display the dialog form. The two forms contain
shared fields, and when users enter field values in the dialog form, the
values are shared with fields on the host form that have the same names.
For example, a host form called "Memo" has a button that uses
@DialogBox to bring up the dialog form called "Memo Options." Both
forms have a field called "Comments." Text entered into the Comments
field in the Memo Options form also appears in the Comments field in
the Memo document.
When you use @DialogBox, all values entered in the dialog box are
stored in the document created with the host form and can be seen in its
Document Properties box even if the fields do not appear on the host
form. If the keyword [NoNewFields] is used with the @DialogBox
function, the fields that are on both the host form and the dialog form
will be updated when the dialog form is saved or refreshed. If
[NoFieldUpdate] is used, no fields or field values from the dialog box
form will be updated on the host form.
Layout regions are supported in Notes applications only.
1. Open or create the dialog form.
2. Choose Create - Layout Region - New Layout Region.
3. Resize the layout region to fit the dialog box you want to create.
4. Choose Design - Layout Properties.
5. Deselect "Show border" and select "3D style."
6. Click the layout region and then create the graphics, text, and fields
for the dialog box.
7. Close and save the form.
8. Double-click the host form that will display the @DialogBox button.
9. Place the cursor where you want to add the button, and choose
Create - Hotspot - Button.
5-38 Application Development with Domino Designer

10. On the Display tab, add a label and width for the button.
11. In the Programmers pane, click Formula, and write a formula using
@DialogBox. Include the name of the dialog form.
For information on using @Dialogbox, see the Domino Designer
Programming Guide.

For the dialog form, use a layout region with the 3D property
selected.
Although you can design the dialog form in any way, a 3D layout
region most closely resembles a dialog box. A layout region that is 3
inches square is big enough to display a few fields and two or three
buttons.

In the @DialogBox formula, include the [AutoVertFit] and


[AutoHorzFit] options to size the dialog box to fit the layout region.

Use 9 point Helvetica for static text, fields, and buttons.

Place static text labels above or to the left of fields and end them with
a colon (for example, Name:).

Place buttons at the bottom of forms.


OK and Cancel buttons appear automatically to the right of the
layout region. If you do not want the cancel button to appear, use the
@DialogBox keyword [NoCancel]. If you do not want the OK or the
Cancel button to appear use [NoOkCancel].

To arrange choices horizontally, use the multi-column display option


with radio button and check box field; use None for the frame option
so choices blend with the dialog box background.

For button text with multiple words, use initial capital letters. Use
ellipses for buttons that lead to another dialog box or task for
example, "Show Details"

Designing Forms 5-39

Building Applications

Guidelines for designing a form that presents a dialog box


To match the Notes user interface as closely as possible, follow these
guidelines:

Designing a form that prompts users for information


You can design a form that uses @Prompt to request information from
users to help them fill out a document. This function is similar to
@DialogBox, but it is simpler: @Prompt contains only text and doesnt
interact with any other forms.
1. Create a form.
2. Create a button, hotspot, or action that will store the @Prompt
formula.
3. Click the button, hotspot, or action.
4. In the Objects tab on the Info list in the Programmers pane, select the
Click method for the button, hotspot, or action.
5. In the Script area of the Programmers pane, enter an @Prompt
formula.
6. Save and close the form.
For more information on @Prompt, see the Domino Designer Programming
Guide.
Examples: Using @Prompt
[YesNoCancel]
This formula displays a warning before a memo is sent, giving users a
chance to select Yes, No, or Cancel.
Result := @Prompt([YesNoCancel]; "Send memo?"; "This memo
will be sent to everyone listed in the To, CC, and BCC
fields." );

[OkCancelEdit]
This formula fills the Name field with the users response to the prompt.
The default value is the users Notes name. If the user selects Cancel,
Notes cancels the formula evaluation.
FIELD Name := @Prompt([OkCancelEdit]; "Enter Your Name";
"Type your name in the box below."; @UserName);

[OkCancelList]
This formula captures the users response in a temporary variable called
ComposeType and uses it to create a new report using the appropriate
form.
ComposeType := @Prompt([OKCancelList]; "Report Type";
"Choose a report type."; "Adjustment Report";"Adjustment
Report":"Infant Progress Report":"Toddler Progress
Report":"Preschool Progress Report":"Transition to
Kindergarten Report");
@Do(@Command([Compose]; ""; ComposeType));
5-40 Application Development with Domino Designer

Designing a form that lets users make selections from a view


You can design a form that uses @PickList to display a list of choices
from a view.
1. Create a form.
2. Create a button, hotspot, or action to store the @PickList formula.

4. In the Objects tab on the Info list in the Programmers pane, select the
Click method for the button, hotspot, or action.
5. In the Script area of the Programmers pane, make sure you have
selected Run - Client - Formula.
6. Write a formula using @PickList and the [Custom] parameter, unless
you want to use [Name] to display a Domino directory or personal
name and address book.
7. Close and save the form.
Using @PickList
The @PickList function looks up the values in a view as @DbColumn
does, but lets the user pick a value from one document. This function is
similar to using @Prompt in a form, but is specifically for use with views.
@Picklist offers the following advantages over formulas that use
@DbColumn or @DbLookup.

It is not limited to 64K of data.

It is faster than @DbColumn or @DbLookup.

It allows users to type the first few characters of an entry to find it


quickly in the view.

For more information on the @Picklist function, see the Domino Designer
Programming Guide.
Example
This formula displays the Products view of PROD.NSF in a dialog box:
choice:=@PickList([Custom] ; "":"prod.nsf" ; "Products" ;
"Select a product" ; "Please select the products you want to
order" ; 1 );

Designing a form for a Domino billing application


Domino billing is a server function that tracks server usage. Domino
billing tracks only the documents that you specify. To specify the
Designing Forms 5-41

Building Applications

3. For an action, choose View - Action Pane and then click the action.
For button or hotspot, click the form and then click the button or
hotspot.

documents to track, you must add one or both of the following hidden
fields to the form that creates the documents.
Use this field

To create a billing record when users

$ChargeRead

Open a document that contains this field

$ChargeWrite

Create, copy, edit, or save a document that contains this field

To specify which documents to track


1. On the form that you want to track, create a field named
$ChargeRead, $ChargeWrite, or create one of each.
2. Set the field type to Number.
3. Select Currency.
4. On the Hide tab, hide the field for all options.
5. Assign a cost value to the field.
When users read from or write to documents that contains these
fields, the billing task retrieves the cost value in the fields and places
it in a document billing record.
6. Save the form.
Note If there are many documents you want to track, you can create a
shared field and add it to multiple forms. If a database is updated by a
template, you can modify the template to include the hidden fields.
For more information on billing, see the Administering the Domino System.

Designing a form for contact printing


Contact printing is a type of printing in which users choose a form and a
paper sectioning scheme to print multiple documents. For example, you
can print multiple names and addresses (listings) and choose options for
creating sections (such as twenty labels on a page). To make contact
printing in an application available to users, the designer must create and
enable a form for contact printing.
To create and enable a form for contact printing:
1. Create a form in Designer and define the layout and content of the
form.
2. Choose Design - Form Properties.
3. At the Form Info tab, name the form and then check "Include in
Print" to enable the form for contact printing. It is recommended that
you do not check other Display options.
Note Checking "Include in Print" is the only way to enable a form
for contact printing.
5-42 Application Development with Domino Designer

4. Close the Form Properties dialog box.


5. Create all the reserved fields listed in the table that follows these
steps. Although you can place the fields anywhere on the form, they
are typically placed at the bottom of the form to separate them from
the main body of the form.
You can also create a subform containing some or all of the reserved
fields and then insert the subform into one or more forms.

6. For each of the reserved fields:


At the Field Info tab:
Next to Name, enter the reserved field name.
Next to Type, select "Text" and then "Computed."
Check "Allow multiple values." Leave the next two settings
unchecked.
At the Hide When tab:
Check "Printed" in the "Hide paragraph when document is"
section.
7. Close the Field Properties dialog box.

Designing Forms 5-43

Building Applications

All of the contact printing reserved fields are required. They must
also have the same number of entries in each, except for
$SectDataOptions. If there is one entry, then the form has one
sectioning type (for example 20 labels to a page) available to it. If two
entries, then the form has two sectioning types (for example 20 or 30
labels to a page).

8. For each of the reserved fields, go to the Objects pane of the


Programmers pane, find the name of the field you just created, and
select Value. Then, click in the Script area and enter the appropriate
value. Enclosed the value in quotes. See the following table for
information on the values you can enter for each reserved field.
Reserved Fields for Print Listings
Reserved field name

Description and values

$SectDataName

Enter a name for the sectioning type and


enclose it in quotes (for example, 2 x 7
Labels, 1-1/3 x 4 in). The name you enter as
the value is the name shown for the
sectioning type (or Paper type) on the
Documents Style tab of the Print view
dialog box in Lotus 6 Notes. This name also
appears in form error messages.
The sectioning type can have multiple entries,
but they must be separated by a colon (for
example, 2 x 10 Labels, 1 x 4 in : 3 x 10
Labels, 1 x 2-5/8 in). If the sectioning type
has multiple entries, other contact printing
reserved field (except for $SectDataOptions)
must have the same number of entries.

$SectDataOptions

Choose options for printing the listings or


leave the value blank by specifying double
quotes with no characters between them ().
Separate multiple options with spaces (for
example, Debug Inches). Note that, for this
field only, you do not have to match the
number of entries with the number in other
print listings reserved fields.
Only the following options are valid:
Fullsheet Sectioning is turned off and the
whole sheet of paper is taken to be the
section. The form still determines the content
and layout of the listing produced for each
document. This option is useful for print
merges. Usually, print headers, print footers,
and page settings are ignored in print listings;
however, the Fullsheet option prints normal
print headers, print footers, and page settings.
If you specify the Fullsheet option, the next
four reserved fields are ignored.
continued

5-44 Application Development with Domino Designer

Reserved Fields for Print Listings


Description and values

$SectDataOptions
(continued)

Debug Causes a rectangle to be drawn


around the perimeter of each printed section
and around the inner margin of each printed
section. You can use this option to debug the
data for a sectioning type because you can see
on the printed paper where each section prints
and where the inner margin of each section lies.
This option also lets you preview the labels.
Centimeters Causes the values in
$SectDataWidthAndHeight,
$SectDataInnerMargins, and
$SectDataOriginXandY, to be interpreted as
1/100th of a centimeter rather than the
default of 1/1000th of an inch. In other words,
this option turns on metric units.
Inches Causes the values in
$SectDataWidthAndHeight,
$SectDataInnerMargins, and
$SectDataOriginXandY to be interpreted as
1/1000th of an inch. This is the default. If both
inches and centimeters appear in
$SectDataOptions values, the last one on the
right takes precedence.
Relaxrowsandcols Looks at the number of
rows and columns specified in
$SectDataRowsAndCols and, if necessary,
reduces the number of rows and columns to
what actually fits fully within the paper. If
this option is not specified, the number of
rows and columns specified in
$SectDataRowsAndCols is taken literally,
even if the specified number of rows or
columns does not fit within the paper.

$SectDataRowsAndCols

The value in this field always contains two


options separated by a space. For example: 7
2. The first option is the number of rows and
the second is the number of columns. Both
values must be 1 or greater. If you have two
entries for other fields, you must have two
entries here. For example: 10 2 : 10 3
For this field (and the remaining reserved
fields):
continued

Designing Forms 5-45

Building Applications

Reserved field name

Reserved Fields for Print Listings


Reserved field name

Description and values

$SectDataRowsAndCols
(continued)

If fewer options are given than the item


requires, the remaining options are
interpreted to be zero (0). If no options are
specified, 0 is assumed for all options. If
extra options are specified, they are ignored.
For a sectioning scheme where there is only
one section per sheet of paper, specify 1 1. If
you have specified the Fullsheet option, enter
an empty value in double quotes ().

$SectDataWidthAndHeight Specifies the width and height of each section.


The value in this field takes two options. The
first option gives the width of one section and
the second option gives the height (for
example: 4156 1000). Both values are in
1/1000th of an inch. For example, 1-1/2 inch
would be written 1500. The value must be one
or greater.
If you have two entries in other fields, there
must be two entries in this field (for example :
4156 1000 : 2781 1000).
$SectDataInnerMargins

Specifies an inner margin for each section.


The value in this field must contain four
numbers, separated by spaces, and specifies
an inner margin for each section. In order, the
options are left, right, top, and bottom
margins (for example: 156 0 0 0).
The inner margins are measured inward from
the sections overall width and height
($SectDataWidthAndHeight), within which
the listing is placed. You can also use the
inner margins to avoid printing in preprinted
areas and pre-punched holes.
You can enter any value including zero. The
only restriction is that the sum of the inner
margins in each direction must not exceed the
size of the section itself in that direction. For
example, you cannot specify a section width
of 1.5 inches, a left inner margin of 1 inch, and
a right inner margin of 1 inch.
If you have two entries in other fields, you
must have two entries in this field (for
example: 156 0 0 0:156 0 0 0).
continued

5-46 Application Development with Domino Designer

Reserved Fields for Print Listings


Description and values

$SectDataOriginXandY

Specifies the exact location, measured from


the upper left corner of the physical page, for
where the data begins on the page. The value
for this field contains two options. The first
option gives the beginning horizontal position
and the second option gives the beginning
vertical position (for example: 100 835).
Both are in 1/1000th inch and any value
including zero is valid. Remember that if you
have multiple entries in other fields, you must
have multiple values in this field (for
example: 100 835:100 835).
The first option not only gives the location of
the upper-leftmost section, but also implicitly
positions all other sections (because all
sections abut each other with zero pixel
separation between each). The sections step
horizontally by the
$SectDataWidthAndHeight width value and
step vertically by the
$SectDataWidthAndHeight height value. The
stepping proceeds through the number of
rows and columns given in
$SectDataRowsAndCols. However, if you
previously specified Relaxrowsandcols, the
stepping proceeds for as many rows and
columns as fully fit within the physical sheet
of paper.
Be careful when you use zero as a value. For
most printers, the printable portion of the
paper begins 1/8 to 1/4 inch inward from the
upper left corner of the physical paper.

Designing Forms 5-47

Building Applications

Reserved field name

Example
In Designer, you can view examples of contact printing forms and fields
by opening your Lotus Notes 6 Personal Address Book (NAMES.NSF)
and viewing forms such as Address labels 20 or 30, business.
In Lotus Notes 6, you can see an example of how contact printing works
for the end user:
1. From the Notes client, open the Personal Address Book
(NAMES.NSF).
2. Choose the Contacts view.
3. Choose File - Print. The Print View dialog box appears.
4. At the Printer tab, click Selected documents. The Documents Style
tab appears.
5. At the Document Styles tab, click Print multiple documents on each
page.
6. Next to Label format, you can view a list of the contact printing
forms. For example, Address labels 20 or 30, business is a form
enabled for contact printing and was created using the contact
printing reserved fields.
7. Next to Paper type, you can view the values set by the contact
printing reserved fields. For the Address labels 20 or 30, business
form, you have two paper sectioning entries: 2 x 10 Labels, 1 x 4 in
or 3 x 10 Labels, 1 x 2-5/8 in. (These two paper sectioning entries
were specified in the $SectDataName field.)

Customizing the Form processed confirmation for Web users


When Web users submit a document, Domino sends them the default
confirmation message Form processed. To change the default message,
add a computed text field to the form, name it $$Return, and use HTML
as the computed value.

To add users names to the response


The following $$Return formula returns the response Thank you, and
appends the users name:
who:= @If(@Left(From; " ") = ""; From; @Left(From; " "));
@Return("<h2>Thank you, " + who + "</h2><br><h4>
<a href=/register.nsf/Main+View?OpenView>Main View</a>");

5-48 Application Development with Domino Designer

To link to another page


Include HTML with a URL to link to another page based on field values
in the submitted document. The following $$Return formula returns a
response based on the region the user selects. For example, if the user
selects Europe, the message Visit our site in Italy displays with a link
to the Web site in Italy. (Assume that stdAnswer and stdFooter are
defined earlier in the formula.)

Region="Europe"; stdAnswer + "<h2>Visit our site in <a


href=\"http://www.lotus.com\it_ciao/it_ciao.htm\">Italy</a><
/h2>" + stdFooter;
stdAnswer + stdFooter);

To display a different Web page


To jump to a different Web page, enclose a URL for the page in brackets.
When the user submits the document, the Web client displays the
referenced document. For example, the following $$Return formula
displays the home page for the Lotus Japan site.
"[http://www.japan.lotus.com]"

Displaying a customized error message on the Web


To customize the appearance of error messages that display to Web
users, add custom error message forms to the database. If an error
condition occurs and a custom form exists for it, Domino uses the custom
form to display the error message. Otherwise, Domino uses the default
error message form. Message forms that you add to a database override
any server-wide messages set up by an administrator.
To create the association between a form and an error condition, create a
form with one of the following names. Then create an editable text field
named MessageString to hold the error message. Add additional text,
links, and other form objects that you want to display with the error
message.

Designing Forms 5-49

Building Applications

@If(Region="Asia"; stdAnswer + "<h2>Visit our site in <a


href=\"http://www.japan.lotus.com\">Japan</a></h2>" +
stdFooter;

Form name

Condition

$$ReturnAuthenticationFailure The users name and password cannot be


verified.
$$ReturnAuthorizationFailure

The user does not have a sufficient access


level for the database.

$$ReturnDocumentDeleted

A document was successfully deleted.

$$ReturnGeneralError

Any other error condition has occurred.

Adding the message field


Create one of the following fields to hold the error message:

An editable text field named MessageString to display the default


server-generated error message.

A computed-for-display field whose formula replaces the default


error message with a customized message.
For example, this formula for a field named CustomString on a
$$ReturnAuthenticationFailure form gives more information to the
user if authentication fails. The formula takes the value from the
default MessageString field if it contains unauthenticated and
replaces it with instructions to the user. If the MessageString field
does not contain the word unauthenticated, Domino uses the value
of MessageString instead.
@If(@Contains(messagestring;"unauthenticated");"Sorry,
the name and password you entered are unknown in our
system. If you are new to our site, return to the home
page and follow instructions for
registering.";messagestring)

Customizing search forms


The Search utility lets users find information within a single application
or an entire domain. You can customize search forms to suit
organization-specific needs. An application developer can, for example,
add a corporate logo to either form, or rearrange the fields.
You can also add custom forms to individual databases to customize
Web searches within a single database.

5-50 Application Development with Domino Designer

To customize the forms you can:

Create a database based on the Catalog (R5.0) template on the


Domino server you are using for domain search.

Copy the forms into the domain catalog database on the Domino
server you are using for domain search.

Customizing search input forms

Single database searches over the Web can be initiated using a


$SearchForm?SearchView URL command. In this case Domino looks in
the current database for a form with the actual name or the alias name
$$Search. If the form exists, Domino opens it; otherwise, Domino
displays a default search form based on the search.h file stored in the
Domino\Icons directory. The $$Search form builds and invokes a
SearchView URL command to perform the search, supplying arguments
either as URL command arguments or using posted field values. You can
also customize the default search.h form.
Refer to the following table if you are customizing a search form for use
on the Web. The table lists the URL command arguments used to drive
the initial search through the SearchDomain or SearchView URL. These
values are available on the results page for use by buttons and hotspots
on the results form. For example, you may specify &SearchOrder=2 on
your initial search form. The field SearchOrder will have a value of two
in the results page. A Next button on the results form can use this value
for the next page or override it by specifying something else.

Designing Forms 5-51

Building Applications

For domain search, the Notes client uses the form named DomainQuery
in the catalog servers catalog.nsf database as the search form. This form
uses the FTDomainSearch method to implement the search. Web domain
searches can use any form through an OpenForm URL command and
build and invoke a SearchDomain URL command to perform the search,
supplying arguments either as URL command arguments or through
posted field values.

Although TRUE and FALSE can be specified for some of the fields, when
the values are carried over onto the results page they are 1 or 0.
Optional
Arguments

Description

Default Value

Query

The search string

none

SearchMax

Maximum number of entries to return in


total; 0 = no limit

None. Note that


default and
maximum
SearchMax values
can be configured
for the Web server
through settings in
the Domino
Directory.

SearchWv

Include word variants: TRUE or 1 or


FALSE or 0

FALSE

SearchOrder

1 = by relevance
2 = by date ascending
3 = by date descending
4 = use view order (SearchView only)

SearchThesau Use thesaurus synonyms: TRUE or 1 or


rus
FALSE or 0
(This option is ignored by the R5 search
engine)

FALSE

SearchFuzzy

Use fuzzy search: TRUE or 1 or FALSE or FALSE


0

SearchEntry

Name of form to use for each result entry ResultEntry


(for SearchDomain only)

Start

Start document for paged results; 0 =


unpaged

Count

Number to return for paged results; 0 =


unpaged

Scope

Scope of search:
1 = notes databases only
2 = filesystem only
0 = both

If you are customizing search forms for Notes clients, you must use the
FTDomainSearch method.

5-52 Application Development with Domino Designer

For more information about using the FTDomainSearch method, see the
Domino Designer Programming Guide.

Searching for Header Information (search by Date Created or


Modified)

Header Field

Item name

CREATION DATE

_CreationDate

REVISION DATE

_RevisionDate

DB TITLE (domain index only)

_Title

DB CATEGORIES (domain index only) DbCategories


NOTE TITLE

_Note_Title

AUTHOR

_Note_Author

For example, to find all documents created before 5 January 2000, use the
following query:
[_CreationDate] < 01/05/2000

There are no field names stored in the document; the dates actually come
from the documents header, not from fields. So you can use these
reserved names with any document, even though they wont appear
among the field items in the Document Properties dialog.
There is no syntax corresponding to the search builder functions to find
documents based on a difference from todays date, for example is in
the last n days. Your agent will have to supply actual dates at runtime
(which it can calculate by adjusting todays date). Keep in mind that date
formats vary based on user settings, and you must use a format that
matches the workstation or server that will evaluate the query.
Customizing Domain search results forms
Search results are displayed using the SearchResults, ResultEntry, and
the DetailedResultEntry form. The SearchResults form defines the layout
of each page of results. The ResultEntry and DetailedResultEntry forms
define the format of a single result within that page, and are repeated for
each result returned. On the Web you specify the name of this form

Designing Forms 5-53

Building Applications

The Add Search button that appears beside the full text search entry
area in agents lets you search for documents by date created and by
date modified. To write such queries yourself for use with the FTSearch
method, you can use the following special item names:

through the SearchEntry field/argument. The fields below are for the
ResultEntry and DetailedResultEntry forms.
Field Name

Description

DSCreationTime

Creation time of a document

DSModifiedTime

Modification time of a document

DSURL

URL to document

DSDBTitle

Database title

DSDocSummary

Document summary

DSDocTitle

Document title

DSDocAuthor

Document author

DSScore

Relevance score

DSSServer

Name of the server that the document was indexed on

DSType

0 indicates a Notes document, 1 indicates an external or


file system document

You can name your results form whatever you want and then specify
your chosen name in the SearchDomain URL or to the FTDomainSearch
LotusScript call. The Web will look for a form named
$$SearchDomainTemplate if you dont name one in the URL.
When designing or viewing a Domain Search results form, it can be
helpful to know where the Domain Indexer finds the titles that it displays
in the results. The Indexer checks each document for the following Notes
fields or items, in the order they are listed here, to use to represent the
documents title: Title, Subject, Headline, and Topic field; window title
(as designated by the developer of that Domino application); and view
summary (using the default form and default view). If none of these
items can be found, the Domain Indexer displays Document has no
title in the results.
In file systems such as Lotus SmartSuite or Microsoft Office, the title
and author are extracted from the document properties fields. For HTML
files, TITLE and AUTHOR tags are used.
How SearchResults and ResultEntry/DetailedResultEntry are used
The LotusScript below is attached to the click event of the Search action
hotspot used by the Notes client on the search form. The lines that call
the name of the results form and the result entry form are bold.
Sub Click(Source As Button)
Dim s As New NotesSession
Dim db As NotesDatabase
Dim w As New NotesUIWorkspace
5-54 Application Development with Domino Designer

q=doc.query(0)
l=doc.resultlimit(0)
d=doc.MaxDisplay(0)
sort = doc.sort(0)
usestr = doc.use
sscope=doc.searchscope
rtype=doc.GetItemValue("SearchType")(0)
If rtype = "1" Then
rformname="DetailedResultEntry"
Else
rformname="ResultEntry"
End If
Select Case sort
Case "R"
stype = FT_SCORES
Case "O"
stype = FT_DATE_ASC
Case "N"
stype = FT_DATE_DES
End Select
Forall values In usestr
If values = "2" Then useint = useint + FT_STEMS
If values = "3" Then useint = useint + FT_FUZZY
End Forall
Forall values In sscope
If values = "1" Then useint = useint +
FT_DATABASE
If values = "2" Then useint = useint +
FT_FILESYSTEM
End Forall
On Error Resume Next
If db.isopen Then
Designing Forms 5-55

Building Applications

Dim uidoc As NotesUIDocument


Dim q As String
Dim l As Integer
Dim d As Integer
Dim sort As String
Dim stype As Integer
Dim useint As Integer
Dim rtype As String
Dim rformname As String
Set db=s.CurrentDatabase
Set uidoc = w.currentdocument
uidoc.refresh
Set doc=uidoc.Document

If Err <> 0 Then


Messagebox STR_DBOPEN_ERROR
Err = 0
Exit Sub
End If
Set srdoc = db.ftdomainsearch(q, l, stype,useint,
0,d,rformname)
If Err <> 0 Then
Messagebox STR_FTERROR_PREFIX & Error$, 0 ,
STR_ERROR
Err=0
Exit Sub
End If
srdoc.Form="SearchResults"
Call w.EditDocument(False, srdoc, True)
End If
End Sub

Tip You must select the Generate HTML for all fields option in the
Form properties box to preserve field values when data is passed
between a Web browser and the server.

Customizing Web SearchView results


To customize the Web Search Results page for SearchView:
1. Create a form and assign it one of the form names shown in the
following table.
Form name
$$SearchTemplate for
viewname

Field required Comments


$$ViewBody Associates the form with a
specific view. Domino requires
the $$ViewBody field, but
ignores the value. The form name
includes viewname, the alias for
the view, or, when no alias exists,
the name of the view. For
example, the form named
$$SearchTemplate for All
Documents associates the form
with the All Documents view.
$$SearchTemplateDefault $$ViewBody Domino requires the
$$ViewBody field, but ignores
the value. This form is the default
for all Web searches that arent
associated with a specific form.

2. Add a field named $$ViewBody to the form.

5-56 Application Development with Domino Designer

3. If you want to display results page-by-page, add buttons or hotspots


for forward and backward navigation to the form.
4. Use the Start and Count parameters in your URL command.
For more information on URL commands, see the topic Programming
options for Web applications in the appendix URL commands for Web
applications.

Note If you use editable fields on a search result form, select the option
Web Access: Use JavaScript when generating pages, in the Database
properties. If selected, a URL attached to a hotspot or button will be
computed on the click event. If it is not selected, the URL will be
computed when the page is loaded.
Field

Description

Query

Search string used

Start

Starting document number

Count

Number of results requested for this page

Hits

Actual number of results returned this page, which may


be less than Count requested. This field is useful in
determining the Start parameter for a Next button.

TotalHits

Total number of hits found by the search.

SearchMax

Maximum number of entries to return in total; 0 = no limit.

SearchWv
(only for URL
command)

Include word variants: 1 or 0.

SearchOrder
(only for URL
command)

1 = by relevance
2 = by date ascending
3 = by date descending
4 = use view order (SearchView only)

SearchThesaurus
(only for URL
command)

Use thesaurus synonyms: 1 or 0.

continued
Designing Forms 5-57

Building Applications

Using navigational buttons for paged results


To make it possible to navigate forward and backward between pages of
results, add buttons or hotspots to the SearchResults form. The fields
available for use with next and previous buttons are listed in the table
below. In the Notes client, the buttons should reinvoke the LotusScript
FTDomainSearch function with revised arguments. On the Web, they
should be used to construct a new SearchDomain URL to fetch a new set
of results.

Field

Description

SearchFuzzy
(only for URL
command)

Use fuzzy search: 1 or 0.

SortOptions
(only for Notes
client)

FT_SCORES = by relevance
FT_DATE_ASC = by date ascending
FT_DATE_DES = by date descending

OtherOptions
(only for Notes
client)

FT_STEMS = Include word variants


FT_FUZZY = Use fuzzy search
FT_DATABASE = search databases
FT_FILESYSTEM = search file systems

SearchEntry
(Domain Searches
only)

Name of the result entry form used.

SearchView
Text unique identifier of the view being searched. This
(only for SearchView identifier is useful in building subsequent SearchView
URL command)
URL commands.
Scope
(only for
SearchDomain URL
command)

Scope of search:
1 = notes databases only
2 = file system only
0 = both

The fields in the table below are available for use with the Start and
Count parameters and should be added to the results form as needed.
Field

Description

Hits

The actual number of hits returned. This field is useful in


determining the Start parameter of Next.

TotalHits

The total number of hits found without regard to the


number of pages.

5-58 Application Development with Domino Designer

Tips for improving document display time


To help users create and read documents quickly, follow these guidelines
when designing forms:

Designing forms
Avoid using large bitmaps or graphics.

Avoid using the form property Automatically refresh fields.


Instead, use the Refresh fields on keyword change for a choice
field, or write a LotusScript field event to recalculate the document
or update other fields when users move from a specific field.

Avoid creating long tables with many computed fields.

Designing fields

Use @DbColumn or @DbLookup formulas sparingly, or replace them


with LotusScript programs which are generally faster and support
error checking.

Use simple formulas for hide when conditions.

Avoid recalculating fields, if possible. Otherwise, change such fields


to computed-when-composed fields. While these fields calculate only
when the document is composed, they can be updated later if needed
through buttons, actions, or agents.

Use LotusScript form events rather than conditional formulas in the


field itself to set field values.
For example, to reset the status field if the document is being saved,
create a script for a QuerySave event, rather than write a formula
that uses @If(@IsDocBeingSaved;x;y).

Minimize the number of fields, especially hidden fields, and use


form events rather than field formulas to execute processing logic.
You can avoid unnecessary recalculations in this way.
For example, suppose a form contains a hidden computed field
called State, which determines where documents are in the workflow
and where they need to be sent. By replacing the field with a
LotusScript program that sets a field value during the QuerySave
form event, the field value is set only when a document is saved, not
when it is opened or refreshed.

For more information on writing lookup formulas, or hide-when


formulas, see the Domino Designer Programming Guide.

Designing Forms 5-59

Building Applications

Testing a form before deploying it


There are two ways to test a form before using it in the actual
application. You can preview the form from the Notes client or through a
Web browser to see how it will look to a user and to make sure form
elements are working. In addition, you should test the form in the
application by creating documents, examining the documents through
different views, and testing all actions.
If you are testing a response form or a response to response form, you
should do one of the following:

Select a document to respond to from the Notes Client in order to test


the form.

Deselect the type response or response to response on the Form


Properties box until you have thoroughly tested the form.

For more information on previewing your work, see the topic


Previewing your design work in the chapter Creating an application.

5-60 Application Development with Domino Designer

Chapter 6
Designing Fields

Fields
A field is the part of an application that collects data. You create fields on
forms, subforms, or in layout regions. Each field stores a single type of
information. A fields field type defines the kind of information a field
accepts, such as text, numbers, dates, or names. When a user, either in a
Notes client or a Web browser, creates a form, fills out the information in
the fields, and saves the form, the data in the fields is stored in an
individual document. The contents of the fields can then be displayed in
documents and views or can be retrieved for use in formulas. A field can
be used on a single form, or you can create shared fields for use in
multiple forms in a database.
You can create a single-use field on a single form, or a shared field to use
on several forms. In either case, you must specify the following:

Field name

Field type

Whether this field is editable or computed

Creating a single-use field


When you create a field on a form, the field displays with its name
surrounded by a rectangle and a letter or symbol that lets you know
what type of field it is. You can use tabs, returns, and other formatting
tools to refine the fields position on the form.
1. Open the form.
2. Place the cursor over where you want the field to appear.
3. Choose Create - Field.

6-1

Building Applications

This chapter describes how to create fields to collect and store specific
types of information.

4. In the Field Properties box:


Assign a name to the field.
Assign a field type.
Select the display style.
Select Editable or one of the computed options.
5. On the Control tab, select a display option for the field.
6. On the Fonts tab, format the font style for the field.
To copy fields
If you copy a field from one place on a form to another, each copy of the
field has a sequential number appended to its name to preserve name
uniqueness. You can rename the field after copying it.
Note If you copy a shared field and paste it into the same form, the new
field becomes a single-use field. However, if you copy a shared field and
paste it into a different form, the copied field remains a shared field.
To delete fields
To delete a field, select the field on the form and press the Delete key, or
choose Edit - Delete.
Deleting a field from a form means that data for that field is no longer
displayed in documents. The data still exists, however, and you can
display it by adding a field with the same name to the form. To delete the
field data, use the @DeleteField function to remove the field and its data
from all documents containing the field.
For example, to purge the AssignedTo field and its data from all
Schedule documents, create an agent or action that uses the form name
and @DeleteField:
SELECT Form=Schedule;
Field AssignedTo:=@DeleteField;
To convert a shared field to a single-use field
To convert a shared field on a form to a single-use field on the form:
1. Open the form.
2. Click the shared field.
3. Choose Design - Convert To Single Use.
To convert a single-use field to a shared field
1. Open the form.
2. Click the field to be shared.
3. Choose Design - Share This Field.
6-2 Application Development with Domino Designer

Creating a shared field

You can design a field specifically as a shared field, or you can convert a
single-use field that is not in a layout region to a shared field.

To create a shared field


1. Expand Shared Code in the Design pane and click on Fields.
2. Click the button New Shared Field.
3. Enter a name for the shared field.
4. Assign a field type and choose Editable or a computed option, if
applicable.
5. Close the properties box.
6. Close and save the shared field.

To insert a shared field


1. Open a form and move the cursor to where you want the field to
appear.
2. Choose Create - Resource - Insert Shared Field. The Insert Shared
Field dialog box appears.
3. Select the shared field you want to use from the current database and
click OK.
To select a shared field from another database, click the Database
pull-down list, highlight a database, select a shared field in that
database, and click OK.
4. (Optional) Type a text label next to or above the field.
5. (Optional) Highlight the label and choose Text - Text Properties to
change the text style.

Designing Fields 6-3

Building Applications

You can define a field for use on more than one form. For example, many
forms have a creation date field, so you can define this field once and
reuse it. When you define a field as a shared field, Designer displays the
field with a wider border than other fields and adds the field name to a
list of shared fields available for use in a database. To insert a shared
field into another form in the database, select the field name from the list
of shared fields.

To rename a shared field


Renaming a shared field affects all forms that use the field, as well as any
documents created with the form. After renaming a shared field, edit
each form that uses the shared field. Delete the old shared field, and
insert the new shared field. Also revise all formulas that refer to the
former field name. If you already used the form to create documents,
create and run an agent to reassign field data to the new field name and
to computed fields.

To delete a shared field


To delete a shared field, you select the shared field from the list of shared
fields and choose Edit - Delete.
When you delete a shared field from a form, you delete only the field
reference from the form. Because other forms may use the shared field
definition, its definition remains in the database. Unless you delete the
field data with the @DeleteField function, the data from deleted shared
fields can be displayed again by adding a field of the same name or
re-inserting the shared field.
When users open a document that refers to a deleted shared field, they
see this message:
Cannot locate field definition for Field: <field name>.

When users click OK, they see the contents of the shared field as
non-editable text.
To prevent this message, modify each form to convert the old shared
field to a single-use field (by cutting it and pasting it back on the form).
The field definition is stored within each form, rather than in a central
location, and documents can be displayed as they were when they
referred to a shared field definition.

To convert a single-use field to a shared field


1. Open the form.
2. Click the field to be shared.
3. Choose Design - Share This Field.

6-4 Application Development with Domino Designer

To create multiple shared fields for different languages


If you have a multilingual database, you may want to create multiple
copies of a shared field and target each one for a different language. For
example, you may want the help text for a shared field to be different for
different languages.
To create multiple shared fields for use in a multilingual database:

2. In Designer, click Shared Code - Fields to display the list of shared


fields.
3. Create the shared field you want to use in the multilingual database.
4. Depending on the number of languages, create multiple copies of
this shared field by copying and pasting the shared field. If the
original field is named info, copies of the field are named info_1,
info_2 and so on.
5. For each copy of the shared field:
On the Shared Field Info tab of the Shared Field Properties box, set
the name to be the same as the name of the original shared field.
(Note that Shared fields do not have aliases.)
Make the necessary changes to the shared field. For example, if
the selected language for that copy of the shared field is to be
French, you may want to enter a help description that is in French
(Advanced tab of the Shared Field Properties box).
Close the Shared Field Properties box.
Save and close the shared field.
Select the shared field just edited and choose Design - Design
Properties. The Design Properties box appears.
On the Design tab, select a language for that version of the shared
field. Depending on the language you choose, you may also need
to select a region for the selected language.
6. Repeat the previous step for each copy of the shared field and
specify the appropriate language.

Designing Fields 6-5

Building Applications

1. Make sure that the database containing the shared field is set up to
be a multilingual database (File - Database - Properties. At the
Design tab, check Multilingual database.)

Field names and labels


A field name is a required element. You assign a field name in the Field
Properties box when you create the field. You an also create a field label
outside the field. A field label is descriptive text you create that appears
next to or on top of the field on the form, and helps the user understand
the field. Label text might name a field for example: To, From, Author,
Subject, or Date. Or it might describe a user action for example, Enter
a product name.

Naming a field
A field name must begin with a letter and can include letters, numbers,
and the symbols _ and $. The name can contain up to 32 bytes. (If youre
using multibyte characters, remember that 32 bytes is different than 32
characters.) Use short, descriptive field names that you will remember
when you write formulas that refer to the fields.
Field names cannot contain spaces. Run multiple words together, for
example, ModifiedDate, or separate them with an underscore:
Modified_Date. The Designer templates use the naming convention of an
initial capital letter followed by lowercase letters, for example,
SendCopyTo.
If several fields on forms in a database contain similar information, for
example, the date of creation and the authors name, use the same field
name for all of them. This makes sharing information between forms
easier as you continue to develop the application. Establishing and
maintaining naming standards simplifies application design throughout
your organization.
Renaming a field
Unlike forms and views that can have aliases, a field can have only one
name. Renaming a field has the same effect as deleting a field from a
form. For example, if you have a field called Comments, and users
enter text into many instances of this field in documents, and you then
rename the field to Observations, all of the data in Comments will
no longer appear when you display the document. If you must rename a
field and need to transfer data, create a new field, create and run an
agent to reassign data to the new field, then delete the old field.
Remember to update all formulas to refer to the new field name.

6-6 Application Development with Domino Designer

Field types
The fields field type determines what type of information it can contain.
You define the field type in the Field Properties box. The field types are:
Authors

Checkbox

Color

Combobox

Date/Time

Dialog List

Formula

Listbox

Names

Number

Password

Radio button

Readers

Rich text

Rich text lite

Text

Time Zone

Building Applications

Text, rich text, and rich text lite fields


To collect, store, and display text in a field, create a text field, rich text
field, or rich text lite field.

Text fields generally suffice for data entry or text output in an


application.

Rich text fields are better for formatted text, large amounts of text, or
embedding or attaching objects. For example, the Subject field on a
mail form is a text field, and the Body field is a rich text field.

Rich text lite fields are rich text fields with a helper icon and down
arrow next to the field. Clicking the icon gives the user a fast way to
add an object into the rich text lite field. Clicking the down arrow
displays a drop-down menu. The elements listed in the drop-down
menu are the only elements the user is allowed to insert into the rich
text lite field. Any attempt to insert or paste an invalid element into
the rich text lite field displays an error message.
Designing Fields 6-7

Rich text fields and rich text lite fields can be used anywhere except in a
layout region. They are not subject to the size limitations imposed on
other field types.

Displaying graphics, attachments, and objects in a rich text field


Many databases use an editable, rich-text field named Body to give users
the flexibility of adding whatever they want to the main part of a
document attachments, graphics, objects, or different fonts and colors.
A rich text field can contain anything a page contains.
Note You cannot write to a rich text field by using simple actions or
formulas. If you want to use simple actions or formulas to write to a
field, use text fields.
You can use a rich text field to launch an OLE object that is, to open an
object from another application within a form. You can even define the
field so that an OLE object automatically launches when a user opens the
form.
For more information, see the topic Launching objects automatically in
the Designing Forms chapter.

Using rich text lite fields


To add a rich text lite field to a form, select rich text lite from the field
type list (Field Info tab of the Field Properties box). At the Control tab of
the Field Properties box, check the object types you want to add to the
drop-down menu that appears when the user clicks the down arrow.
Note that if you select only one of these object types, no down arrow
appears because there is no need to change types.
You can select or deselect one or more of the following object types (the
object types selected have a check next to them):

Pictures

Shared Images

Attachments

Views

DatePicker

Shared Applets

Text

OLE Objects

Calendar

Inbox

6-8 Application Development with Domino Designer

In addition, you can check the following options:

Help - checking this lets the user choose to display brief help on an
object type. The help changes depending on the object type the user
selects.

Clear - checking this gives the user the option to clear the contents of
the field.

The Field help field lets you add help for each object type. Note that
you must enter help in the order the fields are listed in the listbox. Also,
you must separate each help text with the vertical bar character (|). For
example, to add help if you have selected pictures, shared images, and a
datepicker, enter the following in the Field Limit Help field:
Picture help|Shared Image help|||DatePicker help|

Note the extra vertical bar characters between Shared Image help and
Date Picker help. These extra characters indicate that no help text exists
for attachments and views.
This is what happens when a user clicks on an icon next to the rich text
lite field:

For datepicker, inbox, and calendar, the object is inserted into the
field immediately.

For pictures, shared images, attachments, views, shared applets, text,


and OLE objects, the corresponding dialog box appears. Once the
user selects from the choices in the dialog box, the object is inserted
into the field.

Rich text fields on the Web


You have two options for defining how a rich text field displays on the
Web:

The rich text field displays for editing within an HTML text area.
This is the default behavior.

The rich text field displays using the editor applet, allowing for a
broader range of editing options.

Designing Fields 6-9

Building Applications

At the First display field, select the object you want as the default icon
when a document is first created. For example, if a rich text lite field is
limited to Pictures, DatePickers, and Shared Images, you can choose to
display Pictures as the first icon (indicating the intended use of the field
while still giving users the opportunity to add other types). If the user
chooses another object type from the drop-down menu, the icon changes.

Using the editor applet


Web users can do the following when using the editor applet in a rich
text field:

Bold, underline, and italicize text

Change to Helvetica, Courier, or Times (fonts supported by the Java


Development Kit (JDK), Release 1.0.2)

Change font size

Change font color

Align paragraphs (left, center, right)

Indent paragraphs

Use bulleted and numbered lists

Create links

Cut, copy, and paste text within the rich text field
Note Web users cannot paste text from outside the editor because of
the limitations of the JDK, Release 1.0.2.

Enter international characters


Note Not all international characters can be displayed in the editor
applet. The ability to display international characters depends on the
fonts installed on the users workstation and the version of the
browser the user is working with. Most characters entered in the
editor will be correctly transferred to Domino (depending on the
browser).

Enabling the editor applet


You can enable the editor applet in rich text fields only. To enable the
editor applet:
1. Create or select a rich text field.
2. Choose Design - Field Properties.
3. On the Field Info tab, in the Web Access section, select Using Java
Applet.
When the editor becomes active, it displays as large as the Web browsers
window. It is recommended that you resize it. The minimum size
recommended is 300 by 500 pixels. To resize it:
4. In the Objects tab of the Info List in the Programmers pane, select
the rich text field.
5. Click HTML Body Attributes.

6-10 Application Development with Domino Designer

6. In the Script area, enter the height and width. For example:
"HEIGHT=300 WIDTH=500"

First line indent or outdent

Full justification paragraph alignment

Tabs

Images

Ordered lists

Tables

In addition, any features that the editor applet cannot interpret are
displayed as HTML in green on the document.
Note Make sure you test your design ahead of time on different
browsers. Depending on the users browser, there may be display
problems.

Number fields
Use Number fields for numeric and currency data.
Numeric fields
The Number field type lets you limit a field to numerical values and
define how the numbers display in a form. For example, a Monthly Total
field in a Budget form adds together all of the numeric values from the
fields listed in the following formula to arrive at a total budget figure:
Advertising + Entertainment + Miscellaneous + Overhead +
Salaries + Travel

If you dont want users to change the value of a numeric field, select a
Computed option in the Field Properties box. In the example above, the
Monthly Total field is computed so users cannot edit the value.
Fields used in calculations must have default values. Otherwise, the
message Incorrect data type for operator or @Function: Text expected
appears.

Designing Fields 6-11

Building Applications

If the same document is edited by both a Web browser and a Notes


client, there are some additional caveats. For example, it is possible to
format a document in the Notes client using a formatting feature that is
not supported in the editor applet. Also, there are features that, once
opened and edited in the editor applet, will subsequently not format
properly if opened for editing in the Notes client. These are the
formatting features to avoid if editing a document with both the Notes
client and a Web browser:

On the Control tab of the Field Properties box, you can specify whether
the field should display formats according to the custom settings you
specify, or whether it should use the default settings of the users
workstation.
Choose any of these number formats on the Control tab:

Decimal displays numbers either as they are entered (zeroes to the


right of the decimal point are suppressed), or with a fixed number of
decimal places, depending on what you specify. To base the decimal
symbol and thousands separator display on the type of measurement
(Imperial or Metric) users set in the operating systems International
User Preferences, choose Client. To set the decimal symbol and
thousands separator yourself, choose Custom.
Note A number field can store up to 8 non-zero decimal digits
without loss of precision. Notes implements floating point arithmetic
using the IEEE64 industry standard. In cases where a user enters
more than 8 non-zero decimal digits, rounding may occur and the
number may display and be stored differently from the number the
user entered.

Percent displays a number as a percentage. For example, .12 displays


as 12% and 12 displays as 1200%.

Scientific displays numbers using exponential notation. For example,


10,000 displays as 1.00E+04. Select the number of decimal places
from the Decimal Places list.

Currency displays values with the currency symbol you specify. The
default is the American dollar sign. For example, $15.00 is displayed
when the value is 15 and 2 is selected in the Decimal Places list.
You can select a different currency symbol from the list, or enter a
custom currency symbol and country code. See the next section for
more on currency fields.

Designer recognizes the following formats for numbers:


Type

Format

Integers

123, -123

Decimal fractions

1.23, 0.12, -.12

Scientific notation

1.23E2, -1.23E12

Currency

$2.50, ($600.09)

Domino can store numbers from 2.225E-308 to 1.798E308 with 14-digit


accuracy.

6-12 Application Development with Domino Designer

Currency fields
To choose currency as the type you want for the number field, check
Currency at the Control tab of the Fields Properties box. For currency,
you may want different fields to display different currency formats and
you can do that at a field level.

If you have selected Use preferences from: Custom, you have


additional options in the Currency symbol section of the Control tab.
You can choose a currency symbol from an extensive pull-down list. If
you decide to check Custom, the currency you have chosen appears in
the first box next to Custom (or you can choose another currency symbol)
and the country code associated with this currency appears in the second
box. You can then modify the country code. For example, the dollar sign
($) as a currency symbol is used in many countries, including Canada,
Jamaica, and the United States, and has different values in each of these
countries. For this reason, you may need to change the country code to
one you want to associate with this currency symbol. For a full list of
countries and their ISO country codes, see
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html.
If the symbol you need is not included in the list, you can create a custom
currency symbol by pasting in the ASCII character for the currency
symbol and then choosing a corresponding country code from the
pull-down list of country codes.
Caution Applying different currency formats, such as displaying British
pounds in one field and American dollars in another, might result in
unexpected results if you combine values using the formula language or
a scripting language.

Date/Time fields
Date/Time fields display time and date information in a variety of
formats. You can define a date or time field as editable by the user, or
you can choose a computed option so the user cannot change the field
value.
Dates may range from 1/1/0001 through 12/31/9999. Entering two-digit
years between 00 and 49 assumes the century starting in the year 2000.
Entering two-digit years between 50 and 99 assumes the century starting
in the year 1900. If you want users to enter a four-digit year in the field,
on the Control tab of the Field Properties box, select On input Require
user to enter four digit years.

Designing Fields 6-13

Building Applications

If you want to use the currency defined in the users preferences, select
Use preferences from: User settings. If you want to define a custom
currency, select Use preferences from: Custom.

Times may range from 00:00:00:00 through 23:59:59:59 in the 24-hour


format and from 12:00:00 AM through 11:59:59 PM in the 12-hour
format.
Choosing a Date/Time format
On the Control tab of the Field properties box, you select the format for
the display of the Date/Time field. You can choose to use the date/time
display based on the current user settings, or you can customize the
display.
To display a date
1. Select or create a Date/Time field.
2. On the Control tab, choose one of the following next to Use
preferences from:
User setting to use the preferences from the users workstation.
Custom to customize the display.
Tip If you are creating a custom Date/Time field, make sure to test
your application with the user preference Strict Date/Time Input
checked and with it unchecked (File - Preferences - User
Preferences).
Also, if you are creating a custom Date/Time field, you may want to
include field help text (Advanced tab of the Field Properties box) to
describe how the user should enter the date. You may want to
provide a brief example as part of the help text.
3. Check Display Date and then choose date options. As you select
options, the sample will change to show you what the user will see.
The following are the display date options:
Show:
All
Only month, day, and year
Only weekday, month, and day
Only month and year
Only month and day
Only year
Only month
Only day
Only weekday
Special:
Show today when appropriate
6-14 Application Development with Domino Designer

Always show 4 digit year


Show 4 digit year for the 21st century
Note that this setting takes precedence over 2-digit year formats
chosen elsewhere in the Control tab of the Field properties box.
Show year only if not this year
Calendar:
Hijri calendar
Format (appears if you selected Custom):
YMDW - Year, month, day, weekday. For example, 98 12/17/Thu.
WMDY - Weekday, month, day, year. For example, Thu 12/17/98.
WDMY - Weekday, day, month, year. For example, Thu 17/12/98.
Separators (appears if you selected Custom):
Enter the separators to use between the day, month, and year. For
example, you can enter backslashes (/) to present the date as
06/06/02.
Note that if you specify a comma as a date separator (for example:
11,15,98) then you must use a semicolon if you are separating
multiple dates in a list (for example: 11,15,98; 12,15,98; 1,15,99). If
you specify a semicolon as the date separator, then you must use a
comma to separate multiple values in the list.
Day, Month, Year, Weekday:
Choose a format for the day, month, year, and weekday from the
drop-down lists.
To display a time
1. Select or create a Date/Time field.
2. On the Control tab, choose one of the following from Use
preferences from:
User setting to use the preferences from the users workstation.
Custom to customize the display.

Designing Fields 6-15

Building Applications

Gregorian calendar

3. Check Display Time and then choose display time options. As you
select options, the sample will change to show you what the user will
see.
The following are the display time options:
Show:
All
Hours, minutes, and seconds
Hours and minutes
Hours only
Time zone:
Adjust time to local zone - Displays the time relative to the time
zone in which the document was created.
For example, if the document was created at 3:00 PM in Boston
and is read by a user in Los Angeles, the creation time is adjusted
to the Pacific U.S. time zone and displays as 12:00 PM.
Always show time zone - Displays the zone in which the
document was created as a part of the value.
In this case, the time itself is not adjusted for the readers time
zone; instead, Notes displays the creators time zone. For example,
if the document was created in Boston at 3:00 PM, the user in Los
Angeles sees the creation time as 3:00 PM EST.
Show only if zone not local - Displays the zone in which the
document was created only if the document was created in a
different time zone than it is being viewed in.
For example, if the document was created in Boston at 3:00 PM,
users in the U.S. Eastern standard time zone see the creation date
as 3:00 PM, while users in other time zones see the creation date
as 3:00 PM EST.
To take advantage of time zone options, note that the date must be
included in the field.
Format (appears if you selected Custom):
12 hour
24 hour
Separator (appears if you selected Custom):
Enter the separator to use between the hours, minutes, and
seconds. For example, if you enter a colon (:), the time appears as
11:52:35 AM.

6-16 Application Development with Domino Designer

To show both date and time together in the same field, select both
Display Date and Display Time.
Examples: Possible date/time formats
10/30
10/30/95
10/30/1995

Building Applications

Monday 10/30/95
Monday 10/30/1995
October 30, 1995
Monday October 30, 1995
Today
Yesterday
Tomorrow
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
10/30 11:00 PM
10/30/95 11:45:30 AM
10/30/1995 11:45:30 AM
Monday 10/30/1995 11:45:30 AM
Monday 10/30/1995 11:45:30:00 AM
Monday 10/30/1995 11:45:30:00 AM EST
Monday October 30, 1995 11:45:30:00 AM EST
Monday 11:45:30:59 AM
11:00 PM
11:45:30 AM
Designing Fields 6-17

11:45:30:59 AM
11:45:30:59 AM Today
11:45:30:59 AM EST Today
98 12/17/Thu

Formulas for Date/Time fields


Dates and times are often calculated by formula rather than supplied by
a user. Use the following @functions to create date and time field values.
To display

Create a Date/Time field


showing

Use the formula

Date a document was


created

Date and time

@Created

Date a document was last


modified

Date and time

@Modified

Date a document was last


accessed

Date and time

@Accessed

Current date

Date

@Today

Current date and time

Date and time

@Now

Creating a graphical display for Date/Time fields


You can display certain editable Date/Time fields either as a blank field
that users type a date or time into or as a graphical date/time control.
Note Graphical date/time controls are not supported on the Web.
To create a calendar pop-up control
Users can click a helper button on the field box to bring up a one-month
calendar on which they can select the date they want.

1. Create a Date/Time field that is editable.

6-18 Application Development with Domino Designer

2. On the Field Info tab of the Field Properties box, select


Calendar/Time control.
3. On the Control tab choose:
On Display: Use preferences from User settings
(Choose Use Preferences from Custom if you prefer to specify
display options.)

To create a time control


Users can select time by clicking on the control and sliding the selection
bar to a new time.

1. Create an editable Date/Time field.


2. On the Field Info tab of the Field Properties box, select
Calendar/Time control.
3. On the Control tab choose:
On Display: Use preferences from User settings
(Choose Use Preferences from Custom if you prefer to specify
display options.)
Display Time

Designing Fields 6-19

Building Applications

Display Date

To create a duration control


Users can select a range of time with a duration control, for example,
from 12:00 PM - 1:00 PM.

1. Create an editable Date/Time field.


2. On the Field Info tab of the Field Properties box, select Allow
multiple values and Native OS Style.
3. On the Control tab, choose:
On Display: Use preferences from User settings
(Choose Use Preferences from Custom if you prefer to specify
display options.)
Display Time
Examples: Creating a field to display dates and times
Tracking modification dates
You want to track the dates on which purchase requisitions are created
and modified. On the Purchase Requisition form, you create a
computed-when-composed Time field called CreationDate with the
formula @Created. This date always shows the date the author first
saves the document. To track editing dates, you also created a computed
Time field called ModifiedDate with the formula @Modified. This date
is the same as the CreationDate the first time the document is saved but
is updated automatically each time the document is modified. For

6-20 Application Development with Domino Designer

read-only documents, you can use the formula @Accessed to


determine the last time the document was accessed.
Determining the daily age of a document
In your Service Tracking database, you want to track the age of request
documents. On the Request form, you create three fields to calculate the
information.

@Created

The second field is a Time field named CurrentDate containing this


formula:
@Now

The third field is a computed Numbers field that is calculated by this


formula, which uses the values from the previous two fields:
@Abs(@Integer((CurrentDate - DateCreated) / (60 * 60 * 24)))

Notes stores dates as a number of seconds, so that number is converted


to days by dividing it by (seconds per minute [60]) * (minutes per hour
[60]) * (hours per day [24]).

Names fields
Create a Names field to display user names. A Names field can be
computed or editable. If you associate the formula @UserName to a
Names field, the name will appear the way it appears in Notes IDs for
example, Sara Ryan/Acme/US.
To display only the common name portion of names, use the [CN]
parameters with @Name. For example, in an editable names field called
Members use this formula as the default value:
@Name([CN];Members)

This formula displays the name Sara Ryan if the users hierarchical
name is Sara Ryan/Acme/US
For more information about formulas for displaying user names, see the
formula language chapters in the Domino Designer Programming Guide.

Designing Fields 6-21

Building Applications

The first field is a computed Time field called DateCreated containing


this formula:

Looking up names for field values


To help users enter names correctly in a document, provide links to
existing lists of names. For example, a Names field might require that
users select names from the access control list for the database. This
enables users to pick a name from a list, eliminates spelling errors, and
restricts names in the field. Other sources for names are the Domino
Directory or a view dialog that presents names from a column in a view.
Lookup options are available on the Control tab of the Field Properties
box when you create a Names field, an Authors field, and a Readers
field. You can turn off this option by maintaining the default choice of
none. If you select a lookup option for the field, users press
CTRL+ENTER or click the entry helper button to the right of the field to
see a list of possible entries. Lookup options are not supported on the
Web.
Lookup options
Use Address dialog for choices This option displays the Names
dialog box so users can select names from a Personal Address Book
or Domino Directory. Select Look up names as each character is
entered to help users fill in a name quickly. Notes looks up a match
for the typed letters in the open Address Book or directory.

Use Access Control List for choices This option brings up a list of
people, servers, groups, and roles in the access control list.

Use View dialog for choices This option brings up a dialog box
containing entries from a column in a database view. Select the
database to look up, select a view, and select a column number.

For information on the access control list for a database, see the topic
The database access control list in the chapter Security in an
application.

Readers and Authors fields


Reader and Authors fields allow you to control who can read and create
documents created from a form.
Because these fields work with the overall Designer security model, they
are described in the chapter Security in an Application.

Creating fields to display lists of choices


You can create fields that present users with a list of choices. The list can
be generated by a formula you enter or can be created by users who enter
values. Enter lists and formulas for choice fields on the Control tab of the
Field Properties box. If available for the interface style, you can select
6-22 Application Development with Domino Designer

Allow values not in list on the Control tab of the Field Properties box
to let users add their own words without changing the original list. Also,
some of the interface styles have an option to Allow multi-values on
the Field Info tab which let users select several choices in the field.
Choice list fields can be editable or computed; however, most choice list
fields are editable. The field types that present lists of choices are:
Field Type

Usage

Allow
multi-values

Users either press


Available
ENTER or click the
entry helper button to
see all the choices at
once, press the space
bar to display choices
one at a time, or type a
letter to display the
first choice beginning
with that letter. Select
Display entry helper
button if you want to
display a button next
to the field that a user
clicks to view all the
choices. Dialog lists
are not available in
layout regions.

Available

Each choice is
Not
displayed with a box
available
users click to select.
Checkboxes have
border, column, and
spacing options. To
create a wide checkbox
panel, choose a
column number
between 2 and 8.

Available

continued

Designing Fields 6-23

Building Applications

Allow
values not
in this list

Field Type

Usage

Allow
values not
in this list

Allow
multi-values

Each choice is
Not
displayed with a
available
button; users can click
only one. Radio
buttons have border,
column, and spacing
properties. To create a
wide button panel,
choose a column
number between 2 and
8.

Not available

Each choice is
Not
displayed with an
available
expanded list box.
Users click an entry to
select it. List boxes
have border, size, and
placement options. To
resize the list box
without dragging it,
change the Width and
Height measurements.
To move the list box in
a layout region
without dragging it,
change the Left and
Top measurements.

Available

continued

6-24 Application Development with Domino Designer

Field Type

Usage

Allow
values not
in this list

Not available

Building Applications

Each choice is
Available
displayed with a
drop-down list box.
Users click arrows to
view the entries. They
can then click the one
they want. Combo
boxes have border,
width, and placement
options. To resize the
combo box without
dragging it, change the
Width measurements.
To move the combo
box in the layout
region without
dragging it, change the
Left and Top
measurements.

Allow
multi-values

Generating choices for lists


When you are defining a list field, choose one of these options on the
Control tab of the Field Properties box for generating the list.
Note that only the Dialog list type contains all of the following options.
The Checkbox, Radio button, Listbox and Combobox types contain only
the first two of the following options.
List field option

Description

Enter choices (one per line)

Type a list of choices in the edit box. Select Sort to


display the list in alphanumeric order. Click the
green check mark to save your entries. Choices
can contain letters, numbers, and all punctuation
characters except commas.

Use formula for choices

Type a formula in the formula window to


generate a list of choices. Click the green check
mark to save your entries.
continued

Designing Fields 6-25

List field option

Description

Use Address dialog for


choices

This option displays the Names dialog box so


users can select names from a Personal Address
Book or Domino Directory. Click Look up names
as each character is entered to help users fill in a
name quickly. Notes looks up a match for the
typed letters in the open Address Book or
directory.

Use Access Control list for


choices

This option brings up a list of people, servers,


groups, and roles in the access control list for the
database.

Use View dialog for choices This option brings up a dialog box containing
entries from a column in a view. Select the
database to look up, select a view, and select a
column number.

Use View dialog for choices


Looking up values in a view lets you retrieve data from databases. This is
convenient for displaying choices that change, such as customer names,
sales territories, and job titles.
View lookups provide the following benefits:

Non-designers can maintain choices without having access to the rest


of the database design.

Designers can avoid hard-coding choices into fields. This makes


verification and maintenance easier.

Designers can hide the design of the database without affecting


maintenance of choices.

Designers or administrators can customize the application or


conveniently translate lookup information to other languages.

Users can review choices and codes more conveniently from outside
the form or application.

Note Use lookups sparingly because they adversely affect the


performance of the application.
To retrieve information from Domino or non-Domino databases you can
use @DbColumn and @DbLookup formulas instead of using a View
dialog lookup.
For more information on @DbColumn and @DbLookup, see the Domino
Designer Programming Guide.

6-26 Application Development with Domino Designer

Examples: Creating a field to display a list of choices


You want to make it easy for users to include a product number when
they fill out a Purchase Request. Create an editable Dialog List field
named ProductNumber and use the Use View Dialog for choices
property to generate choices.
You select the Inventory Database, the By Product Number view, and
Column 1, where product numbers are listed.

@If(Location="Europe";"France":"Germany":"Italy":"Spain";Loc
ation="Far East";"Japan":"Singapore":"South
Korea";Location="North America";"Canada":"Mexico":"United
States";"")

Creating aliases for choices in a list


You can create aliases for choices, so that if the word itself changes, any
formula referencing the field still works. You can also create short aliases
for long words to keep formulas more concise. Aliases are also useful if
your application is to be translated, since only the choices themselves
need to be translated and formulas dont need to be rewritten. Enter the
alias using | (a vertical bar) followed by the alias. For example, A is the
alias for All in this entry:
All | A

If you use aliases, the leftmost name is displayed in the document, but
the rightmost name is stored internally.

Converting aliases to full category names


If you are creating a view with a categorized column that refers to choice
list fields, you need to be aware that the view will use the alias name as
the category rather than the value that users see in documents.
For example, a field named RequestType contains the following choices:
Hardware Request | HW
Software Request | SW
Service Request | SVC

In a categorized view, the categories display as:


HW

Designing Fields 6-27

Building Applications

Creating a formula-generated list


A Travel Request form contains an editable Listbox field called Country
that uses the following formula to show only those countries relevant to
the location selected by the user:

SW
SVC

This can be confusing to users. To display the full names as category


names, you must use a hidden field or column formula that converts the
aliases back to their full names. For example, the following is a column
formula for the view to convert the alias back to their full names for
display in the categorized column:
@If(RequestType="HW";"Hardware Request";RequestType="SW";
"Software Request";"Service Request");

Example: Using aliases for choices in a list


You want Service Repair Requests to have a field for product groups.
Create an editable dialog list field called Product and on the Control tab,
select Enter choices (one per line). Include aliases, so that if the product
groups change, any formula referencing the alias still works. Enter this
list:
Microwaves | 1
Ovens | 2
Refrigerators | 3
Specialty Items | 4
Toasters | 5
Columns that refer to list fields use the alias names in the view, not the
word seen by users in the document. To display the contents of the
Product field in a view, you need to use a hidden field or column
formula that converts the alias name to its long form:
@If(Product="1";"Microwaves";Product="2";"Ovens";Product="3"
;"Refrigerators";Product="4";"Specialty
Items";Product="5";"Toasters";Product="";"";"");

Password fields
A Password field is a text field that maintains a users privacy by
displaying each character a user enters as an asterisk on the screen. The
contents of the Password field are not secure, and the data is visible in
the Document Properties box from the Notes client. There are several
ways to secure the contents of a Password field. If you are using the
Password field as a method for securing an application, the best way to
secure the contents of a Password field is not to save the contents after
the entry is verified. This can be done using a formula that clears the field
once its been verified. You can use the input translation event or a
LotusScript QuerySave event.
6-28 Application Development with Domino Designer

Example: Using an input translation formula


This formula is an input translation formula for a Password field. When
the user enters a password, Domino looks up the user in the Domino
Directory and gets the users HTTPPassword field. Then, it compares the
value that the user inputs into the field with the HTTPPassword field. If
the values match, it presents a prompt saying You passed. If the values
do not match the prompt says You entered an incorrect password.

REM "This compares the value above to the value the user
entered after running it through the @Password hash function
and prompts the user whether they typed in a valid password
or not.";
@if(@isError(x);@Prompt([OK];"Error";"Error");@Password(Pass
word) = x;@Prompt([OK];"You passed";"You
passed");@Prompt([ok];"Password failure";"You entered an
incorrect password"));
REM "This deletes the password field.";
@Unavailable

Example: Using a QuerySave event


This script determines whether the Password field contains a password.
If it does it gets the name of the author of the document and puts the
abbreviated form of the name into the PublicEncryptionKeys field. This
effectively encrypts the Password field with the authors public key. This
does not involve a lookup to the Domino Directory to get the key. It is
retrieved from the users ID file.
Dim doc As NotesDocument
Dim db As NotesDatabase
Dim session As New NotesSession
Set db = session.CurrentDatabase
Set uidoc=Source
Set doc=source.Document
If doc.GetItemValue("Password")(0) <> "" Then
Set PkName = New
NotesName(doc.GetItemValue("Author")(0))
Call doc.ReplaceItemValue("PublicEncryptionKeys",
PkName.Abbreviated )
End If
Designing Fields 6-29

Building Applications

x:=@DbLookup("";"Server/Acme":"names.nsf";"($Users)";@Userna
me;"HTTPPassword");

Example 2: Using a QuerySave event


This script determines whether one or more password fields contains a
password. If one of the fields does contain a password, the script gets the
values from the Author field and the OtherEditors field (which might
contain a group) and expands the OtherEditors field so that it has names
and puts the abbreviated form of the name into the
PublicEncryptionKeys field. This effectively encrypts the password field
with the public keys for all unique entries in the two fields. This does
involve a lookup to the Domino Directory to get the keys for each of the
users listed, unless the only value is the name of the current user. If there
is more than one name to look up, then it finds the public keys from the
Domino Directory. If the only key to look up is the authors, it is
retrieved from the users ID file.
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = s.CurrentDatabase
Dim uidoc As notesuidocument
Set uidoc=source
Set doc = uidoc.document

If (doc.GetItemValue("Password1")(0) <> "") Or


(doc.GetItemValue("Password2")(0) <> "") Then
Call
doc.ReplaceItemValue("PublicEncryptionKeys",Evaluate(|@Name(
[Abbreviate];@Unique(Author:OtherEditors))|,doc))
End If

Formula fields
Formula fields are used to populate a subscription list, which works in
conjunction with the Headlines.nsf database. The Headlines database is
used as the home page of a Notes client. The Headlines database includes
a feature called subscriptions. Each database designer has the option
enabling a database for subscriptions. When a user subscribes to a
database (by choosing Create - Subscription), it triggers a server task that
will notify the user whenever a document of interest is saved in that
particular database. The criteria that the server looks for is contained in a
formula field on the subscription form. Although users fill out the
subscription form in the database they want to subscribe to, the

6-30 Application Development with Domino Designer

subscription documents are stored in users headlines databases (the


default is headlines.nsf) on their local client.

Another option for the formula field is to choose Literalize fields on the
Field Info tab of the Field Property box. When you select the Literalize
fields option, you are programming the formula field to accept the
formula you put in without compiling it. If you literalize a formula, the
field references must be: text, text list, number, number list, date, date
range, or date list. If the field referenced is of any other field type, it will
be left out as a field reference.
The following is an example of a formula for a formula field for which
Literalize is selected as an option:
Select (Names = ExampleNames) & (Numbers = ExampleNumbers) &
(Categories = ExampleCategories)& (Dates = ExampleDates)

If the current document has these fields and values:


Field

Value

ExampleNames

CN=Sara Ryan/O=Acme : CN=Jack Town/O=Acme

ExampleNumbers

1: 2: 3

ExampleCategories Arizona : Florida : New York


ExampleDates

[3/26/82]:[10/08/86]:[5/30/98]

Then the formula field will literalize to:


Select (Names = "Sara Ryan/Acme" : "Jack Town/Acme" ) &
(Numbers = 1 : 2 : 3) & (Categories = "Arizona" : "Florida"
: "New York") & (Dates=[3/26/82]:[10/08/86]:[5/30/98]

If you choose the computed option, the formula you enter must resolve
to another formula. This provides the ability to optimize complicated
formulas before they are saved. After the formula is evaluated, the
resulting formula is saved.
Designing Fields 6-31

Building Applications

If you want to create a custom subscription form for your database you
can start with the default subscription form, named $Subscription, in the
HEADLINES.NSF or HEADLINES.NTF database that is included with
Designer. First copy and paste the form into your database, then
customize it. When you customize a subscription form you must include
the formula field. The formula field on the $Subscription form is named
$HLFormula and is on the second tab of the tabbed table on the right
side of the form. The $HLFormula field is a computed field. If you choose
to keep the formula field computed, you write a formula that resolves to
a selection formula for a subscription list. A formula field must resolve to
a selection formula in order for the server to be able to retrieve the
subscription criteria for the user.

If the resulting formula is invalid, the field is saved with a value of type
error. In some cases, the user would never be able to exit out of the
document. To differentiate between success and failure, you should test
in the QuerySave event to determine if the Formula field is indeed a
formula. If it is not, then the computation did not result in a valid
formula.
For example, a computed formula field has the following formula:
tLitNames := "\"" + @Implode( ExampleNames; "\" : \"")
+ "\"";
tLitNumbers := @Implode( @Text(ExampleNumbers); " :
");
tLitCategories := "\"" + @Implode( ExampleCategories;
"\" : \"") + "\"";
"Select (Names = " + tLitNames + ") & (Numbers = " +
tLitNumbers + ") & (Categories = " + tLitCategories + ")"

If the current document has these fields and values:


Field

Value

ExampleNames

CN=Sara Ryan/O=Acme : CN=Jack Town/O=Acme

ExampleNumbers

1: 2: 3

ExampleCategories Arizona : Florida : New York

Then the formula will compile to:


Select (Names = "Sara Ryan/Acme" : "Jack Town/Acme" ) &
(Numbers = 1 : 2 : 3) &(Categories = "Arizona" : "Florida" :
"New York")

Editable and computed fields


You choose whether a field is editable or computed in the field properties
box, when you create the field. If a field is editable, a user can enter or
change the value of the field. If a field is computed, a formula calculates
the field value. Users cant change the values in a computed field.
Number, date/time, authors, readers, and names fields are usually
computed. Text, rich text, and choice list fields are usually editable.

6-32 Application Development with Domino Designer

Writing field formulas


You enter field formulas in the Script area of the Programmers pane.
First, choose the event for which you are providing the formula from the
Object tab of the Info List. For example, the default value event provides
an initial value for an editable field. If you include a Date field on a form,
you might want to enter a default value formula of @Today. This
populates the field with todays date.

For information on writing formulas for fields, see the Domino Designer
Programming Guide.

Computed field formulas


Computed fields are used to automatically enter data, such as the
authors name or the date, in a field. You can have more than one
computed field on a form. Computed fields require formulas to supply
their values. For example, you use a computed field to assign a creation
date to a document. Computed fields are normally recalculated when
users create documents, choose View - Refresh Fields, press F9, or save
documents. Selecting the field property Compute after validation is
useful when a field is dependent on values in other fields and you want
to be sure that the calculation occurs after those fields have been
validated.
When its important for users to see results as they proceed, you can
force each field to be calculated as its filled in by selecting the form
property Automatically refresh fields. This is useful when fields at the
bottom of the form are dependent on field values at the top. Be aware
that this property can slow down document display time if the form has
many computed fields.

Designing Fields 6-33

Building Applications

Use the Reference tab in the Programmers pane to access the list of
fields, @commands, and @functions. You can use the Reference list as a
shortcut for looking up @functions and @commands, and for pasting
them into the formula.

There are three types of computed fields:


Type of computed field

Formula calculates

Computed

A computed field formula calculates each time a user


creates, saves, or refreshes a document.

Computed when
composed

A computed-when-composed field formula calculates


only once: when the user first creates the document.
Use this type of formula in a field to preserve
information about the origin of a document, such as
the creation date or original author, or to create a field
whose original value never changes, such as a
document sequence number.

Computed for display

A computed-for-display field formula recalculates


each time a user opens or saves a document. Use this
type of formula in a field to display information that is
relevant only to the immediate session, such as the
current time or the results of calculations that you
dont need to save. The field value exists during the
current session only and is not stored. You cannot
display the contents of a computed-for-display field
in a view.

To create a formula for the value of a computed field


1. Select any type of computed field.
2. Select Value from the Objects tab of the Info List.
3. Write a formula, a field name, or a text string in quotation marks in
the Script area of the Programmers pane.
4. Click the green check mark to verify and save the formula.
5. (Optional, for computed or computed-when-displayed fields) To
delay computing until after validation formulas run, choose Design Field Properties and select Compute after validation on the Field
Info tab.
6. (Optional) To recalculate field values while users edit a document,
click the form and choose Design - Form Properties, click the Form
Info tab, and select Automatically refresh fields.
Note Automatically refreshing fields can slow down document
display time. A faster alternative is to write a LotusScript field event
to recalculate the document or update other fields when users move
from a specific field.
For information on writing formulas for fields, see the Domino Designer
Programming Guide.

6-34 Application Development with Domino Designer

Color fields
A color field lets you display a color picker on a form. When the user
clicks the down arrow of a color field, a color chart appears with two
tabs. The user can choose a color using either tab.

The RGB (Red, Green, Blue) value appears at the bottom of the
palette for each color. If you are using the Notes palette, the name of
the color also appears.

At the RGB tab, the user can either enter values from 0-255 for Red,
Green, and Blue or can use the RGB sliding arrows to choose a value
from 0-255. The mixed color appears in the box to the right of the
RGB values. The user can also use the color matrix bars at the bottom
of the pane to define a color.

Note that the user must be running in a color mode greater than 256
color to see the real color. If a user enters an RGB not in the palette and
the user is in 256 color mode, then the closest color in the palette will be
displayed for the RGB. The correct RGB will be stored and will appear
correctly on systems with greater than 256 colors.
The chosen color is stored in RGB hexadecimal format.

Time zone fields


A time zone field lets you display a drop-down list of all available time
zones in the world, including the local time zone. Each time zone listed
includes a partial list of the cities or locations found in that time zone.

Editable field formulas


You can write up to three formulas for each editable field:

The default value formula provides an initial value that the user can
change. Providing a default value for an editable field ensures that
the field gets filled in and often removes the need for users to enter
data such as their name or the date.

Designing Fields 6-35

Building Applications

At the Notes/Web tab, the user can choose from a Lotus Notes color
palette or a Web color palette. Note that the Notes tab becomes the
Web tab only if the user has enabled Use Web palette (File Preferences - User Preferences).

The input translation formula modifies the contents of a field after a


user fills it in for example, to correct typing or standardize the
format. Use an input translation formula to format information
entered by users for example, to make all entries uppercase. The
result of the formula replaces what the user entered. Input
translation formulas are evaluated each time a document is saved,
recalculated, or refreshed.

The input validation formula checks the contents of a field against


predefined criteria, making sure the entry meets certain
requirements. For example, use an input validation formula to
ensure that users fill in a required field. Input validation formulas
are evaluated each time a document is saved, recalculated, or
refreshed.

The input enabled formula enables or disable the field for input. If
Input Enabled evaluates to O, data cannot be added to the field. If it
evaluates to anything else, data can be added to the field.
Input Enabled appears in the Object list of the Programmers Pane
for all field types except rich text and rich text lite. Input Enabled
only works when the field style is set to Native OS.

To create a default value or input translation formula


1. Create an editable field.
2. Select Default Value or Input translation from the Object tab of the
Info List.
3. Write one of the following in the Script area of the Programmers
pane:
A formula
A field name
A text string in quotation marks
4. Click the green check mark to verify and save the formula.
To enter a literal text string, enclose it in quotation marks ( ). Field
names dont need quotation marks.
If you select the form property On Create: Formulas inherit values from
selected document when designing the form, use the default formula to
specify the field from which this new field inherits its value. When a new
document is composed with this form, the field value is copied from the
document that is currently highlighted if that document contains the
specified field.
An alternative to an input translation formula is to write a script for the
Exiting event that verifies information.
6-36 Application Development with Domino Designer

To create an input validation formula


1. Create an editable field.
2. Select the Input Validation event from the Objects tab of the Info List.
3. Write a formula in the Script area of the Programmers pane using
@Failure and @Success.
4. Click the green check mark to save the formula.

For information on writing formulas for fields, see the Domino Designer
Programming Guide.
Examples: Creating a formula for an editable field
Default value formula examples
The default value formula provides an initial value for an editable field.
You can set the value to a specific number or text string, or you can use a
formula. For example:
The formula

Returns

The number 0

@Now

The current time and date

@Name([CN];@Username)

The common name portion of a users


hierarchical name

Price

The value of the field named Price

Connecticut:New York:New A text list containing Connecticut, New


Jersey
York, New Jersey
Product + , + Department

The value of the field named Product,


followed by a comma and a space, and the
value of the field named Department

Example: Input translation formula


The following formula translates the text in the Attorney field for display
with initial capital letters. If a user enters the text john smith in the
Attorney field, it is translated to John Smith when the document is saved.
@ProperCase(Attorney);

The following formula gives documents a uniform look by capitalizing


the initial letter of the value in the Subject field and removing extra
spaces.
@Trim(@ProperCase(Subject));

Designing Fields 6-37

Building Applications

@Failure prevents the user from saving the document until the user
enters a value that meets the criteria. As part of the formula, include text
that clearly indicates what is wrong and how the user can correct it.

Input validation formula examples


Field criteria

Formula

User must enter a value


@If(Cost<100;@Success;@Failure(Cost must be
that is less than 100 in Cost less than $100.));
field
User must enter a value for @If(Subject = ; @Failure(You must enter a
the Subject field
subject for your document.); @Success)

Examples: Calculating a value for a computed field


Combining text and field values to create a message
The SchedDisp field, which displays only when users read or print a
document, can display two different messages depending on the value in
the Sched field. If it is a special, temporary schedule, the message
combines words with a text-based version of the value in the Date field.
If the schedule is permanent, the message is Regular schedule.
@If(Sched = "Special schedule"; "Special schedule for week
starting: " + @Text(Date); "Regular schedule")

Totaling monthly budget figures


The MonthlyTotal field in the Budget form is a computed Numbers field
that is formatted for Currency with two decimal places. The formula
totals the values in each category to calculate the total budget.
Advertising + Entertainment + Miscellaneous + Overhead +
Salaries + Travel

Subtracting, multiplying, and dividing in computed number fields


When you design a computed number field to subtract or multiply
editable fields on a form, give each editable field a default value of zero.
When you design a computed number field to divide editable fields, give
each editable field a default value of zero and use the following formula
to perform division in the computed number field:
FIELD DivisorFieldName := DivisorFieldName;
@If(@IsNewDoc & !@IsDocBeingRecalculated; (DividendFieldName
/ (DivisorFieldName + 1));(DividendFieldName /
DivisorFieldName))

Storing the date and time a document is created


Notes automatically uses internal fields to store the date and time a
document is created. To display this information, define a Time field that
is computed-when-displayed, and then write this formula for it:
@Created;

6-38 Application Development with Domino Designer

The field is defined as computed-when-displayed, rather than computed,


to avoid storing the creation date information twice.
Determining the normal work day age of a document
This field formula determines the age of a document in work days, based
on a five-day work week. In the following example:
DateCreated is a field containing the date when the document was
created. The fields data type is Date/Time, and it is computed using
the formula @Created.

Currentdate is a field containing the current date of the document.


The field data type is Date/Time, and it is computed using the
formula @Now. Because Notes sorts dates in seconds, you must
divide by (seconds per minute) * (minutes per hour) * (hours in a
day), which equals 86400.

Weekend_days is a temporary variable that contains Age of


document in days divided by Number of days in a week,
multiplied by Days in a weekend.
temp := (@Date(Currentdate) - @Date(DateCreated)) /
86400;
weekend_days := @Integer((temp / 7)) * 2;
wkday := @Weekday(DateCreated);
adjust := @If(((wkday + @Modulo(temp; 7) - 7) > 0); 2;
0);
working_days := temp - (weekend_days + adjust);
@If(Currentdate = ""; 0; working_days);

Selected field properties


Setting a tab order for a field
Tab order specifies the sequence in which fields become active when a
user presses TAB. By default, the tab order moves from left to right, top
to bottom. You can control the tab order by explicitly assigning a numeric
sequence to fields in the Tab key field on the Field Info tab of the Field
Properties box.

Using Notes Style or Native OS Style


If you choose the field property Notes style for an editable field, such
as Text, Authors, Readers, Names, or Number, the field appears as a
blank space marked off by brackets. The field expands depending on
Designing Fields 6-39

Building Applications

what is entered into the field. At the Control tab of the Field Properties
box, you can uncheck Show field delimiters if you do not want
brackets to appear at the beginning and end of the field.
If you choose the field property Native OS style for an editable field,
such as Text, Authors, Readers, Names, or Number, the field appears on
the document as an outlined box (whose height and width you can set)
instead of as blank space marked off by brackets. An editable Date/Time
field displays as a graphical date/time control. On the Web, native
controls are ignored and fields display in their default format. At the
Control tab of the Field Properties box, you can set a border style
(choosing no border, single-line border, or a border that displays the field
as inset) and can choose to display the field as multiple lines.
You can change the width and height of native controls, as described in
the following table.
Property

Choose one

Width

Fixed (Size) - lets you set a fixed width in inches.


Fit to window (%) - fits the field to the window as the
percentage you set.
Fixed (Characters) - lets you set a fixed width in characters.

Height

Fixed - lets you set a fixed height in inches.


Dynamic - increases the size of the entry box dynamically up to
3 lines. If an entry is longer than 3 lines, scroll bars display
automatically.
Proportional - sets the height proportionally to the width.

If you check Align controls baseline with paragraphs, the baseline of


the characters in the field is aligned with the baseline of the characters in
the paragraph containing the field. This setting is especially useful if you
have no border around the field. The text in the borderless field will be
on the same baseline as the text in the paragraph containing the field.

6-40 Application Development with Domino Designer

Automatically refreshing field values


Sometimes users must see the results of all field calculations as they work
on a document. To provide continuously updating information, design a
form that recalculates fields automatically whenever a field value
changes. Be aware this setting slows down a documents display and
data-entry time.

Automatically, by setting a form property that refreshes all keyword


fields as the user edits a document.

Automatically, by setting individual field properties to refresh based


on the event you choose. For example, you might set a keyword field
to refresh automatically when a keyword changes.

Manually, when a user manually refreshes a document.

For choice list fields enable the field property Refresh field on keyword
change on the Control tab of the Field Properties box, for better
performance on large documents with many computed fields. This field
property refreshes all the fields on a form only after a user selects a value
for a specific choice field that has the property enabled. The option
Refresh choice on document refresh refreshes the choice list choices
when a user refreshes the document by choosing View - Refresh. You can
also write a LotusScript field event to recalculate the document or update
other fields when users move from a specific field.

To refresh field values automatically


1. Open the form.
2. Choose Design - Form Properties.
3. On the Form Info tab, select Automatically refresh fields.
4. Save the form.

Making a field active by default


The first editable field on a form is the active field by default. You can
override this setting and change which field is active when a user creates
or edits a document.
Changing the default active field helps emphasize an editable field that
isnt located at the top of the form, or directs users to a field that is the
most frequently edited field on the form or to a required field that you
dont want users to miss.

Designing Fields 6-41

Building Applications

You can refresh field values in the following ways:

This option applies only to editable fields.


1. Create a field, or click an existing field. Then choose Design - Field
Properties.
2. On the Field Info tab, select Give this field initial (default) focus.

Hiding fields
Use hidden fields to perform interim calculations or to store information
you do not want users to see. In the Designer templates, hidden fields
appear at the bottom of forms, preceded by the heading Hidden fields.
Hiding fields is not a security feature. Users can see the value of hidden
fields on the Fields tab of the Document Properties box in the Notes
client. To keep the data fields safe, encrypt, rather than hide, the fields.

Hiding options
When you hide a field, you are actually hiding the paragraph on the
form that contains the field. If there is text, such as a field label or
graphics, in that paragraph, Designer hides them with the field. You can
hide a field and any associated text or graphic all the time or only at
certain times. For example, information useful only when users create or
edit documents can be hidden during reading, printing, and copying;
information that is used for display, such as a computed field that
displays the result of an authors choice in an editable choice list field,
can be hidden during editing.
The following are options for hiding fields:

Hide paragraph from Notes 4.6 or later


Information is hidden when the application opens on a Notes 4.6
workstation.

Hide paragraph from Web browsers


The information is hidden when the application opens on a Web
browser.

6-42 Application Development with Domino Designer

Mobile
The information is hidden for Mobile users.
Then

Previewed for reading

The hidden information isnt visible when


users read documents in the document
preview pane.

Previewed for editing

The hidden information isnt visible when


users work on documents in Edit mode in
the document preview pane.

Opened for reading

The hidden information isnt visible when


users open documents in Read mode. A
field that cant be read cant be printed
either.

Opened for editing

The hidden information isnt visible when


users work on documents in Edit mode.

Printed

The hidden information isnt visible on


printed documents.

Copied to the clipboard

The hidden information isnt visible when


information is copied to and pasted from
the Clipboard. This setting doesnt affect
documents copied at the view level.

Embedded

The hidden information isnt visible when


the document is an embedded document.

Hide paragraph if formula is


true

A formula determines the circumstances in


which information is hidden.

To hide a field
If you have computed fields that users dont need to see, or if you create
two fields one for display when reading and one for use when editing
you can stipulate when to hide the fields.
1. Select the field you want to hide.
2. Choose Design - Field Properties.
3. On the Hide tab, do one of the following:
Select Hide paragraph when document is: and click all
situations when users dont need to see the field information.
Select Hide paragraph if formula is true and write a formula in
the formula window on the Properties box to describe the
situations when users dont need to see the fields.
For more information on using a formula to hide a paragraph, see the
Domino Designer Programming Guide.
Designing Fields 6-43

Building Applications

If the paragraph is hidden when

Choosing Refresh fields when keywords change displays documents


faster than the form property Automatically refresh fields. It is useful
for showing or hiding parts of the form when you have hide-when
formulas that are dependent on values in the field.
Examples
To make documents more readable, you decide to modify the Marketing
Ideas form to show only the model name for the product that the author
selects.
The Models field is a radio button field that displays these choices for
refrigerator models:
Econo-Freeze
Icebox 2000
InstaFreeze
Premium
The Chiller
You hide the Models field when previewed and opened for reading.
You create a computed text field called SelectedModel and locate it
under the Models field. SelectedModel uses the value from the Models
field. You hide the SelectedModel field when opened for editing.
Now when users create a new document, all model names are shown.
When users read a document, they see only the model name chosen by
the author.

Creating a field in a layout region


If you are designing a field in an application that will be accessed by
Notes clients only, placing a field in a layout region allows you to display
the field value over text or graphics and limit the number of characters
users can enter in a field. In addition, creating certain date/time fields in
a layout region automatically displays calendar controls.

Creating an editable date/time field in a layout region with Display


date selected displays a calendar pop-up that users click to choose a
new date.

6-44 Application Development with Domino Designer

Creating an editable date/time field in a layout region with Display


time selected, displays a time control that let users pick a time by
sliding the selection bar to a new time. To make the time control a
duration control that lets users pick a range of time, specify that the
field can allow multi-values. Then, on the Advanced tab, choose
Separate values when users enter Blank Line and choose a
separator.

To create a field in a layout region


1. Open the form.
2. Click the layout region and choose Create - Field.
3. Choose Design - Field Properties and assign a name to the field.
4. Assign a field type and then select Editable or a computed option.
Note You cannot use the following field types in a layout region:
Color, Dialog List, Formula, Password, Rich Text, Rich Text Lite, or
Time Zone.
5. Drag the field horizontally or vertically to adjust its width and
height.
To create a field label
1. Choose Create - Layout Region - Text.
2. Click the text area, choose Design - Object Properties, and type a field
label in the Text box. Click the check mark.
3. Drag the text area above or to the left of the field and drag it to the
size you want.
4. Click the Font tab to change the text style for the label.
To resize a field
Placing a field in a layout region allows you to adjust the way field
values appear or to limit the number of characters users can enter in a
field. To resize a field, drag the borders of the field.

Designing Fields 6-45

Building Applications

Layout regions are not supported in Web applications.

Adding HTML attributes to a field


There are two places to attach HTML to a field. Use the Field Extra
HTML tab on the Field Properties box, or use the HTML Attributes field
event to attach HTML formatting attributes to editable fields. By adding
HTML code to a text field you can, for example, lengthen that field when
it is viewed through a browser.

To add HTML attributes using the Field Properties box


1. Double-click the field you want to format.
2. Select the Field Extra HTML tab on the Field Properties Box.
3. In the Other HTML tag field, enter the HTML code (without quotes)
for example, to resize a text field from its default size of 20):
SIZE=75 MAXLENGTH=100

The maxlength value defines the length of the text content a user can
enter into the field. Keep the maxlength value approximately 30
percent larger than the size value to enable a user to completely fill a
field with text.
4. Save the form.

To add HTML attributes using the field's HTML Attributes event


1. Click the field you want to format.
2. On the Objects tab of the Info List in the Programmers pane, select
the HTML Attributes event for the field.
3. Write the HTML code in quotes in the Script area for example, to
define a rich text fields properties:
"ROWS=10 COLS=20"

4. Save the form.

Storing HTML in a field


To pass HTML directly to the browser and force Domino to disregard all
other fields, add a field named HTML to the form. The field can be
computed or editable, but editable is preferable if you want to change the
HTML on a per-document basis. Use a text field if the HTML text is less
than 15K; otherwise, use a rich text field. Enter the HTML code as the
field value in the Script area of the Programmers pane or enter the
HTML in the field of the document you create using the form. Using
HTML in a field is similar to enabling the form property Render pass
through HTML in Notes, but converts only the field value to HTML, so
6-46 Application Development with Domino Designer

you can keep fields for Notes users on the same form. Web users see the
HTML information when they read documents, but they do not see the
HTML information when they edit documents.
1. Create a field named HTML.
2. Select Value or Default Value in the Programmers pane objects list.

4. Save the form.


5. (Optional) Create a document based on the form. In the editable
HTML field, write the code you want to display with this document.

Creating fields that inherit values


A field can inherit values from another document in the same database
or from another field on the same form. A field that inherits a value from
a field on the same form must be a computed field, placed below or to
the right of the field it is inheriting from. Use the parent fields name as
the value for the field formula. The form itself does not need the Inherit
field values property set. To inherit a field value from another form, a
Notes client user must have that form selected and a Web user must have
the form opened or referenced in the Domino URL command, for
example:
Http://server/db.nsf/InheritanceForm?OpenForm&ParentUNID=6b8
7e303374b19148525639a00506656

For more information on Domino URL commands, see the appendix


URL commands for Web applications.

To create a field that inherits values from another document


Create fields that inherit information from another document to save
users from unnecessary typing or to keep related documents consistent.
Open the form.
1. Choose Design - Form Properties.
2. (Optional) To display the parent document to end users in the
preview pane of the Notes client, click the Defaults tab, select On
Open: Show context pane and select Parent.
3. Select On Create: Formulas inherit values from selected document.
4. Create the fields that should inherit values.

Designing Fields 6-47

Building Applications

3. (Optional) Write the HTML code in the script area if you want to
present the same HTML code for every document created with the
form.

5. Write a default value or computed field formula for each field that
uses the parent document field name as the value. For example, to
inherit the FullName field, use FullName as the inheriting fields
formula.
Example: Inheriting address information
In a Customer Contacts application, a Letter form uses inheritance to
copy information from a Company Profile document. The Company
Profile contains name and address fields and a hidden field called
FullName. The Letter form inherits the values of the name and address
fields for the address block and uses the FullName field for the
salutation.
When Notes client users highlight a Company Profile document and
choose Create - Letter, the Letter is already filled in with the recipient s
name, address, and the correct salutation.
When Web users open the Company Profile document and click a button
to create a Letter document, the Letter is already filled in with the
recipients name, address and the correct salutation.

To create a field that inherits an entire document


You can create a field that inherits the full contents of a document. For
instance, a rich-text field in a new response document can automatically
inherit the entire contents of its main document. To create a document
that inherits the parent document a Notes client user highlights or opens
an existing document before creating a new document. The documents
do not need a main document/response document relationship. The
opened or highlighted document is assumed to be the parent document.
The parent document can be inherited in its entirety as rich text, as
collapsible rich text, or as a link. Displaying the parent document as
collapsible rich-text gives users the opportunity to review the parent
document, but doesnt clutter the form. To suppress inheritance a Notes
client user can press CTRL while choosing Create.
To inherit the parent document a Web browser user must open an
existing document before creating the new document. The options
Inherit as rich text and Inherit as collapsible rich text both inherit the
topic in its entirety into the new document. Collapsible sections and
inheriting as link are not supported on the Web. To enable Web users to
create a new document from an open document, you must provide a
form action to create a new document.
1. Open the form.
2. Create a rich-text field to store the inherited document.
3. Choose Design - Form Properties.
6-48 Application Development with Domino Designer

4. Click the Defaults tab.


5. Select On Create: Inherit entire selected document into rich text
field.
6. Enter or select the name of the rich-text field and select a document
display option.

To inherit information in a response hierarchy

Create a field on the main topic form and the response form named
Subject.

Make the Subject field on the main topic form editable so that the
user can enter the subject.

Make the Subject field on the response form a computed field which
uses the formula:
"Response to " + Subject

For more information on creating a response hierarchy, see Creating a


response hierarchy in the chapter Designing Forms.

Standard fields used in templates


The following fields are frequently used in the templates that ship with
Designer. You may want to follow the same standards in databases you
design to maintain consistency and make it easier to share information
between forms.
Field name

Field purpose

Body

Editable rich-text field that stores most of the information


in a document.

ComposedDate

Hidden, computed-when-composed, date/time field that


uses the formula @Created.

From

Computed-when-composed, Authors field that uses the


formula @UserName.

Subject

Editable text field that contains a one-line document


summary.

Designing Fields 6-49

Building Applications

If you have set up a response hierarchyresponse hierarchy, a response


can automatically inherit the subject of the main topic with added text
that distinguishes it from the original subject line. For example, if a user
creates a main topic with the subject New Product Ideas, then all
subsequent responses will have the subject Response to New Product
Ideas.

Predefined fields with built-in functionality


Designer provides predefined fields which automatically add
functionality that you would otherwise have to program yourself. For
example, to design a form with mailing options, you add predefined mail
fields such as SendTo and CopyTo to a form. Designer recognizes the
fields and provides the interaction with the mail router that routes and
delivers the mailed document.
If you try to use a reserved name in a way that is different from its
intended use or redefine the field, Designer displays an error message.

Reserved names for embedded elements


Reserved field name

Contains

$$ViewBody

An embedded view.

$$ViewList

An embedded folder pane.

$$NavigatorBody

An embedded navigator.

$GroupScheduleRefreshMode

A value for refreshing an embedded group


scheduling control.

$GroupScheduleShowLegend

A value of 0 or 1. If the value is 0, the color


legend does not display. If the value is 1, the
color legend does display. The default is 1.

Reserved fields for use in billing applications


Reserved field name

Creates a billing record when a user

$ChargeRead

Opens a document that contains this field.

$ChargeWrite

Creates, copies, edits, or saves a document that


contains this field.

6-50 Application Development with Domino Designer

Reserved fields for general use


Use

Categories

Categorizes documents.

$VersionOpt

Controls version tracking for documents.

FolderOptions

Puts new documents in folders.

SecretEncryptionKeys

Encrypts documents with secret, rather than


public, encryption keys.

HTML

Passes HTML directly to the server.

$$HTMLHead

Passes HTML information to be hosted within


the <HEAD> tag for a document. The passed
information might be meta data (using a
<META ...> tag) or JavaScript code (using a
<SCRIPT ...> tag) or CSS information (using a
<STYLE ...> tag).

$$Return

After Web users submit a document, Domino


responds with the default confirmation Form
processed. To override the default response,
add a computed text field to the form, name it
$$Return, and use HTML as the computed value
to create a customized confirmation.

Internal fields on forms


When a form is stored in a document, the form name is stored in the
internal field named $Title. To use a different form to display the
document, create an agent that deletes this stored form information and
designates another form to display the document.

Reserved fields that control mailing options


To build mailing options into a form, create fields that have reserved
names in Designer. When you create a field with one of these reserved
names, built-in programming takes care of the task for you. The fields
can be text or choice list fields that use predefined values.
For information on text fields, see the topic Text, rich text, and rich text
lite fields in this chapter.
For information on choice list fields, see the topic Creating fields to
display lists of choices in this chapter.
For information on editable and computed fields, see the topic Editable
and computed fields in this chapter.
Designing Fields 6-51

Building Applications

Reserved field name

For information about mail-enabling forms, see the topic Features that
support automatic mailing in the chapter Creating a Workflow
Application.

Table of fields that control mailing options


Reserved Field name

Values

BlindCopyTo

The name(s) of a person,


group, or mail-in
database.

Comments

CopyTo

The name(s) of a person,


group, or mail-in
database.

DeliveryPriority

L, N, H

Values correspond to: Low,


normal, or high-priority.

DeliveryReport

1,0

Use 1 to return a report when


mail is delivered to recipient.

Encrypt

1, 0

Use 1 to encrypt mailed


documents.

MailFormat

B, E, M, T

Enables cc:Mail users to view


Notes documents in a variety
of predefined formats:
B = both text and
encapsulated.
E = encapsulated in a Notes
database, which is attached
to the cc:Mail memo.
M = mail. Body field of
document is text and pasted
into cc:Mail memo.
T = text. Contents of the
document are rendered as
text and pasted into the body
of the cc:Mail memo.

MailOptions

1, 0

Use 1 for automatic mailing.

ReturnReceipt

1, 0

Use 1 to send a receipt when


document is opened by the
recipient.
continued

6-52 Application Development with Domino Designer

Values

Comments

SaveOptions

1, 0

Use 1 to save mailed


documents. Use 0 so that the
document is not saved when
mailed. prevent the
document from being saved.

SendTo

The name(s) of a person,


group, or mail-in
database.

Required for all forms that


mail documents.

Sign

1, 0

Use 1 to an add electronic


signature to fields. (Only
applicable if a form also
contains sign-enabled fields.)

Tip If you write a LotusScript program that uses the Send method of
the NotesDocument class or a formula that uses @MailSend, you can
include many of the above mailing options in the script or formula.
For more information on using LotusScript, see the Domino Designer
Programming Guide.
Interactions with the Mail Send dialog box
The MailOptions field with a value of 1 overrides the users choices in the
Mail Send dialog box if the form is set to enable optional mailing. With a
MailOptions field set to 1, users can click Yes to save the document, No
to close without saving, or Cancel to return to the document.
The Sign, Encrypt, and SaveOptions fields with values of 1 override the
property On Close: Present mail send dialog in the Form Properties
box, but they do not actually change what is displayed to users in the
Mail Send dialog box.
Interactions with the Document Save dialog box
The values in SaveOptions, Sign, and Encrypt fields override the users
settings in the Document Save dialog box.

Designing Fields 6-53

Building Applications

Reserved Field name

MailFormat
A computed MailFormat field can have one of the following values:
Value

Description

Encapsulated (E)

The document is encapsulated in a database, which is


attached to the cc:Mail memo. The cc:Mail recipient must
have the Notes client installed on the workstation. This
preserves the document exactly as it looks in Notes. To
read the document, the cc:Mail user double-clicks the
icon representing the attached database; this launches
Notes and opens the database. Use this format only if
information will be lost if the document were to be
converted to Text or Memo format. The Encapsulated
format creates larger documents, so it uses more server
disk space. To ensure that the document is displayed
correctly when a cc:Mail recipient starts Notes, assign the
form property Store form in document in the Form
Properties box.

Text (Text)

The contents of the document are rendered as text and


pasted into the body of the cc:Mail memo. The cc:Mail
recipient can read the document without using Notes.
Since the document is rendered as text, you do not need
to store the form in the document.

Both (B)

The document is both rendered as text and encapsulated


in a database. This ensures that cc:Mail recipients can
read the document even if they do not use Notes.

Mail (M)

The Body field of the document is rendered as text and


pasted into the cc:Mail memo. Use this format only with
documents that were created using a form that contains a
field named Body.

MailOptions
The MailOptions field with a value of 1 overrides the property On
Close: Present mail send dialog in the Form Properties box. With a
MailOptions field set to 1, users can click Yes to save the document, No
to close without saving, or Cancel to return to the document. To add the
mail signing and encryption options, create editable keywords fields
named Sign and Encrypt.
SendTo
The Allow multi-values and Allow values not in list are useful for
SendTo fields.

6-54 Application Development with Domino Designer

Examples: Fields that control mailing options


An editable SendTo field with a default value
You want to give users the name of the mail-in Employee Survey
database, and the option of mailing surveys to other people. Create an
editable SendTo field, select Allow multi-values, and write a default
value formula that includes the mail-in database name, enclosed in
quotation marks.

"Sandy Brown @ Marketing"

A formula that calculates recipients and sends a document


Approvers want to receive new travel requests from employees by
e-mail. On the Travel Request form of the Employee Expenses database,
create hidden text fields called SendTo, Subject, and Remark. The field
formula below calculates the names of approvers and sends the original
document as a link when the document is saved for the first time.
REM "Send mail to approvers the first time the doc is
saved";
REM;
SendTo :=@Unique(@Trim(ApproverName_1 : ApproverName_2 :
ApproverName_3));
Subject := "Travel Request for " + TravelerName + "requires
your approval";
Remark := "A Travel Request has been entered for " +
TravelerName + ". Your approval is required. Please
double-click the following link and approve or reject the
request.";
REM;
@If(@IsNewDoc & @IsDocBeingSaved; @MailSend(SendTo; ""; "";
Subject; Remark; "";[IncludeDoclink]); "")

Designing Fields 6-55

Building Applications

A hidden SendTo field with a single recipient


Sandy Brown needs to receive all documents saved in the Marketing
Statistics database. Add a hidden Names field called SendTo to the
Statistics form. The field formula contains the recipients name and
domain enclosed in quotation marks. The recipients domain is required
if the recipient isnt in the same Domino domain from which the
document is sent.

Fields for version tracking


Adding a $VersionOpt field to a form allows users to create new versions
of edited documents on a document-by-document basis.
To create a computed $VersionOpt field
Use a computed text field if you want each document created from a
form to have the same version control option.
1. Create a field named $VersionOpt and define it as a computed text
field.
Computed-for-display and computed-when-composed fields do not
work in this situation.
2. Select Value on the Objects tab of the Info List in the Programmers
pane.
3. In the Script area enter one of the following values:
Value

Type of tracking

No version tracking

New versions become responses if users choose File - Save As New


Version when they save a document

New versions automatically become responses when saved

Prior versions become responses if users choose File - Save As New


Version when they save a document

Prior versions become responses when saved

New versions become siblings if users choose File - Save As New


Version when they save a document

New versions automatically become siblings when saved

To create a choice list $VersionOpt field


Use a choice list field if you want users to be able to choose the method of
version control each time they create a document.
1. Create a field named $VersionOpt and define it as an editable dialog
list field.
Do not select Allow multi-values or Allow values not in the list.
2. On the Control tab select Enter choices (one per line).

6-56 Application Development with Domino Designer

3. Enter one or more of the following options:


Dont track versions | 0
Create response if File - Save As New Version is used | 1
Create response automatically | 2
Promote to main document if File - Save As New Version is used |
3
Create additional main document if File - Save As New Version is
used | 5
Create additional main document automatically | 6

Designing fields that prompt users to select folders


Adding a FolderOptions field to a form lets users select a folder for new
documents without having to choose Actions - Move to Folder after
saving. You can define the field so that users are prompted to choose a
folder or so that a document is automatically saved to the current folder.
1. Create a field named FolderOptions and define it as a computed text
field, computed number field, or an editable choice list field.
Do not select Allow multi-values or Allow values not in the list.
Computed-for-display and computed-when-composed fields do not
work in this situation.
2. For a choice list field, on the Control tab of the Field Properties box,
select Enter choices (one per line) and write each entry, using a
keyword and its equivalent synonym for example:
Choose folder from list | 1
Save in current folder | 2

3. For a computed field, select Value from the Objects tab of the Info
List in the Programmers pane.
For an editable field, select Default value from the Objects tab of the
Info List in the Programmers pane.

Designing Fields 6-57

Building Applications

Promote to main document automatically | 4

4. Write a formula in the Script area of the Programmers pane.


The FolderOptions field must contain the value or default value 1 or
2.
1 (Prompts user to choose folder)
This value prompts the user with the Move to Folder dialog box.
Selecting a folder and clicking Add puts the new document in a
folder. Selecting Cancel saves the document without putting it in a
folder.
2 (Save to current folder)
If the user is creating the document from an open folder, this value
saves and adds the document to that folder. If the user is not creating
the document from a folder, the document is saved but not added to
a folder.

6-58 Application Development with Domino Designer

Chapter 7
Designing Views

For information on importing or exporting views, see Appendix B.

Views
A view is a sorted or categorized list of documents. Views are the entry
points to the data stored in a database. Every database must have at least
one view, although most databases have more than one view.
Here are the general steps in planning your view.
1. Before you create the view, think about:
Whether the view style will be an outline view or a calendar view.
The type of view you want (shared, private, and so on).
Whether the view will be displayed on the Web. If so you may
want to consider creating an embedded view on a form, subform,
page, or document or consider creating a view applet or an
embedded view applet.
The categories in the view.
2. Create the view by clicking New View in Designer.
3. Name the view.
4. Add columns to the view.
5. Set up the documents to display in the view by writing the views
document selection formula.
6. Set up what will display in each column by programming the
column value.
7. Set up the sorting order for the columns.
8. Set the style for the view, row, and columns.
9. Save and close the view.

7-1

Building Applications

This chapter describes how to design views. Views help users find the
documents they want and serve as summaries of the database contents.

Folders
Folders are containers used to store related documents or groupings of
documents. Folders have the same elements as view and are designed
much the same way. For more information on designing folders, see
Notes Client Help.

Standard outline views


A standard outline view is a table of contents for a database and is the
most common type of view. It organizes documents by rows and
columns. Each column displays a type of information about the
document, such as author or date of creation. Each row displays selected
pieces of information from one document. One column in the view is
usually the organizing element for example, a column entitled Date
might organize the documents in chronological order. In a discussion
database, you might use a column entitled Topic to display the contents
of the Subject field for each document in the view. In a tracking database,
a column might show the customer or product name.
Here is the same view from a review database as shown through
Netscape Navigator and through Notes.

7-2 Application Development with Domino Designer

Building Applications
To open a document in a standard view, Notes users double-click a row;
Web users click a document link in one of the columns.
A standard view on the Web maintains the column and row format of
standard Notes views (unless you use HTML formatting to customize a
view), except that on the Web, a navigation bar on the top or bottom of
the screen contains buttons that users click to expand, collapse, and scroll
the view.
On the Web, each time a user opens, scrolls, expands, or collapses a view,
Domino converts the view to an HTML page. Each snapshot of the
view is a newly generated HTML page. The concept of a selected
document in a view in Notes does not apply to a view on the Web.
Displaying a view on the Web
By default, views are not enabled for display on the Web. For example,
the For Web Access properties of the Advanced tab of the View
Properties box are not enabled. If you want to create a view for the Web,
consider creating a view applet or embedded view applet, as these
options give you greater control over the view display.
For more information on designing views for Web applications, see
Displaying views in Web applications later in this chapter.

Designing Views 7-3

Limits for views


A view can display no more than 32 levels of responses and/or
subcategories. For example, if you have 6 levels of subcategories, you can
display 25 levels of responses to a main document. If there are more
levels of responses than can be displayed, convert your view to a
non-hierarchical, flat view, which displays all documents on a single
level (by deselecting Show response documents in a hierarchy in the
View Properties box).
The combined number of sub-level forms, views, and agents that cascade
from the top level cannot exceed 200; otherwise, the top-level menus do
not display properly. This limit does not apply to the number of forms,
views, and macros stored at the top level of each menu.
Domino allows up to 200 cascading view and folder names to be
displayed on the View menu.

Calendar views
A calendar view groups and displays documents in a calendar format.
Such views are useful for organizing documents that keep track of
schedules, meetings, and appointments.

When you create a calendar view, you can give users the option to
display the calendar in a variety of formats, such as Two-Day,
Work-Week, Week, Two-Week, or Month. Calendar views also let users:

Navigate among days, months, and years.

Print calendar entries for a selected range of days.

Web users can see all calendar entries. Domino converts calendar views
to HTML tables. Therefore, Domino restrictions for tables apply to
calendar views. Web users cannot create new appointments or scroll
through entries within a single day.
7-4 Application Development with Domino Designer

Building Applications

Shared and private views


There are two types of views: shared (available to many users) and
private (available to one person). You designate the view type when you
create the view and cannot change it later. A shared view can become a
private view on first use, but a private view cannot become a shared
view without recreating it as such.

Shared views
Shared views are available to any user with at least Reader access to the
database. Most views that you design for databases are shared views.
Users with Designer or Manager access can create shared views, as can
Editors for whom the manager has selected Create personal
folders/views in the access control list.
In addition to a basic shared view, you can create the following specific
types of shared views:

Shared, contains documents not in any folders

Shared, contains deleted documents (used in conjunction with


Allow soft deletions in the Advanced tab of the Database
Properties box)

Shared, private on first use

Shared, desktop private on first use (saves private views in users


desktop.dsk files rather than in the database)

Designing Views 7-5

Shared, contains documents not in any folders


A Shared, contains documents not in any folders view is useful if users
typically file most documents in folders. With this view, users can easily
find the documents that are not in folders.
Shared, contains deleted documents
A Shared, contains deleted documents view allows users to view a list
of documents deleted from the database. Users can recover deleted
documents by dragging them out of the trash to a folder. This view
assumes that the database manager has already selected Allow soft
deletions at the Advanced tab of the Database Properties box. The
Allow soft deletions property keeps deleted documents in the database
for a set number of hours. The hours are set by the database manager in
the Advanced tab of the Database Properties box. After that time, the
document is permanently deleted from the database.
Shared, private-on-first-use views
A Shared, private-on-first-use view begins as a shared view and
becomes a private view as soon as a user accesses and saves the view.
These views give you a convenient way to distribute personal views to
multiple users. You usually create this type of view by using @UserName
to customize the display for each user.
Note that this is the only way to make a view work with @username,
because the view selection is only parsed when the view is generated.
Thus, if Tom opened a shared view that keyed to @username, all of
Toms documents would display. But, if the view is still open when Jay
accesses it, Jay sees all of Toms documents, and does not see his own. So,
to avoid this conflict, designate the view as Shared, private on first use
when using @username in the selection formula.
After a user saves a shared-to-private view, the users copy of the view
no longer inherits design changes. For example, if you add a column to
the view, anyone using a private version of the view wont see the new
column. To obtain design changes, users must delete their private
versions of the view and open the shared-to-private view again.
Shared-to-private views are not a security measure, as they do not
protect data. If you create a shared-to-private view that omits certain
documents, a user can still create a private view that includes them.
Shared-to-private views are stored in the database as long as they are
shared. After the first use, Domino uses the Create personal
folders/views option to determine where to store the view.

7-6 Application Development with Domino Designer

Shared, desktop private-on-first-use views


If you want the shared-to-private view to be stored in a users
desktop.dsk file rather than in the database, choose Shared, desktop
private on first use as the View Type when you create the view.

Private views

If a user has rights to create private folders/views in the database access


control list, private views are stored in the Notes database. If the user
does not have the access control list right to create private folders/views,
the user can only create and save private views in the users personal
workspace file (desktop.dsk).
Private views are not supported on the Web.

Creating a standard outline view


To design a view, you must have Designer access in the access control list
of the database.
For information on database access, see the chapter Restricting Access to
and Securing Parts of an Application.
1. Open a database in Designer.
2. Click Views in the Design pane.
3. Click the New View button above the Work pane. The Create View
dialog box appears.
4. Enter a name for the view in the View name field.
5. Choose a View type in the View type field.
6. Select a location in the Select a location for the new view field.
If you want the view to appear at the top level in the list of views, do
not select anything in this field. Otherwise, click the name of the
view under which you want the new view to appear.
7. Click Copy style from, then do the following:
Click Blank if you do not want to copy another views style.
Click the view whose style you want to copy. If the style uses
selection by formula, the views selection criteria appears in the
Selection criteria field.

Designing Views 7-7

Building Applications

Users can create private views to organize documents in personalized


ways by choosing Create - View.

8. (Optional) When Select by formula is checked, you can use the


Fields and Functions button and Formula window button to further
refine the new views selection criteria.
9. Click Save and Customize to open the View pane. Or, click OK to
create the new view, then double-click the new view in the Views list
to open it.
The Column Properties box opens automatically with the first
column of the view selected.
10. In the Column Info tab, enter a name for the column in the Title field.
You can also specify other properties of the column in this tab.
11. Click the Column Title tab to determine the font, size, color, and
alignment of the column title. Click the Font tab to do the same for
values that display in the column.
12. Add other columns by choosing either:
Create - Insert New Column to create a column to the left of the
highlighted column.
Create - Append New Column to add the column to the right of
all existing columns.
13. Click each column in the Work pane. In the Programmers pane, add
programming to determine the column value. For example, a column
can list the creation date or the size of each document.
14. Click the current view in the Objects list and expand it. Select View
Selection and add programming for the views document selection.
15. Choose Design - View Properties and click the Style tab to style the
view.
16. Close and save the view.

Copying and deleting views


To copy a view
1. Click Views in the Design pane.
2. Select the view you want to copy, either in the design pane or in the
work pane.
3. Choose Edit - Copy.
4. Choose Edit - Paste.
A copy of the selected view appears in the list of views. Until you
rename it, the copied view is named Copy of <selected view name>.
Future copies of the same view will be designated Another copy of
<selected view name>.

7-8 Application Development with Domino Designer

To delete a view
1. Click Views in the Design pane.
2. Select the view you want to delete, either in the Design pane or in the
Work pane.
3. Press the DEL key or choose Edit - Delete.

Creating a default design for new views

1. In Designer, open up the view or folder you want to use as a


standard. You must use a shared view or folder, not a private one.
2. Choose Design - View Properties.
3. Click the Options tab.
4. Select Default design for new folders and views.

Designing folders
Folders are containers used to store related documents or groupings of
documents. Folders have the same design elements as views. You can
design folders in much the same way as views, using the Create - Design
- Folder command. The difference between folders and views is that
views always have a document selection formula that collects and
displays documents automatically. A folder remains empty until users or
programs add documents to the folder.
Note that Web users cannot drag documents into folders.
For more information on folders, see Lotus Notes 6 Help.

Naming a view or folder


The name you choose for a view or folder is visible to Notes users in the
View menu (unless the view is hidden) and in the folders pane. The view
name is visible to Web users in the Views list.
Naming tips
Keep these things in mind when naming views:

The name is case-sensitive and can be any combination of characters,


including letters, numbers, spaces, and punctuation.

The full name, including all aliases, can have up to 64 characters.


Designing Views 7-9

Building Applications

To save design time, designate a view as the standard for newly created
views or folders in the database.

Views appear in alphabetical order in the View menu in Notes and in


the View lists on the Web. To force names to appear in a different
order, number or letter them. For example:
1. Zebra
2. Antelope
Note Using an outline to organize views gives you greater control
over the order in which views display.

If you start a name with a hyphen (-), the name appears before both
numbers and letters.

When possible, assign a name that indicates how the view sorts
documents for example, By Company Name or All by Category
or specifies which documents it includes, for example, New
Customers.

Use consistent names across databases to make it easier for users to


recognize views.

Aliases
An alias is another name, or synonym, for a particular view or folder.
Use an alias to change or translate the view name without causing
lookup formulas that reference the view to stop working if the view
name is changed. Aliases follow the same naming rules as view names.
Note If you are designing a multilingual database, limit yourself to one
alias per view.
Enter an alias in the Alias field of the Info tab of the View or Folder
Properties box. You can append more than one alias by entering the
vertical bar symbol (|) followed by the alias. Make sure you keep the
original alias as the rightmost name.
Main View | Top View | View1

Hidden views
When you surround a name with parentheses for example, (All) the
view does not appear to Notes users in the Notes View menu or to Web
users or Notes users in the list of folders and views.
Caution Users can see hidden views by holding CTRL+SHIFT while
selecting View/GoTo. Hiding a view is not a security measure, but
simply a design option.
For other ways to hide views, see Hiding a view later in this chapter.

7-10 Application Development with Domino Designer

By Author
By Date

You can rename the views or folders and omit the repeated word, but in
some cases the word is needed to make the names understandable.
Authors
Dates

If you cant change the names, you can specify a shortcut by typing an
underscore before a letter to make that letter the shortcut. For the By
Date view, you can make the letter D the shortcut in this way:
By _Date

Cascading views
Creating cascading views lets you arrange lists of views in a hierarchy;
that way, a group of related menu items are organized under one item. A
user clicks on the higher-level name to display the cascaded list. You
probably want to cascade views when you have long lists of views or
when you have related views that should be grouped together.
To create a cascading view, enter the name you want to appear on the
Create menu followed by a backslash (\), and then add the view name.
For example, the Personal Address Book template has two views related
to servers:
Server\Certificates
Server\Connections

Designing Views 7-11

Building Applications

Shortcut keys
Windows users can type shortcut letters to select a view or folder. The
default shortcut, an underlined letter in a view name, is the first letter in
the name that has not already been used by a preceding name on the
menu. But if views or folders begin with the same letter, the default
shortcut is the first letter that has not already been used by a preceding
name. If views or folders begin with the same letter, the shortcut letters
may be difficult to see and remember. For example, the shortcut letters
(underlined) for these views are:

Selecting which documents display in a view


When you design a view, you can program it to show all documents or
only certain documents in the database. Most databases have one view
that shows all documents and other views that show a subset of
documents.
The default selection formula for new views combines the SELECT
statement and the @All formula into SELECT @All, which means
include all database documents in this view. To narrow down the
kinds of documents the view displays, add a program that displays only
particular documents. For example, in a task-tracking database, the Work
in Progress view could display only those documents whose Status field
does not contain Complete. In a brainstorming database, the Design
Ideas view could display all documents categorized as Design
Suggestion. Here is a selection formula that displays only documents
containing new features and displays them in a Whats New view:
SELECT @IsMember(01 Whats new?; View)

Choosing the type of view selection


With a view you program the document selection in the Programmers
pane. Choose View Selection in the Objects box, select the type of
programming you want to add, and build the program in the View
Selection pane.
Simple Search
Easy allows you to create a conditional document selection without
knowing a programming language. In the InfoList of the Programmers
pane, click the Run list box and select Simple Search. Then click Add
Condition for each selection you want to include. To delete a condition,
click it and choose Edit - Delete.
Formula
Formula allows you to create a program for selecting documents using
the @function formula language. In the Programmers pane, click
Formula and write the formula in the Script area.

7-12 Application Development with Domino Designer

Examples: Programming documents to display in a view


The following examples describe various scenarios for selecting
documents to display in a view.

SELECT Form ="Action Item" & Status="Open"

Selecting only non-response documents


To select only documents that were created with main document forms,
and exclude documents created with response or response-to-response
forms, use this formula:
SELECT !@IsResponseDoc

Selecting main and response documents


If a database contains an Action Item form, you can select all documents
that were created with the Action Item form, as well as responses to these
documents, using the formula:
SELECT Form = "Action Item" | @IsResponseDoc

Selecting documents not created with a specified form


The Databases by Title view in the Database Library template selects all
documents that were not created with the Librarian form using this
formula:
SELECT Form != "Librarian"

Selecting conflict documents


When two or more users make changes to the same document in
different replicas of a database, conflicts occur when replication updates
the databases. A database displays conflict documents as responses to
the original document. In order to resolve conflicts, you may want to
design a view that displays only the conflict documents.
To display conflict documents in a view, make sure the options Display
responses in a hierarchy is not checked on the Options tab of the View
properties box. Enter the following as the view selection formula:
SELECT @IsAvailable($Conflict)

Designing Views 7-13

Building Applications

Selecting documents by form name and field value


If a database contains an Action Item form with a Status field, a view in
the database can select all documents created with the form whose Status
field has the value Open. The document selection formula is:

Table of document selection conditions


Document selection conditions let you identify a particular set of
documents. You can combine multiple conditions to narrow down the
selection. Click Add Condition to see the full list.
For more information about these conditions, see the section
Descriptions of document selection conditions that follows.
Condition

Selection 1

Selection 2

By Author

is any of
is not any of

<author name> or choose from Domino


Directory

By Date

date created
date modified

is on
is after
is before
is not on
is in the last <n> days
is in the next <n> days
is older than <n> days
is after the next <n> days
is between
is not between

By Field

<field name>

contains
does not contain

<date field name>

is on
is after
is before
is not on
is in the last <n> days
is in the next <n> days
is older than <n> days
is after the next <n> days
is between
is not between

<number field
name>

is equal to
is greater than
is less than
is not equal to
is between
is not between
continued

7-14 Application Development with Domino Designer

Selection 1

By Form

<form name>

Fill out example


form

<example form
name>

In folder

<folder name>

Multiple words

any of the terms


below
all of the terms
below

Selection 2
lets you fill out a form with field values
to search for
search terms you specify

Description of document selection conditions


Simple search conditions
The Simple Search condition determines whether a field contains one
value. Because the Easy condition reads any separators you enter as text,
it cant look for all the values in a multi-value field.
The Simple Search condition also cant determine whether a particular
field is present in a document. You must click Formula and write a
formula to do that.
Selecting documents by author
Documents must have an Authors field for this selection method to work.
If you select By Authors, enter the name or names of the authors of the
documents you want displayed, separated by commas. If you know a
users hierarchical name (such as Mary Sen/Development/Acme), enter
it. If you are not sure of how a name is spelled, use the Domino Directory
to browse for person names, but do not select any group names.
For more information, see Addressing a message by choosing names
from an Address Book in Notes Client Help.
Selecting documents by date
The Date created condition selects documents based on the Created
date in the Document Properties box.
The Date modified condition selects documents based on the
Modified date in the Document Properties box.
Selecting documents by field value
If the field is of type Text, Designer looks for the exact text string you
enter. You cant enter (empty quotes) to select documents in which the
field is empty. You must click Formula and write a formula to do that.
For example, to select documents where the Research field isnt empty,
use this formula:
Designing Views 7-15

Building Applications

Condition

SELECT Research != ""

For example, to select documents that have the field Research, use the
formula:
SELECT @IsAvailable(Research)

By form name
The By Form condition works only with forms that are part of the
database design, not with forms stored in documents.
Caution If you add an alias to a form that is referred to in an existing
view or folder selection formula, the formula will not display documents
created or edited after the alias is assigned. You can fix this by modifying
the selection formula to include the alias, for example, changing the
selection formula from:
Form = "MyFormName"

to:
Form = "MyFormName" | Form = "MyFormAlias"

If you are using the Simple Search feature to select the form you can
resolve the problem in this way:
1. Open the view in Designer.
2. Inspect the View Selection formula in the Programmers pane.
3. Click the Add Condition button to reselect the form name to include
the new alias.
4. Save the view to update the selection formula.
Tip It is good design practice to assign an alias to a form at the time of
creation to avoid this problem.
Selecting main and response documents with a formula
By default, selection formulas include only documents of the type Main
Topic. You can include response documents in a selection formula
created with one of the simple functions above by editing the formula
Notes creates and appending the following:
| @IsResponseDoc

7-16 Application Development with Domino Designer

Creating columns in a view


Columns display one type of information about the documents listed
such as the document subject, author, or creation date. One column in a
view is usually the organizing element for example, in a chronological
view, the organizing column displays document creation dates.

A view can have a single column or as many columns as you can fit in
22.75 inches (the allotted width of a view).
To copy a column, open the view in Designer, click the column, copy it to
the clipboard, select the column to the right of where you want the
column to appear, and choose Edit - Paste. To select multiple contiguous
columns, select the leftmost column you want to copy, hold down the
Shift key, and select the rightmost column you want to copy. You can
now copy or delete the columns as a group.
To delete a column, open the view in Designer, click the column, and
choose Edit - Delete.

Adding titles to columns


A title is optional text at the top of a column that helps users identify the
type of information in the column. Assign a title using the Column
Properties box. The title can be a static text label, such as Subject or
Date, or a message such as Open a document below to see or change
the schedule. To avoid cluttering the view, dont include titles for every
column.

Omitting a title
If you leave the title blank, the column doesnt have any identifying text.
Omit a title if the column is:

A responses-only column that indents response documents

A categorizing column for grouping related documents

Hidden (and designers dont need any identifying text when the
view is Designer)

Not relevant to users

Designing Views 7-17

Building Applications

To add a column to a view in Designer, choose Create - Insert New


Column or Create - Append New Column.

Guidelines

Column titles can contain up to 80 characters in any combination of


letters, numbers, and punctuation.

To change the font, size, or color of a column title, choose styles from
the Title tab of the Column Properties box.

To allow long titles to wrap to several lines in Notes, set the Lines
per heading in the Style tab of the View Properties box to a number
greater than 1.
Note that long titles do not wrap on the Web. To prevent line wrap
on the Web, specify 1 in the Lines per heading setting in the View
Properties box. Domino converts this setting to a NOWRAP HTML
attribute. Specifying a number greater than 1 causes lines to wrap on
the Web. The same guidelines are true for the Lines per row
setting.

The number of characters that fit on one line depends on the font and
size you select, as well as the width of the column. If a title is not set
up to wrap to more than one line and the text is too long for the
width of the column, the text is truncated.

Setting styles for columns


When you create a column, you can set a variety of display options.
These options are available from the Basics tab of the Column properties
box.
Style

Description

Title

See Adding titles to columns.

Width

Determines how many characters fit in one


column.
(Optional) Select Resizable to allow users to
change the width as needed.
You can also click the column and drag the column
divider line to the width you want.
The first two columns in a calendar view cannot be
marked as resizable.

Resizable

Allows a user to change the size of the column.


Uncheck this if you want a fixed-width column.

Show responses only

Turns off the display of main topics and displays


responses only.
continued

7-18 Application Development with Domino Designer

Description

Display values as icons

Displays an icon associated with a numeric value


you supply.
See Displaying an icon in columns.

Multi-value separator

For any documents that display multiple values in


the column, separates each value with punctuation
or a new line.
If you choose new line as a separator, make sure
you adjust the number of lines/row to
accommodate the values or they will not all
display.

Use value as color

Allows you to programmatically apply an RGB


color to column text.
When this is checked, User definable is available
to allow users to specify colors. This requires an
entry in the Profile document field.
See Examples: Adding programming to columns.

Editable column

Allows users to edit values directly from the view.


The column value must be an editable field for this
option to be available.
For an example of this, see the calendar view in the
R6 mail template. Users can edit calendar entries
without opening a document.

Show twistie when row is


expandable

Displays collapse and expand icons for a


categorized view. In the Notes client, you can
supply your own image pair to create a
customizable twistie.
For details on creating the images for customizable
twisties, see Customizing the expand and collapse
icons.

Formatting date and time columns


To format values that result in a time or date displaying in a column ,
select the Data and Time Format tab of the Column Properties box.
When you select Use preferences from Users settings, the format for
dates and times depends on display settings for a computers operating
system. You can select a subset of display options to format date and
time values in a column. When you select Use preferences from
Custom, you have more control over how dates and time display. In
addition to the settings in the table that follows, you can override the
Designing Views 7-19

Building Applications

Style

date and time formats set by the operating system with formats you
specify. In this case, specifying a date with a format of day/month will
always display the date in that format, even on a computer where the
operating system default is a month/day format.
Option name

Selections

Description

Display Date All


Only month, day and
year
Only weekday, month
and day
Only month and year
Only month and day
Only year
Only month
Only day
Only weekday

If you do not want the entire date


displayed, you can select a subset of the
date information. Deselect Display
date if you only want time information
displayed.

Special

None
Show today when
appropriate
Always show 4 digit
year
Show 4 digit year for
21st century
Show year only if not
this year

Provides special instructions for


displaying the date. Select None to use
the default format. Show today
substitutes the word Today for
todays date.

Date format

month/day
month/year
month/day/year

The option is available if you have


selected Use preferences from
Custom. They are not available if you
have selected Use preferences from
Users settings. If you have an
international date format set in your
operating system, these choices change.
For example, they may change from
month/day to day/month.

Display Time All


Hours, minutes, and
seconds
Hours and minutes
Hours only

If you do not want the complete time


value displayed, you can select a subset
of information. Deselect Display time
if you only want date information
displayed.
continued

7-20 Application Development with Domino Designer

Selections

Description

Time format

hour:minute
hour:minute:second
All

If you have an international time format


set in your operating system, these
choices change. For example, from
02:30 changes to 14:30.
All is only available if you have
selected Use preferences from
Custom.

Time zone

Adjust time to local


zone

Adjust time to local zone displays the


time relative to the time zone of the
reader. A document created at 3:00 PM
in New York that is read by a user in
Los Angeles adjusts to Pacific Standard
Time; the creation time is displayed as
12:00 PM.

Always show time


zone

Always show time zone displays the


time zone where the document was
created. With this option, the creators
time zone is always shown. If a
document is created in New York at
3:00 PM, a user in Los Angeles sees the
creation time as 3:00 PM EST. A user
in New York also sees the creation time
as 3:00 PM EST.

Show only if zone not


local

Show only if zone not local displays


the time zone where the document was
created only when the document is read
by someone in a different time zone. A
document created in New York at 3:00
PM displays to all users in the U.S.
Eastern standard time zone as 3:00
PM. Users in all other time zones see
the creation date as 3:00 PM EST.

Displaying numbers in columns


To format values that result in a number displaying in the column, select
a style in the Number tab of the Column Properties box.

Decimal formatting displays numbers as they are entered; zeroes to


the right of the decimal point are suppressed. For example, 6.00
displays as 6. You can specify a fixed number of decimal places to
display (up to 15 places) or select varying to display a number as
entered.
Designing Views 7-21

Building Applications

Option name

Percent formatting displays numbers as a percentage. For example,


.10 displays as 10%.

Scientific formatting displays numbers using exponential notation;


for example, 10,000 displays as 1.00E+04.

Currency formatting displays values with a currency symbol and


two digits after the decimal symbol; for example, $15.00. The
currency symbol and thousands separator displayed are based by
default on settings in your operating system. To override those
settings, choose Custom in the Preferences for display formatting
section. You can then specify formatting and display options such as
a currency symbol and thousands separator.

Select Parentheses on negative numbers to display negative


numbers enclosed in parentheses; for example, display (5) instead of
-5.

Select Punctuated at thousands to display large numbers with the


thousands separator; for example, 1,000 in English, or 1.000 in
French.

Advanced options for columns


The Advanced tab of the Column properties box provides you with the
options for programming a column or for displaying the column values
as links on the Web.
Assigning a programmatic name for a column
The Name field displays a default name assigned to the column for
referring to the column in a script or formula. You can edit this name to
make it more descriptive. Take care editing a name assigned to a column
if you have already created formulas using the programmatic name
changing the name breaks all formulas that use the name.
You will need the programmatic name for the column to program the
InViewEdit event that allows users to edit documents from the view. For
more information on this feature, see Allowing users to edit or create
documents from a view.
Using the programmatic name assigned to columns by simple
functions
If you first define a column using a simple function, then you create
another column that depends on the value of the first, you must edit the
programmatic name of the first column to something other than a dollar
symbol ($) and a number. If you put $1 in a formula, it is evaluated to =
the quantity/value of 1. If you put $1 in the formula, it is treated as a
string rather than a variable, field or column name.

7-22 Application Development with Domino Designer

For example, if the first column in the view is the author (simple
function), with a programmatic name of $1 and you want the second
column to display something based on the value in column 1, you can
change the programmatic name of column 1 from $1 to $one and then
refer to the new programmatic name in the formula for column 2. For
example: @if($one = Mary Stone/Acme;READ THIS; ignore this)

Using a hide-when formula in a column


Use a hide-when formula to display a subset of documents based on
conditions in place when the view first displays. For example, to hide
documents from a particular user, click the Advanced tab on the Column
Properties box, check Hide column if formula is true, and enter
formula:
@If(@Name([CN];@Username) = "John Smith")

Note that because the formula evaluates when the view first displays,
you cannot use a hide-when formula to weed out documents matching a
certain condition. That is, if you write a formula that hides all documents
containing the word Confidential, the first batch is hidden, but
documents containing this word that are added subsequent to the first
display will appear in the view.
Caution Hide-when formulas are not a security measure. Users can still
get information by viewing the document properties. Use this feature as
a method for controlling the display of information in a view.
Note Because the ability to selectively hide a column based on a
formula is new in Designer 6, columns hidden in this way will display in
earlier releases of the client unless you also check the option Hide in
Notes R5 or before.
Hiding a column from R5 clients
When you check Hide column in Lotus Domino Designer 6, the
column will also be hidden when the application is accessed by an R5
client. If you check Hide column if formula is true in Designer 6, the
column will be visible when accessed by an R5 client because R5 did not
have the ability to selectively hide columns. If you are using the option to
Hide column if formula is true, check the option Hide in Notes R5 or
before.

Designing Views 7-23

Building Applications

The following column names assigned by simple functions are restricted


that is, you cannot use their programmatic name in a formula: # in
View column, Collapse/Expand, # Responses, or # Response levels.

To display column values as links in Web applications


To open a document from a view, Web users click a column that links to
the document. By default, Domino uses the leftmost column in a view as
the linking column, but you can change this default by designing another
linking column. After you set up customized linking, you cannot revert
to Dominos default behavior you must continue to designate at least
one linking column in that view.
1. Click the column(s) you want to display as linking columns.
2. Open the Column Properties box and click the Advanced tab.
3. Select For Web Access: Show values in this column as links.

Adding programming to columns


The values each column shows are determined by a program attached to
the column. The Programmers pane helps you add programming to a
column. Click the column you want to program, click the Simple
Function, Field, or Formula button in the Programmers pane, then build
the program in the Script area. Column formulas can consist of a
combination of @functions, @commands, field values, and text enclosed
in quotation marks.

7-24 Application Development with Domino Designer

Simple functions
Simple functions let you add programming without knowing a
programming language. The default selection for a new column is # in
View, which numbers documents according to their internal sequence
(for example, 3.1.2).

Field

Formula
Formula lets you create a program for a column using the @function
formula language. This is useful when you must process values in a
document (such as changing field values to a text value) or calculate a
value. Typical uses for formulas include converting field data to a text
value (because only text values display in columns), writing a formula
that displays an icon instead of a value, and adding text to field values.
Click the Field button or the Simple Function button to paste fields,
@functions, or @commands into the formula. Always convert
information to the data type that your formula expects. For example, to
append a numeric value to a text value in a column, use a formula like:
Product + ": " + @Text(Quantity)

Examples: Adding programming to columns


The following examples illustrate some common column programming
techniques.
Determining text, based on a field value
In a column, you can show custom text based on a condition or on a
number of conditions. For example, you can create a formula that
displays custom text if sales exceed a certain amount. This formula tests
the value in the Sales_February field (a number field) and displays text
based on that value:
@If(Sales_February>60000;"Great month!";"")

Determining text, based on the form name


The Subject column in the All Documents view of the Mail template uses
the following formula. It displays a subject line based on the form the
document was created with.
@If(Form = "NonDelivery Report"; "DELIVERY FAILURE: " +
FailureReason; Form = "Delivery Report"; "DELIVERED: " +
Designing Views 7-25

Building Applications

Field lets you populate the column with field values without writing a
program. This technique works only with text fields because columns
need a conversion formula to interpret other types of data dates, rich
text, numbers, or encrypted text.

Subject; Form = "Return Receipt"; "RECEIVED: " + Subject;


Form = "ReturnNonReceipt"; "NOT RECEIVED: " + Subject;
Subject)

Combining text and dates


You can combine text and field values in a column in a scheduling
database to add an explanation about the documents. The formula below
displays a text message and a date, with two variations that depend on
the value in the Sched field. The D1S0 part of the @Text formula is a
formatting option that removes clutter from the view by showing the
month and day portion of the date field only and omitting the exact time.
@If(Sched = "Special schedule"; "Special schedule for the
week of: " + @Text(Date; "D1S0"); "My regular schedule, as
of " + @Text(@Modified; "D1S0"))

Combining text and names


The following formula results in three possible results, based on the
status of a request:
@If(Status=Rejected;Rejected by + LastApproveName;
SignatureCount=0; Original Request;Approved by +
LastApproveName)

If the request has been rejected, the column displays Rejected by


and the name of the person who last signed the form.

If the request has no signatures (meaning that no approver has acted


on the request), the column displays Original Request.

If the request has been approved, the column displays Approved


by and the name of the person who last signed the form.

Showing when a document was created


The Created column in the By Author view of the Document Library
template uses the following formula to display the date on which the
document was created:
@Created

Expandable levels (variation on the simple function)


The simple function Collapse/Expand (+/-) uses @IsExpandable without
any arguments. If you want to display a plus symbol (+) when a
document has responses, but suppress a minus symbol (-) when
responses are expanded, use the formula:
@IsExpandable("+";"")

7-26 Application Development with Domino Designer

Displaying two field values in one column


To show peoples names and phone numbers together in one column,
create a column that is sorted in ascending order (the recommended
order for alphabetical listings). The following formula separates the two
field values with a blank space:
Name + " " + Phone

@If(Indent = 1; @Repeat(" "; 12) + Subject; Indent = 2;


@Repeat(" "; 18) + Subject; @Repeat(" "; 6) + Subject)

Numbering documents
In a By Author view, the following formula numbers (as in 1., 2., 3.) each
of the documents within each authors category:
@IsCategory("";@DocNumber("") + ". ")

If the row is a category (the authors name), @IsCategory returns a null


string (). If the row isnt a category, then the row represents a
document, and @DocNumber returns a string that represents the entry
number of the document. The documents full entry number is
something like 1.1, 1.2, 1.3, and so on, but when used with the null string
(), @DocNumber returns the rightmost component of the entry
number. The formula then adds a period and a space . after the
number.
Setting column colors programmatically
In Notes client applications, you can set a columns background color
and text color programmatically by selecting the Use value as color
option on the Info tab of the Column Properties box and then supplying
RGB coordinates in the Programmers pane as the value for the column.
Note This feature is not supported on the Web.

Designing Views 7-27

Building Applications

Creating fake indenting


When Notes indents response documents, the indentation is always the
same. If you want to make a document in a flat view appear indented
without using response documents, or display document titles in the
same column at different indentations, you can use a field on the form to
determine how much each document indents and use a column formula
that appends space characters to the document titles in the view. The
following formula indents documents in three different ways
depending on the value in the Indent field. For example, if the value of
the Indent field is 2, Notes prepends 18 space characters to the Subject of
the document in the column.

If you specify one set of coordinates (three numbers separated by colons),


the color defines the appearance of the text. If you specify two sets of
coordinates (six numbers separated by colons), the first set of coordinates
defines the background color for the column, and the second set of
coordinates specifies the text color.
Note Setting colors to -1:-1:-1 reverts to the view and column properties.
For example, the following formula example shows how RGB
coordinates can be used in both single and paired sets.
red := 255:0:0;
blue := 0:0:255;
yellow := 255:255:0;
pink := 255:193:253;
white := 255:255:255;
black := 1:1:1;
apricot := 255:155:133;
plain:= 0:0:0;
@If (category = "cats";blue:red ;subcategory =
"collars";pink;subcategory ="leashes";black:plain;0:0:0);

Note You do not need to define the color names you can enter the
numeric combinations directly into a formula. However, defining the
colors makes it easier to see what you are doing and reduces the
possibility of a typing error if you are using the same color more than
once.
You can also set the column value equal to a field value that supplies
RGB coordinates. You can use this feature in conjunction with the color
field to allow a user to set a color with a color picker. You can then apply
that color to a view component for example to the text in a column.
For information on using this feature to make view colors customizable,
see Allowing users to set colors in a view.

7-28 Application Development with Domino Designer

Table of simple functions for columns


The following simple functions (that is, functions that let you add
programming without knowing a programming language) can be used
with columns.
Function name

Description

Example

Attachment Names

Displays the file names of


document attachments. The
data type is a text list.

Attachments

Displays the number of files


attached to each document. The
data type is a number.

Author(s)
(Distinguished
Name)

Displays document author


name in hierarchical format, as
in Denise Lee/Research/Acme.

Author(s) (Simple
Name)

Displays the document author


name without its fully
distinguished format, as in
Denise Lee.

Collapse/Expand
(+/-)

Use in a column styled as a


Sorted/Categorized column or
one displaying documents
which have responses. Returns
a plus symbol (+) if the view
entry has descendants that are
not visible because the main
document is collapsed. Returns
a - minus symbol (-) if there are
no subordinate documents or if
subordinate documents are
currently visible. Useful when
a view contains a large number
of response documents.

Building Applications

Attachment Lengths Displays the file size of


document attachments. The
data type is a number list.

continued

Designing Views 7-29

Function name

Description

Creation Date

Displays the time and date a


document was created.

Last Modified

Displays the date when a


document was last saved.

Last Read or Edited Displays the last time and date


a document was read or edited.

Size (bytes)

Displays the file size of


documents.

# in View

Displays a number for each


document indicating its order
in the view. Responses are
numbered in outline style
under Main documents for
example, the first response to
the first main document is 1.1.

# of Responses
(1 Level)

Displays the number of direct


descendant (response)
documents for a document or
next-level subcategories for a
category.

# of Responses
(All Levels)

Displays the total number of


descendant (response and
response-to-response)
documents for a document or
subcategories for a category.

7-30 Application Development with Domino Designer

Example

Displaying an icon in a column


To make certain types of documents stand out in the view, display icons
instead of text in a column. The Combined Mail template uses icon
columns in the All Documents view to flag different types of documents:

You must select the column property Display values as icons.

You must use a column formula that results in a number that


corresponds to the icon you want to display from the table of
predefined icons, or you must enter the name of an image resource
as the value for the column.

Displaying a predefined column icon


The following formula determines whether a document has an
attachment and, if so, displays the attachment icon (number 5):
@If(@Attachments;5;0)

Use 0 as the false case when you want to leave the column blank. The
formula above returns 0 when the document has no attachments, so
nothing is displayed. A column can display multiple icons, so in this
example you might replace the 0 with a different icon value, or use
nested If statements to establish conditions for displaying various icons.
A column can display up to 10 different icons. All of the icons must be
predefined icons. Domino cannot display predefined icons and custom
icons in the same column.

Displaying a custom icon


To display a custom icon, create the icon as an image resource, then enter
the name of the image resource as the default value for the column. For
example:
"logo.bmp"

An image resource can be a GIF, BMP, or JPEG graphic. The


recommended size for a column icon is .2 inches wide and .18 inches
high. For information on creating an image resource, see Creating an
Image Resource.

Designing Views 7-31

Building Applications

An icon column has two requirements:

A column that displays icons cant display anything else, such as a plus
(+) sign for an expandable categories column. Also, a column can only
display one type of icon either a predefined column icon or a custom
icon, but not both.
Note Icons are accessible to vision-impaired users who use screen
reader software. The software reads the string names of the icons.
Custom icons display only on the Notes client; the Web client displays
the filename of the icon.

Table of column icons


The figure below shows the available column icons and their values. The
values for the icons in the first column are numbers from 1 to 20. The
value for any icon in the rest of the columns starts with the number
shown in the column heading, for example 41, and increments by 1 for
each row in that column.

7-32 Application Development with Domino Designer

Sorting documents in views

Views that display categories often use sorting methods to alphabetize


the category names.

Ascending and descending order


Columns sort documents in ascending or descending order:

Ascending order sorts in increasing order (where 1 precedes 2, A


precedes B, earlier dates precede later dates).
For example, to display documents from oldest to newest, create a
Date column that uses the Creation Date as its value and sorts
documents in Ascending order.

Descending order sorts in decreasing order (where 2 precedes 1, B


precedes A, later dates precede earlier dates).
For example, to display documents from newest to oldest, create a
Date column that uses Creation Date as its value and sorts
documents in Descending order.

Character sorting rules


After the ascending or descending order is set, characters are sorted in
this order:

Numbers

Letters

Accented letters

Punctuation/special characters

Case-sensitive and accent-sensitive sorting rules for Release 5 and greater


differ from sorting rules in previous releases in the following ways:

Both case-sensitive sorting and accent-sensitive sorting are turned off


by default (in previous releases, they were on by default).

Case-sensitive sorting sorts lowercase letters before uppercase


letters for example, ab sorts before Aa.

Accent-sensitive sorting sorts accented characters after


non-accented characters. For example, ab sorts before a.
Designing Views 7-33

Building Applications

Most views can benefit from a sorting method that organizes documents
in a way that makes sense to users. For example, a By Date view sorts
documents by their creation dates, and a By Author view sorts
documents by author names. To achieve this effect, designate at least one
column as a sorting column. Then define it as a user-sorted column, an
auto-sorted column, or both.

Sorting multiple values


If the sort column displays values from a multiple-value list, select
Show multiple values as separate entries to show each value as a
separate row. If you dont set this option, multiple values display as one
entry.
Caution If you set this option on a column that displays a multivalue
list, but you do not specify a sort order for the column, Designer displays
only the first value in the list. Also note that setting this option for
multiple columns in a view can have a serious performance impact on
your application.
Setting this option correctly on a sorted column may still not produce the
results you are expecting. In the following example, Julie has created a
document with a field containing the items apples and chickens. Bill has
created a document with a field containing the items bananas and ducks.
When you sort the Entry column in ascending order and specify Show
multiple values as separate entries, the following view results:

To list multiple entries from a document together, you must sort a


column to the left. In this example, sorting the Author column creates the
following display:

And finally, to streamline the display, you can categorize the Authors
column to produce the following:

7-34 Application Development with Domino Designer

Displaying a categorized view as flat


If your view is a categorized view built in Designer Release 5.0 or later,
you can select Categorized is flat version 5 or greater to convert your
view to a non-hierarchical, flat view, which displays all documents on a
single level. Use this feature if your level of indentation in a view exceeds
the limit of 32 levels.

Users see a triangle next to a column title whose values can be resorted.
Users click the column and choose a sorting method to see the
documents in the order they choose.

To set up a user-sorted column, select the option Click on column


header to sort on the Sorting tab of the Column Properties box. Then
select Ascending or Descending order, or select Both to allow users to
cycle among ascending sort order, descending sort order, and no sort
order for the column.

Auto-sorted columns
To set up automatic sorting, select the option Sort: Ascending or Sort:
Descending on the Sorting tab of the Column Properties box. The
sorting column is usually one that appears on the left side of the view.

Multiple sorting columns


To create multiple levels of sorting, designate more than one column as a
sorting column. For example, if a primary sorting column sorts entries by
date, a secondary sorting column might sort entries by author. Then all
documents created by one person on a particular date are grouped
together.

Designing Views 7-35

Building Applications

User-sorted columns

Using an auto-sorted column as the secondary sorting column


To add a secondary sorting column, add a column to the right of the first
sorting column and then choose Sort: Ascending or Sort: Descending on
the Sorting tab of the Column Properties box. Documents and responses
are sorted, then sub-sorted, in column order from left to right.
Designating a secondary sorting column for a user-sorted column
User-sorted columns override the sorting built into auto-sorted primary
and secondary columns. If the view has a user-sorted column and you
want to include secondary sorting, you can associate it with a secondary
sorting column. On the Sorting tab of the Column Properties box for a
user-sorted column, click Secondary sort column and choose the
secondary sort column and its sorting order.

Overriding alphabetical sorting with a hidden column


The sorting column does not need to be visible. Sometimes you may
want to use a hidden column as your sorting column. To hide a column,
check the Hide box on the Advanced tab of the Column Properties box.

7-36 Application Development with Domino Designer

For example, a Service Request form contains a Priority field, which uses
the following choice list:
Urgent
High
Medium
Low

You create a column that:

Is hidden

(Optional) Has no title

(Optional) Is one character wide

Uses this formula to determine the order of each priority:


@If(Priority="Urgent";"1";Priority="High";"2";Priority="
Medium";"3";"4")

Is sorted in ascending order

You add a column to the right of the hidden column that:

Is not hidden

Has the title Priority

Is 10 characters wide

Displays the value of the Priority field

Is not sorted

Using a column to switch to another view


To give users an easy way to see additional, related information that
doesnt fit in the initial view, use a column as an entry point to another
view. Users click such a column to open another view. To set this option,
choose Click on column header to sort on the Sorting tab of the
Column Properties box and choose Change to view as the sorting
option. Use the column title to alert users to this special kind of column.
For example, you can title the column Click here to switch to the By
Author view.

Designing Views 7-37

Building Applications

You want the By Priority view to sort documents by the value in the
Priority field, but you dont want them to appear in ordinary alphabetical
order (High, Low, Medium, Urgent). You want users to see
Urgent-priority documents at the top of the view, High-priority
documents next, and so on.

Generating column totals, averages, and percents


To display totals, averages, or percents for a columns numeric values,
click the Sorting tab of the Column Properties box and select a Totals
type other than None. Totals display in blue, unless you change the
Column Totals color on the Style tab of the View Properties box.
Totals calculate only for main documents; response documents are not
included. Because column totals recalculate each time you open the view,
they may affect database and overall server performance.
Total calculates a grand total for all main documents and displays this
total at the bottom.
Average per document calculates an overall average by totaling the
values of the main documents and then dividing that value by the
number of main documents. For example, if there are four documents
and their total is 10, the average per document is 2.5.
Average per subcategory calculates an average for each category. Within
each subcategory, the documents are summed; that value is divided by
the number of documents.
Percent of parent category calculates a total for all main documents. For
each category, Notes displays the categorys percentage as it relates to
the overall view total.
Percent of all documents calculates a total for all documents. For each
category, Notes displays the categorys percentage as it relates to the
overall view total.
To display totals without the clutter of extra numbers, select Hide detail
rows to suppress numbers other than totals or subtotals for each
category and subcategory.

Setting styles for a standard view or folder


To make a view or folder attractive and easy to use, consider the layout
of the view or folder and its columns and rows. View or folder, row, and
column properties work together to display colors, widths, fonts, and so
on. These view/folder style options are available from the Style tab of the
View/Folder properties box.

7-38 Application Development with Domino Designer

Option name Description


Choose a color for the view background. To set alternate colors
for rows in a view, choose an Alternate rows color.
Use Image option to specify an image resource as a view
background for Notes client users. Choose one of the Repeat
options to display a single copy of the image or to tile multiple
copies of the image for the view background.
Can also specify a formula for displaying an image based on a
certain condition. The formula evaluates when the view first
displays. Avoid using an animated GIF file.

Grid

Specify a grid style for the view. Use Color option to set a color
for the grid lines.
Non-resizable columns and response only columns do not
display gridlines. Categorized views, views with flat headings,
and views with simple headings only display horizontal
gridlines.

Header

Shows a bar at the top of the view with column titles in a beveled,
flat, or simple look. Beveledbackground is gray;
Simplebackground matches view color. Use the Color
options to set a color for the header. Use the Height option to
set a header height from one to five lines to specify how many
lines a column title can wrap. Useful for long column titles or
instructions placed in a column title.

Rows

Specify how many lines a column can contain. Increase this value
if you are using newline to separate multiple values in a view.
Shrink rows to content and setting a color for alternate rows
are useful accompaniments to multi-line rows. Row spacing
sets the vertical space between rows in a view. Default is
single-spaced rows.
Dont show categories suppresses the display of categories
with no documents. Colorize view icons colors the pre-defined
Domino view icons to match the header color.
Color options let you set colors for unread documents and for
column totals. Red is used in Domino templates for unread
documents. since Bold does not display in R5 clients, you can
specify an Unread color and check the Transparent option so
that R5 users will see unread rows in a color while Notes 6 users
see unread rows as bold.
continued

Designing Views 7-39

Building Applications

Body

Option name Description


Other

Shows the document selection margin. Deselect for


cleaner-looking rows. If you deselect Show selection margin,
users can still select documents by pressing and holding SHIFT
as they click document names. The selection margin appears
temporarily while documents are selected, and hides again when
all documents are deselected.
Hide selection margin border turns off the border separating
columns.
Extend last column to window width fills out the last column
to avoid empty space in the view. This makes view easier to read.

Margin

Sets margins for a view in pixels (1 to 100.) If you deselect Show


selection margin, users can still select documents by pressing
and holding SHIFT as they click document names. The selection
margin appears temporarily while documents are selected, and
hides again when all documents are deselected.
Use Color to set a color for the view margin. Useful for
off-setting a view with a contrasting background color.
Margin settings are not supported on the Web.

Display options for views


The Options tab of the View Properties box determines the initial display
of a view and specifies how users can access and interact with the view.

Setting the view as the default


If you want a view to be the first view displayed when the database
opens, check the Default when database is first opened option. This
only applies the first time the user opens the database. Subsequent
openings by the same user display whatever is set on the Launch tab of
the Database Properties box.

Using a view or folder as a template


If you want a view or folder to serve as a template, or model, for other
views and folders that you design in the same database, check the
Default design for new folders and views option.

Collapsing the view to show only categories


If you have a view that displays categories, you can show the view in
collapsed form every time users open it by selecting Collapse all when
database is first opened.

7-40 Application Development with Domino Designer

Organizing response documents in a hierarchy

Adding a view name to the View menu


To make the view available to users from the View menu in Notes, check
Show in View menu. In addition to this, or in place of in Web
applications, you should provide another means of accessing the view,
such as an action button, or a link from an imagemap or outline.

Allowing Notes users to customize a view


By default, a Notes client user can customize a view in a variety of ways,
including resizing and reordering columns or setting color options.
Changes users make are maintained when they close and reopen the
view. If you do not want users to customize a view, deselect the Allow
customizations in a view option on the Info tab. Note that deselecting
the option does not disable the user menu option to customize the view.
It does, however, disable all the options within that dialog except for
sorting. Sorting is retained as an available item for accessibility purposes.
Note This feature is not supported on the Web.

Evaluating formulas when documents change


A view can have associated actions, such as show/hide formulas, that
evaluate when a view is opened. There may be cases when you want an
action to evaluate every time a document changes in a particular view.
For these cases, check Evaluate actions for every document change. Be
aware that checking this option can have a serious impact on the
performance of your application.

Creating new documents at view level


Check this box if you are enabling a view so that a user can create a new
document from the view level. In addition to enabling this option, you
need to program the InViewEdit event for the column to specify what
should happen when the Notes client user creates a document.
For more information, see Allowing users to edit or create documents
from a view.
Designing Views 7-41

Building Applications

In an application such as a discussion forum, if you want response


documents displayed in a hierarchy, with each level of response
indented from its parent, check the Show response documents in a
hierarchy option. Otherwise, responses will display at the same level as
the main topics. If this option is checked but the view only contains
response document, no documents will display. Response documents are
only visible in hierarchical views when the parent document is
displayed.

Opening to a particular row in the view


To highlight a particular row when a user opens the view, click On
Open in the Options tab and select one of the following from the list:

Go to last opened document (the default choice)

Go to top row

Go to bottom row

Displaying the last-used view


If you select Restore as last viewed by user (one of the On Database
Open choices on the Launch tab of the Database Properties box), Notes
users see the default view the first time they open a database, and
thereafter they see the last view they opened. This option isnt available
for views opened by Web users.

Refreshing a view
The On Refresh options let you specify what a user sees when a view is
refreshed. For more information, see Refreshing view indexes.

Page breaks in a view


You cannot set page breaks for a view.

Adding categories to views


A category is a grouping of related documents. A view that displays
categories enables users to find those related documents. For example, in
an employee view, you can create a category called Ohio and include in
that category documents created by only those employees who work in
Ohio. A categorized view is neat and easy to scan. Users can collapse the
categories to display only the category names, and then expand
categories individually, or expand the whole view.

7-42 Application Development with Domino Designer

Building Applications

To categorize a view
1. Create a column to display categories.
2. Select the option Type: Categorized on the Sorting tab of the
Column Properties box. Choose a sort order of Ascending or
descending. (Ascending order organizes the categories in alphabetical
order and descending order in reverse alphabetical order.)
The resulting column, called a categorized column, groups
documents with matching values and converts the common value to a
category name. The column is usually one that appears on the left
side of the view. This column must always appear to the left of any
sorted columns.
Other options include:

(Recommended) At the Font tab of the Column Properties box,


choose a different color for column text and use bold face to make
categories stand out.

(Recommended) At the Column Info tab of the Column Properties


box, select Show twistie when row is expandable to display a
triangle that users click to see categorized documents.

(Optional) At the Options tab of the View Properties box, select


Collapse all when database is first opened to show only the
category names when users open the view.

(Optional) At the Style tab of the View Properties box, select Dont
show empty categories so that categories without documents are
not listed.
Designing Views 7-43

Generating category names


A categorized column derives its name from the programming attached
to the column. For example, to use creation dates or author names as
categories, choose @Created or @Author when you program the column.
A categorized column can also be set up so that the column gets its
values from a Categories field on a form.

Setting up a Categories field


You can produce a categorized column based on a Categories field. To
set up a categorized field, add a text or choice list field to the form and
name it Categories. A predefined list, user input, or lookup formula
can populate the field with values.
To categorize documents created with the form, choose Actions Categorize.

Setting up categories in advance


To set up a predefined list of categories, create a computed choice list
field and enter the category names as its values.
Converting choice list field aliases to full category names
If you base a categorized column on a choice list field that contains
aliases for the fields, those aliases are used as the category names.
For example, a RequestType field that contains the following choice list
fields displays the category names as HW, SW, and SVC:
Hardware Request | HW
Software Request | SW
Service Request | SVC
To display the full names of a choice list field that uses aliases, use a
hidden field or column formula that converts the aliases back to their full
names:
@If(RequestType="HW";"Hardware Request";RequestType="SW";
"Software Request";"Service Request");

7-44 Application Development with Domino Designer

Letting users create categories in the Categorize dialog box


To let users enter their own categories in the Actions - Categorize dialog
box, include an editable, multivalue, choice list field called Categories
on the form and select the field option Allow values not in list.

Examples: Generating category names


The following examples illustrate how to generate category names in a
categorized view.
Displaying the names of months
This formula is useful for a categorizing column that displays the name
of each month as a category name. Dates need to be converted to a text
value to be displayed in a view.
m :=@Month(@Created);
@If(m = 1; "January"; m = 2; "February"; m = 3; "March";m =
4; "April";m = 5; "May"; m = 6; "June";m = 7; "July";m = 8;
"August";m = 9; "September"; m = 10; "October"; m = 11;
"November"; m = 12; "December"; "")

To sort these in proper order, add a hidden column to the left of this
column that sorts documents in ascending order with the formula
@Month(@Created);

Adding subcategories to an All by Category view


In your Furniture Catalog database, you want to add subcategories,
indented under the main categories, to make documents easier to find in
the All by Category view. Subcategories are indented under main
categories automatically in a categorized column. You can have 32 levels
of subcategories.
The Categories field of the Furniture Description form is an editable
choice list field with the following entries:
Bedroom
Kitchen
Living Room

Designing Views 7-45

Building Applications

Generating dynamic lists of categories


To generate dynamic lists of categories, create a choice list field named
Categories. Then, use the @DbColumn formula to calculate values for the
field.

To add subcategories, rewrite the choice list choices as follows, update


existing documents, and refresh the view. A backslash ( \ ) after a main
entry denotes the subcategory name.
Bedroom\Beds
Bedroom\Dressers
Kitchen\Tables
Kitchen\Chairs
Living Room\Sofas
Living Room\Tables

Recategorize the documents that already exist to assign them to one of


the subcategories. You can do this manually by choosing Actions Categorize, and then typing the full subcategory specification
(Bedroom\Beds) into the Categories dialog box. If there are many
documents, create agents that set the new values for the Categories field
of each document.
Press SHIFT+F9 to rebuild the view index so documents display with
their new subcategory names.

Categorizing in the All by Category view


To let users categorize documents by selecting Actions - Categorize, a
database must have three components:
1. A form with a Categories field and these settings:
Field name: Categories
Data type: Editable text or choice list field
Select Allow multi-values
Format: If you selected a choice list field, leave the choice list
blank and select Allow values not in list
2. A view named All by Category
3. In the left column of the All by Category view, a Categories column
with these settings:
Width: 1 character
Column title: Leave the column title blank
Formula: Categories
Sort: Sort the column by selecting Sort: Ascending and Type:
Categorized

7-46 Application Development with Domino Designer

Indenting response documents


Indenting response documents beneath main documents is useful when
readers want to see the progression of a discussion. You can display 32
levels of responses, with each level indented three spaces under its
parent document.

Such a view requires that:

Users have access to response forms, whose types are Response and
Response-to-Response.

Show response documents in a hierarchy is selected in the Options


tab of the View Properties box and the document selection formula
uses SELECT @All or contains a formula that allows response
documents to be included, such as:
SELECT Form = Action Item | @IsResponseDoc

The view has a responses-only column. Create the responses column


directly to the left of the column under which responses are to be
indented. Leave its title blank, make its width 1, and select Show
responses only in the Column Info tab of the Column Properties
box. Write a column formula that displays information about the
response documents shown in the column, such as their authors or
creation dates.
Tip You should create only one response column in a view.
Designing Views 7-47

Building Applications

The following view in a discussion database displays the threads of a


discussion, organized by date.

Formulas for response columns


Responses-only columns need formulas that generate text summarizing
the response documents.
Tip You should create only one response column in a view.

Including information about the author


A discussion database could show the response document author, date,
and subject line with this response column formula:
From + " added this comment: " + Subject + " (" +
@Text(@Created) + ")"

to show a response this way:


Stephanie Mahar added this comment: Great job! (10/10/97 04:43:15
PM)

Tracking document status


In an employee information database, a response column could show
new employee surveys and exit questionnaires for departing employees
as response documents to the regular Employee Record in the Employees
by Name view. This formula shows two different messages depending
on the form that was used for the response document and also displays
the mailing status of the documents.
@If(Form = "Exit"; "Exit Form, "; "New Hire Information, ")
+ @If(Mailed = "Yes"; "mailed to employee " +
@Text(@Date(PostedDate)); "not yet mailed")

If the response uses an Exit form, the response row might look like this:
Exit Form, mailed to employee 08/26/97
If the response uses a New Hire Information form, the response row
might look like this:
New Hire Information, not yet mailed

Tracking the number of responses


You can use @DocDescendants to keep track of numbers of responses, so
authors can quickly see how many responses theyve received. This
formula for a main document column (not the responses column) is
helpful in response-style views.
Subject + " (" + @Name([CN]; From) + @DocDescendants(")";
", % response)"; ", % responses)")

7-48 Application Development with Domino Designer

If the document is a main document, the column displays the contents of


the Subject field, the author name, and the number of response and
response-to-response documents. If there is one response, the column
displays response. Otherwise, it displays responses. Main document
rows might look like this:
Need Help with Trade Show (Indy Montoya, 1 response)
Changing the Product Name (Sandy Braun, 2 responses)

To help users find new or modified documents, display the unread mark
(an asterisk) next to unread documents in the view. A set of unread
marks are maintained for each user, so even if one person has read a
particular document, the asterisk still appears for other users who
havent read it yet.

Choosing a style for unread marks


These options are set as a design property for a view. Open the
Advanced tab of the View Properties box, and select an Unread marks
option.
You can display unread marks as:

Standard (compute in hierarchy)


Displays asterisks for unread main documents and response
documents and for any collapsed categories containing unread main
or response documents.

Unread Documents Only


Displays asterisks only for unread main or response documents.
Unread marks do not appear next to collapsed categories. This choice
displays the view faster than the Standard display and is a good
compromise between showing unread marks at every level and not
showing them at all.

Choosing the option None omits unread marks.

Choosing a color for unread marks


To change the color of unread documents in the view from the default
color red, click the Style tab of the View Properties box and select another
color for Unread rows.
Checking the Bold property for unread rows displays unread documents
in bold. Note that Lotus Domino Designer R5.x does not support bolding
Designing Views 7-49

Building Applications

Identifying unread documents

of unread entries, so they will appear in a plain font for R5.x users. To
highlight unread documents in R5 while using bolding to highlight them
in R6, select a color for unread marks (which will be visible in R5) and
then choose the Unread Transparent option to make the color transparent
to R6 users (causing them to just see the bold font).

Disabling unread marks for modified documents


If the unread status of modified documents is unimportant to users or if
the database resides on a server that users dont access directly, turn off
unread tracking for all documents in a database to conserve disk
processing time. Open the Design tab of the Database Properties box and
select Do not mark modified documents as unread. This setting affects
all views in the database. Users see only new documents as unread;
modified documents do not appear as unread.

Default views
A default view is the view users see when they open the database for the
first time. Each database has a default view, which appears with an *
(asterisk) in the Views list.
The default view typically has unrestricted access and contains all
documents in the database, sorted by category, by date, or by author. In
the Designer templates, the default view usually includes all documents
in chronological order and shows main documents associated with
responses or supporting documents.
To specify the default view, use the option Default when database is
first opened in the Options tab of the View Properties box.

Allowing users to edit or create documents from a view


You can give Notes users the ability to edit fields in an existing document
or create a new document from a view. For example, you might use this
feature in a ToDo view to change a work item from Incomplete to
Complete. The Domino 6 mail template uses this feature to allow you to
enter an appointment into your calendar from the calendar view.
Note This feature is not supported for Web users.
Usage Notes
InViewEdit events will work for embedded views as long as the
Selection tracks mouse movement is not checked on the Display
tab of the Embedded View Properties box. InViewEdit events are not
triggered in an embedded view if this feature is enabled.
7-50 Application Development with Domino Designer

This feature is not supported in views from another database that are
embedded in a rich text field. For example, trying to create or edit a
document in a view from a discussion database embedded in a mail
message results in an error.

The InViewEdit event works for folders as well as for views.


However, if a user presses Ctrl-Click to create a new document in a
folder, the new document is created, but is not put into the folder.
Instead, it will appear in views for which it meets the selection
criteria. As with other cases, the document must be explicitly
dragged, moved, or added to the folder.
Note Users will be prompted to Ctrl-Click to create a document
when there is at least one document already in the view. If the
Ctrl-Click line on a view is not entirely visible, and there is no
vertical scrollbar to scroll down further, users can press Ctrl-End to
make it more visible.

To allow users to edit documents in a view


To let users edit an existing document without first opening the
document, you must first identify the columns containing user-editable
fields. Then you must supply code that controls what a user can do when
editing the associated field. You can mark more than one column as
editable. For each column you want to allow the user to edit:
1. Select the column that will display the editable field.
2. Choose Design - Column Properties.
3. Check Editable column on the Info tab (i) of the Column Properties
box.
4. Click the Inviewedit event in the View objects list in the
Programmers pane.
5. Enter code to control what should happen when a user edits the
field, as described in the programming topic InViewEdit event.
To allow users to create a new document from a view
1. Select the view from which users can create new documents.
2. Choose Design - View Properties.
3. Check Create new documents at view level on the Info tab (i) of
the View Properties box.
4. Click the Inviewedit event in the View objects list in the
Programmers pane.
5. Enter code to create the new document, set the form value and to
check and validate entries for the new document, as described in the
programming topic InViewEdit event.
Designing Views 7-51

Building Applications

Coding notes
There is only one InViewEdit event per view. The event is called
multiple times for each edit and uses a parameter called
RequestType to determine whether Notes should be providing
default information, validating data, or saving changes to documents
in the view.

More than one column can be marked as user-editable.

Use the programmatic name as set in the Advanced tab of the


Column Properties box as the name of the field that gets updated
when the column is edited. This will make coding the InViewEdit
event easier to identify the column you are marking as editable.

Code the RequestType parameter with a value of 4 to handle


document creation.

For a complete description of how to code the InViewEdit event, see the
Lotus Domino Designer Programming Guide.

Allowing users to set colors in a view


Designer allows you to set the color for a column programmatically to
visually differentiate documents in a view. You can use this functionality
to provide users with the means to set the color for documents in a view.
This feature can be extended to allow users to determine the colors for a
column by means of a generic profile a particular type of form to
set values in a database. For example, in the Lotus Domino Release 6
mail template (mail6.ntf) you can choose Tools Preferences, click the
Colors tab and associate colors with different senders to customize how
mail displays in your Inbox.
Note Because it relies on a generic, rather than a user-specific profile
form, the feature is only useful for a database with only one user, such as
a mail database or a personal journal.
1. Create a profile form in the database that creates one profile for the
database. Make sure you create a button, action, or agent that users
can run to create the profile document.
For information on creating a profile form, see Creating a profile
form.
2. Create two fields on the profile form. The first will be a color field
that users will use to select a color. The second field will be a formula
field set to hold either the value of the color field, or a formula that
evaluates to a color. The formula field must have the same name as
the programmatic name for the column in the view. For example, if
the columns programmatic name is $3, then the formula field on
the profile form must also be $3.
7-52 Application Development with Domino Designer

Note If you want the user to be able to set both a text color and a
highlight color, you will need two color fields, and the $3 field will
need to combine the two colors.
For information on creating a color field, see Color fields in the chapter
Designing Fields. For information on the programmatic name for a
column, see Adding programming to columns in this chapter.

4. On the Column Info tab, check Use value as color and User
defined.
5. In the field next to User defined, enter the name of the profile
form.
6. In the programming pane, choose Formula as the column value
and enter @All as the column formula.
Note The column formula can be any valid formula.
Setting the color value in the profile document
To specify a color for a column, the user must create a profile document
without a user name. Since this special type of form cannot be created
using the Create menu, you must supply a button, action, or agent the
user can use to create the document. When the document is created, the
user sees a color picker for the specified column.
For information on creating and editing a profile document, see Profile
forms in the Designing Forms chapter.
Example: Designing a column for user-customizable color
In an application that lists animal descriptions and allows users to set
color preferences, the following properties are set:
1. On the Options tab of the View Properties box, the Allow
customizations option is checked.
2. The first column of the view, named PD1 has the following options
set on the Column Info tab of the Column Properties box:
Use value as color is checked.
User definable is checked.
The Profile Document field has the value DEF
In the Programmers pane, the Column Value for PD1 is set to a
formula that offers some color choices:
Red := 255:0:0;
Purple := 128:0:128;
Designing Views 7-53

Building Applications

3. Select the view column you want to make customizable and choose
Design - Column properties.

Blue := 0:0:128;
DkGreen := 0:160:0;
Brown := 130:66:0;
PaleYellow := 255:255:208;
Tan := 224:161:117;
DefaultColor := 0:0:0;
3. The DEF profile document is coded as follows:
Color schemes for user customizable dialog colors:
Use this color for Koala:
Use this color for Giraffe:

Koalacolor]
[Giraffecolor]

Formula for view to read from profile doc:

[PD1 ]

Note Koalacolor and Giraffecolor are color fields which


automatically present a color picker to the user. The PD1 field is
critical PD1 is the name of the field and the programmatic name of
the column in the view/folder that uses the profile document. This
field ties the profile document to the column.
4. The PD1 field has the following formula as its value:
DkGreen := 0:160:0;
PaleYellow := 255:255:208;
@If(dialog ="\"giraffe\";"+"\""+GiraffeColor+"\""+";
(dialog=\"koala\");"+"\""+KoalaColor+"\""+";PaleYellow:D
kGreen)")

Note In this formula the color fields, KoalaColor and GiraffeColor,


return RGB color coordinates. These values needs to be passed to the
parser as a string thus the double set of quotes around the field
names. If the formula just specified GiraffeColor, the quotes would
be stripped off during parsing, and the result would be a numeric
coordinate instead of a string list. Therefore, the formula uses the
backslash and the quotation mark (\) to pass the quotation mark ()
to the parser as a character. If you are experiencing problems with a
formula, check that your quotes are done correctly.

7-54 Application Development with Domino Designer

Formulas that look for values in columns and views


Lookup formulas are useful in choice list field formulas to search for
values in another database or in the same database.

Referring to views in @function formulas

"By Author"
"View1"
"By Author\\Last Name"

Referring to columns in formulas


To refer to a column in an @DbColumn or @DbLookup formula, use the
column number, rather than its title. Columns are numbered from left to
right: the leftmost column is column number 1. Refresh the view to make
sure you see all its columns.
Some columns are not counted in a search, so skip them when youre
counting column numbers:

Skip any columns that display a constant value.


However, if a column contains a formula that happens to return the
same result for every document (so that it appears to be a constant
value even though it is not), the column does not display a constant
value. Include the column in your column count.

Skip any columns that consist solely of the following simple Notes
functions or @functions:
Collapse/Expand (+/-)
# in View
# of Responses (All Levels)
# of Responses (1 Level)
@DocChildren
@DocDescendants
@DocNumber
@DocParentNumber
@DocSiblings

Designing Views 7-55

Building Applications

To refer to a view in an @function formula such as an @DbColumn or


@DbLookup, use the actual view name or an alias, in quotes, or use the
full cascading name, with an additional backslash (\) so that Notes can
interpret the cascading name. For example:

@IsCategory
@IsExpandable
If you plan to use a lookup formula, such as @DbColumn or
@DbLookup, to retrieve data from a view, include a sorted column that
the formula can use as the lookup key.

Creating a calendar view


In a calendar view, documents that are created using a form designed for
scheduling individual meetings, appointments, events, and the like,
display as entries on a calendar. For an example of a calendar view, see
the R6 Mail template (mail6.ntf) $Calendar view, and for an example of a
calendar form see the form _Calendar Entry. It is best to create the form
first, and then create the calendar view to display the documents created
using the form.

To create a calendar view


You begin by creating a standard outline view. You can either complete
Steps 1 through 10 for creating a standard view or you can convert an
existing view to a calendar view.
1. Create a new view or open an existing view.
2. Open the View Properties box.
3. In the Style field, select Calendar. A dialog box appears. Click yes to
continue.
4. Click the first column. In the Column properties box, select Hide
column.
The first column of a calendar view defines the Date/Time the entry
will display and should be hidden.
5. In the Programmers pane, choose one of the following and enter a
value for the first column that will evaluate to both a date and time:
Simple function - Select a value from the list that evaluates to a
date and time for example, creation date.
Field - This displays a list of all the fields in the database. Select a
date/time field from the form you will use with the calendar
view.
Formula - Write a formula in the Programmers pane that
evaluates to a date and time.
6. Open the Column properties box and click the Sorting tab. Choose
the sort option Ascending.
7-56 Application Development with Domino Designer

Note If you have a field on your form that allows multiple values,
and you want each value to display as separate entries in the
calendar view, select the column sorting option Show multiple
values as separate entries for the first column. For example, the Mail
template uses this technique for displaying repeating events.
Otherwise, the entries display under the first matching date only.

Tip The column settings for this column allow you to specify
Always show time zone, but this setting (along with the other
column display settings) is not used by the calendar display. If you
want the time zone to always be displayed, add another (visible)
column to the view and put the time zone information in that
column.
8. Create a second column or click the second column of the existing
view. The second column must map to a field or formula on the
document that specifies, in minutes, the duration of the event and it
should be hidden. In the Column properties box, select Hide
column.
9. Create a view selection formula that will select the documents to be
displayed for example, _Calendar Entry.
Formatting options for calendar views
Once you create a calendar view, you can format it. Click the Date and
Time format of the View properties box. The Date and Time format tab
appears only when Calendar is selected for the view style. On the Date
and Time tab you have the following display options.

Calendar formats available to users


Check all of the display options you want to make available for
users to select. For example, if you want to give the user the choice
to view the calendar in a one month format or a one day format,
check those two options. Note that the Work calendars option
includes one work week, two work weeks, and the work month
formats. These are weeks that display without Saturday and
Sunday.

Initial format
Sets the format displayed to the user when the view first opens.

Time slot display available to users


A time slot is a graphical display of time periods in the view. If
Time slot display is selected, time slots appear in the view. If you
select this option then you must choose a start and end time for the
Designing Views 7-57

Building Applications

7. Click the Date and Time tab of the Column properties box and check
the Display Date and Display Time options.

time slots as well as the duration for example, one hour. If you
select the option Users may override these times, the users Notes
client calendar preference determines how time slots are displayed in
the calendar.
The option Users may toggle time slots on/off for each day lets a
user display and hide time slots for a selected day.

Other options
In weekly and monthly views, Group entries together by time slot
clusters entries under time slots instead of listing entries for a day.
For example, if you have two entries for 12 PM and one entry for 1
PM, the different displays are as follows:
Group entries checked

Group entries unchecked

12:00pm
Appointment 1
Appointment 2
1:00pm
Appointment 3

Appointment 1 12:00pm
Apppointment 2 12:00pm
Appointment 3 1:00pm

Troubleshooting a calendar view


If the calendar view does not display as you expect, there may be a
problem with the selection formula or with the definition of the first
column.

Check the selection formula for the view. Make sure the documents
you want to display in the view match the selection formula. To test
the selection formula, change the view to a standard view or refresh
the view while in Designer. If the documents display, the selection
formula is valid.

Make sure the first column of the view is based on a Date/Time field
and is sorted in ascending order. Display the documents in Designer
to test the view. Both the date and time should display. The
documents should display first sorted by date, and then for each
date, sorted in chronological order, so that a 9 AM appointment
displays before a 3 PM appointment on the same day.

7-58 Application Development with Domino Designer

Setting styles for a calendar view


Calendar views have different style options than standard views. Use the
options on the Styles tab of the Calendar view properties box to enhance
the presentation and usability of your calendar view.
Description

Body

Choose a color for the view background and the grid lines.
Use Image option to specify an image resource as a view
background for Notes client users. Choose one of the Repeat
options to display a single copy of the image or to tile multiple
copies of the image for the view background.
Can also specify a formula for displaying an image based on a
certain condition. The formula evaluates when the view first
displays. Avoid using an animated GIF file.

Header

Specify the type of header you want for the calendar view.
Choose None for no header, Plain for simple labels with
lines between them, or Tabs for a tabbed display. Use the
Background option to set a color for the header. The Display
list lets you choose what header components to display. Note
that you can now display the Trash and All documents folder
using this control.

Date area

Choose colors for the calendar background, the ToDo area, and
for todays date. Check the large numbers options if you want a
DayPlanner look for your calendar view.

Daily

When looking at a daily page, you can highlight work hours


with one color and non-work hours with another.

Monthly

When the calendar is displayed in 31-day format, sets the


background and text color for days that start a new month.

Entry

Choose a background color for entries and a color for unread


entries. Red is used in Domino templates for unread documents.
Specify how many lines an entry can contain. Increase this value
of Height (lines) if you are using newline to separate multiple
values in an entry. Shrink rows to content automatically
suppresses extra blank lines and Spacing sets the vertical
space between rows in a view. Show conflict marks displays a
conflict bar when two or more entries overlap or conflict in a
calendar view. Unread transparent provides backwards
compatibility for R5.x users who will not see unread marks in
bold if Bold is checked. Instead, they will see them in a color you
specify if Unread Transparent is checked.
continued

Designing Views 7-59

Building Applications

Option name

Option name

Description

Other

Shows the document selection margin. Deselect for a


cleaner-looking view. If you deselect Show selection margin,
users can still select documents by pressing and holding SHIFT
as they click calendar entries. The selection margin appears
temporarily while documents are selected, and hides again
when all documents are deselected.
Extend last column to window width fills out the last column
to avoid empty space in the view. This makes the view easier to
read.

Margin

Sets margins for a view in pixels (1 to 100). If you deselect Show


selection margin, users can still select documents by pressing
and holding SHIFT as they click document names. The selection
margin appears temporarily while documents are selected, and
hides again when all documents are deselected.
Use Color to set a color for the view margin. Useful for
off-setting a view with a contrasting background color.
Margin settings are not supported on the Web.

Displaying views in Web applications


Views and folders created in Notes may not have the same features on
the Web. For example, a view or folder will display as a full screen with
default navigation buttons on the Web.
To gain more control on the Web, consider using a view applet, an
embedded view or folder, or an embedded view applet. When you
embed a view or folder on a form, subform, page, or document, you
maintain the same functionality available in Notes applications, and you
control the size and appearance of a view or folder display. When you
define a view or an embedded view as a view applet, you preserve much
of the HTML view functionality and provide features such as resizeable
columns, multiple document selection, and scrolling.
Embedding a view or folder pane lets you combine views and folders
with other form elements (such as styled text) and graphics to create a
high-impact design. The Designer templates contain numerous examples
of forms designed in this way.
If you have multiple views or folder panes you want to display in an
application, you can create one or more view templates that control how
the embedded objects display. A view template is actually a special form
that provides the design structure for displaying the embedded folder
panes or views in an application.
7-60 Application Development with Domino Designer

Specifying how a view displays in a Web browser


To embed a view on a page, follow the steps in Creating an embedded
view or folder.
To control the display of a view in a Web browser
1. Open the view in the View work pane.
2. Choose Design - View properties.

Treat view contents as HTML


Use applet in browser
Allow selection of documents lets you specify whether users can
select multiple documents on the Web. Typically you would
enable this if your application included an action a user might
apply to one or more documents in a view for example, a Move
to Folder action.
For more information on displaying a view using HTML, see the topic
Using HTML formatting for views.
For more information on displaying a view as an applet in a browser, see
the topic Displaying a view as an applet in Web applications.

Creating an embedded view or embedded folder


When you embed a view or folder on a form, subform, page, or
document, you can control the size and appearance of a view or folder
display, especially on the Web. Embedding a view or folder pane lets
you combine views and folders with other form elements (such as styled
text) and graphics.
Before you begin, if there is any chance the view or folder you are
embedding could be renamed, assign an alias before you embed it to
avoid breaking the application if an embedded object is renamed.
For information on naming views and folders, see Naming a view or
folder.
1. Open a form, subform, or page in Designer, or open a document in
Edit mode.
2. Place the cursor where you want the embedded view or folder to
display.

Designing Views 7-61

Building Applications

3. On the Advanced tab of the View Properties box, choose one of the
following:

3. Choose one of the following:


Create - Embedded Element - View
Create - Embedded Element - Folder Pane
4. Views only: set a display option for the embedded view. You can
display the view using HTML, as a Java applet, or using the display
properties set for the view.
5. (Optional, for views) If you dont want to display the same view in
all circumstances, click Choose a View based on a formula. When
you click OK to close the dialog box, write a formula in the
Programmers pane to display the appropriate view.
6. (Optional, for views) You can specify a target frame on the Info tab of
the Embedded View Properties box. The target frame specifies where
the document is displayed when a user selects a document in an
embedded view with a single click or with the arrow keys, or with a
double click. You can specify a target frame for a single click (next to
for single click) and a target frame for a double-click (next to for
double click).
For more information on target frames, see the Framesets topic,
Specifying a target frame. Close and save the form, subform, page,
or document.
7. (Optional, for views) If the embedded view is in the current
database, you can select Show only current thread to display
documents for one thread that is, one main topic and all the
associated response documents.
8. (Optional, for views) Check Use views selection margin property
to maintain the margin settings you set for the view.
Tips
To delete an embedded view or folder pane, click the embedded
view or folder pane in the Work pane and choose Edit - Delete.

Domino prevents the view opening if there are create or read access
lists on a form in which views are embedded.

For compatibility with previous releases, the reserved fields


$$ViewBody and $$ViewList still work on forms.

When you embed a calendar view, the embedded view property


Disable scrollbars has no effect. Scrollbars for calendars always
display the horizontal scrollbar is used to change dates, and the
vertical arrows appear if there are too many entries to fit the vertical
space.

7-62 Application Development with Domino Designer

If you are embedding a calendar view, make sure the embedded


view has enough height to display as much of the calendar as you
want displayed. The user will not have a vertical scroll bar to move
lower in the view. Also, if the embedded view is too short, the
bottom footer indicating which week/month of the year is being
shown will not display.

After embedding a view, you can change the view by clicking the
Formula button in the Programmers pane, then clicking the View
button. You will see a list of views from the database where the
original embedded view came from. For example, if you embed the
Inbox view from your mail database, then you want to change the
view, your choices are limited to the other views in the mail
database. To embed a view from a different database, you must first
delete the embedded view and embed the view you want.

Setting display properties for an embedded view


After embedding a view on a page or form, you can set a variety of
display properties that control what users see.
1. Select the embedded view on a page or form and choose Element View properties.
2. Click the Display tab and specify any of the following display
properties:
Specify the dimensions for the embedded view in the Size section.
Show header shows the column names for the view.
Selection tracks mouse movement moves a selection box over
documents as you mouse-over them. If this option is checked,
show selection margin cannot be checked. Also, note that this
options is not available when a view is set to allow users to edit
document from the view.
Transparent background overlays the view contents on the page
or form background.
Show entries as Web links displays each view entry as a
clickable link.
Show Action Bar displays the action bar for the view for Notes
client users. This feature is not supported on the Web.
Show selection margin adds white space around the view for
Notes client users. If this option is checked, Selection tracks
mouse movement cannot be checked. This feature is not
supported on the Web.

Designing Views 7-63

Building Applications

Show Only Current Thread displays the parent and response


documents associated with the current document. This is useful in
a threaded discussion database.
3. Click the Border tab and specify display properties for the view
border.

To show a single category in embedded views


You can restrict an embedded view to a single category. However, for the
Show Single Category option to work, the embedded view must first
have been categorized . Note that the category name will not appear in
the embedded view. For example, if you check the Show Single Category
box for a category named Kitchen, the embedded view will not have a
line named Kitchen. Instead, you will see under Kitchen documents such
as Stove, Refrigerator, and so on.
Also, if the Show Single Category formula evaluates to an asterisk (*), all
categories are shown. This is useful if, for example, you want to restrict
an embedded view to a single category for Web users and show all
categories for Notes users.
1. Open a form in Designer.
2. Choose Create - Embedded Element - View. The Insert Embedded
View dialog box appears.
3. Highlight the view you want and click OK.
4. Choose Show Single Category as the event in the object list in the
Programmers pane.
5. Enter a formula to compute the category. The formula can make use
of information about the current user and information from the
current document (the one embedding the view).
Note You cannot use @Commands with Show Single Category.

To set line counts in embedded views


For embedded views, you can specify the number of lines to display in
the browser. Note that the line count property is ignored if you choose a
view applet to display the embedded view.
1. Create an embedded view.
2. In the Info tab of the Embedded View Properties box, enter the
number of lines next to Lines to display in the browser.
If you check Default, the embedded view acts in the same way it did
in previous releases, so that the line count value is controlled
server-wide from the NOTES.INI file.

7-64 Application Development with Domino Designer

In the Web server, you can determine the number of lines displayed by
looking (in order) at the following sources:
If the URL contains an &Count argument, use that number.

If there is no &Count argument, look at the number specified in


the Embedded View Properties box.

If no number is specified in the Embedded View Properties box, use


the server-wide default for the number of lines.

Designing a form as a view or navigator template


In Web applications, to create an association between a form and a view
or navigator, you can assign a reserved name to the form. Domino uses
the form as a template when users open the view or navigator. This can
be a good way to create a standard display for views and navigators in
your site.
Use the following reserved form names to create an association between
a form and a view or navigator.
Note that Domino requires an embedded view or the $$ViewBody field
on the form, but ignores the value.
Form name

Design element required and description

$$ViewTemplate for
viewname

Embedded view or $$ViewBody field. Associates the


form with a specific view. The form name includes
viewname, which is the alias for the view or when no
alias exists, the name of the view.

$$NavigatorTemplate for Embedded navigator or $$NavigatorBody field.


navigatorname
Associates the form with a specific navigator. The
form name includes navigatorname, which is the
navigator name. For example, the form named
$$NavigatorTemplate for World Map associates
the form with the World Map navigator.
Domino ignores create and read access lists on the
form.
$$ViewTemplateDefault Embedded view or $$ViewBody field.
Makes this form the template for all Web views that
arent associated with another form.
$$NavigatorTemplateDe Embedded navigator or $$NavigatorBody field.
fault
Makes this form the template for all Web navigators
that arent associated with another form.

Designing Views 7-65

Building Applications

Opening a view with a particular frameset on the Web


The Launch tab of the View Properties box lets you specify the frameset
and frame that a view or view applet should display in when it is
launched on the Web.
You can also specify target frames for a document that a user selects or
opens from a view or view applet.
For views, you set this property with the Target Frame (double click)
and Target Frame (single click) events in the Programmers pane.
For embedded views, you set the target frame property on the Info tab of
the Embedded View Properties box. The target frame specifies where the
document is displayed when a user selects a document with a single click
or with the arrow keys, or with a double click.

Using HTML formatting for views and columns


On the Web, you can override the default row and column settings for a
view by using HTML formatting attributes stored in a column. In Notes,
the view still displays as a standard view.
1. Open the view and choose Design - View Properties.
2. Click the Advanced tab select For Web Access: Treat view contents
as HTML.
3. Create a column.
4. In the Programmers pane, click Formula and write the HTML code
in the Script area. The HTML must define all formatting and
document linking for the view.
The following formula inserts the graphic new.gif if the document was
created within the last five days; otherwise, no graphic is displayed.
@IF (@NOW > @ADJUST(@CREATED; 0; 0; 5; 0; 0; 0); "";"
[<img src=/gifs/new.gif border=0>]")

7-66 Application Development with Domino Designer

Displaying a view as an applet in Web applications


You can display a view or an embedded view as a view applet. Here is a
view applet on the Web followed by an embedded view applet on the
Web:

Building Applications
Designing Views 7-67

What the view applet does for Web applications


With the view applet, Web users can:

Resize columns with sliding panes

Collapse and expand views without the browser regenerating the


page

Select multiple documents

Scroll vertically to view additional documents in the view

Press F9 to refresh the view

Press DEL to mark documents for deletion from the database

To display a view applet in a Web application


When you embed a view in a form, subform, or page, you can display
the embedded view as an applet.
1. Open a view.
2. Choose Design - View Properties to open the properties box.
3. Click the Advanced tab.
4. In the For Web Access section, select Use applet in the browser.

To display an embedded view applet in a Web application


You can enable an embedded view as an applet independently of the
element it is embedded in.
1. Open a form or page.
2. Place the cursor where you want the embedded view to display.
3. Choose Create - Embedded element - View and select the view you
want to embed.
4. Choose Element - View Properties to open the properties box.
5. Click the Info tab. In the Web Access field, specify whether this view
should display as an applet by choosing one of the following:
Using Java Applet indicates that the view applet is used in this
embedded view regardless of the views setting.
Using HTML indicates that the view applet is not used
regardless of the views setting.
Using Views display property indicates the views settings are
used for this embedded view.

7-68 Application Development with Domino Designer

Note At this time, the view applet does not support DBCS.
To program a view applet
Use these @commands to program a view applet.
@command

Description

ViewCollapse

Collapses the selected document

ViewExpand

Expands the selected document

ViewCollapseAll

Collapses all documents

ViewExpandAll

Expands all documents

ViewRefreshFields

Refreshes view
Upon refresh, the view applet does not delete
documents marked for deletion.

MoveToTrash

Causes currently selected documents to be marked for


deletion

EmptyTrash

Deletes documents that are marked for delete

Folder

Moves or copies the selected documents to a folder

RemoveFromFolder

Removes the selected document from the current


folder

Allowing users to select view documents on the Web


When you are deciding how to display a view on the Web, you have
several options. You can display it as a view applet, render the view in
HTML, or embed the view on a page or form. You can also allow users to
select documents in a view and then program action buttons to process
the selected documents.
1. Open a view in Designer.
2. Select Design - View properties and click the Advanced tab.
3. Select the option For Web Access: Allow selection of documents.
4. Save the view.

Designing Views 7-69

Building Applications

Font support in the view applet


The view applet provides limited support for fonts. Since current
versions of the Java Developers Kit (prior to SDK 1.2) provide very
limited support for text fonts, mapping between the Designer font set
and the font set supported by a specific Web browser is constrained by
the SDK supported by a browser. This can sometimes produce
inconsistent results across different Web browsers. For best results use
one of the following font faces: Courier, Helvetica, or Times Roman.

5. To see how the view displays on the Web, choose Design - Preview
in Web browser and select a Web browser from the list.
The view displays with a check box to the left of each document.
For information on adding action buttons to views, see the chapter
Automation in Applications.

Hiding a view
Designer includes several ways to hide a view from users.

Hiding a view from Notes users

Deselect Show in View menu on the Options tab of the View


Properties box.
Omitting a view from the View menu applies only to Notes users,
since Web users dont have access to Notes menus.

Select the view name in the design pane and choose Design - Design
Properties. Select Hide design element from Notes R4.6 or later
clients.
Hiding a view from Notes clients is useful when you have a
Web-only view or when you want to remove the view from both the
View menu and the folders pane.

Give the view a name and surround it with parentheses for


example, (All).

Hiding a view from Web users

Open the design toolbox, click the view name in the right pane, and
choose Design - Design Properties. Select Hide design element from
Web clients.
Hiding a view from Web clients is useful when you have a
Notes-only view, or when you want to remove the view from the
folders pane and the Open Database Views list.

Give the view a name and surround it with parentheses for


example, (All).

7-70 Application Development with Domino Designer

Showing a view only to users of older Notes releases


If you have a view tailored to users of older Notes releases, you can hide
the view from anyone using Lotus Notes Release 4.0 or later.
1. Open the Designer and click the view name.
2. Choose Design - Design Properties.

Refreshing view indexes


A view index is an internal filing system that builds a list of documents
that belong in a view. When users add or change documents, the view
index must be refreshed to show them which documents are new or
changed. Refreshing a view index can occur manually when users press
F9, as part of a condition built into the view design, or as part of the
Updall (Update ALL) server process set up by the server administrator.
You can either create a full-text index for a database or allow users create
a full-text index. If you want to maintain control over creating an index,
choose the option Restrict initial index build to designer or manager.

Refresh time options


To determine when to refresh an individual view, select a Refresh
index option from the Advanced tab of the View Properties box.

Auto, after first use


Updates the view every time a user opens a view after the first time.

Automatic
Updates the view whether or not users ever open the database. With
this option, views open more quickly.

Manual
Relies on the user to refresh the view. This option is useful for large
databases that dont need to stay uptodate. With this option, views
open very quickly. Users just press F9 to refresh the view.

Auto, at most every n hours


Controls how frequently the view index updates. Choose this option
for large databases that change fairly often. The view index updates
automatically, but no more frequently than the specified interval.
When a user opens a database in which changes have been made

Designing Views 7-71

Building Applications

3. Click the Design tab and select Do not show this design element in
menus of Notes R4 or later clients.

since the last indexing, the refresh icon appears, and the user can
press F9 to refresh the view manually.
If the document-selection formula is time based, refresh the index as
often as new documents are added. For example, if the view selects
documents once a day, select Auto, at most once every 24 hours, to
refresh the view index once daily.

Refresh display options


The On Refresh options on the Options tab of the View Properties box
determine how users see the changes in a view. The choices are:

Display indicator
Does not show view changes automatically. Instead, the refresh icon
appears in the view and users must click the icon to see any changes.

Refresh display
Refreshes the display automatically before showing the view to
users.

Refresh display from top row


Updates the view from the top down. This is useful in a reverse
chronological display where users are likely to look for changes at
the top of the view first.

Refresh display from bottom row


Updates the view from the bottom up. This is useful in a
chronological display where users are likely to look for changes at
the bottom of the view first.

Discard index options


To delete indexes automatically for a particular view and save disk
space, specify a Discard index option from the Advanced tab of the
View Properties box. (Note that when users open a view whose index has
been discarded, they may have to wait for Domino to recreate a view
index.) These settings override the NOTES.INI setting
Default_Index_Lifetime_Days, which the server administrator sets and
which, by default, deletes view indexes after 45 days.

After each use


Deletes the view index as soon as the user closes the database. This
option saves the most disk space, but the index must be rebuilt the
next time the view is opened. Choose this option for views that are
used infrequently, but on a predictable basis for example, a view
that an agent opens only on Friday afternoons.

7-72 Application Development with Domino Designer

If inactive for n days


Deletes a view index if the view hasnt been used in a specified
number of days. Domino rebuilds the view index the next time a user
opens the database. (This option doesnt affect local databases.)
Choose this option for databases that users infrequently or
unpredictably need.

If inactive for 45 days

When the view index is deleted


The Updall (Update All) server task, which runs by default on each
server at 2 AM, deletes the view index. Domino deletes the index the first
time Updall runs after the index becomes eligible for deletion. For
example, if you select After each use and the view is used at 10 AM
Tuesday, the index is not actually discarded until 2 AM Wednesday.
If you choose to delete the index after one day, Domino waits until the
index is at least one day (24 hours) old before deleting it. If the view is
used at 10 AM Tuesday, it is only 16 hours old at 2 AM Wednesday
when Updall runs, so it is not deleted until the next time Updall runs at 2
AM Thursday.
For more information, see Administering the Domino System.

Adding a trash folder to an application


Many applications benefit from a trash folder that users can drag
documents into. The topics are moved into the trash folder and marked
for deletion. In a Notes view, the documents remain in the Trash folder
until the user either presses F9 to refresh the view, or until the user closes
the database and confirms the deletion. If the user does not want to
delete the documents, they remain in the trash folder marked for
deletion. The user can drag documents back into another view and
remove the deletion mark. For an example of a trash folder in an
application, see the Lotus Domino Designer 6 mail template.
To add a trash folder to an application, create a new folder and assign it
the name ($trash). You then need to write code for the folder events to
handle the document deletions. For an example of how to program the
events for the $Trash folder, see the Notes 6 mail template (mail6.ntf).

Designing Views 7-73

Building Applications

Preserves the view index and appends updates to the existing index
unless the view is inactive for 45 days, in which case the index is
discarded. Because this option takes up more disk space than the
other options, use this only for views that users frequently need, so
they dont have to wait for a new view index to be created when they
open the database.

Example of programming a $Trash file


The following examples are taken from the $Trash folder in the Notes6
mail file:
Events
In the QueryRecalc event, the formula is:
@Command([MoveToTrash])
The Restore action uses the following code:
@Command([MoveToTrash])

{for Web}

@Command([ToolsRunMacro];"(Restore Document)")
Client}

{for

The agent for the restore action uses the following code:
@Command([EditRestoreDocument]);
@All
Delete
@Command([MoveToTrash])

{for Web}

Empty Trash
@Command([EmptyTrash])

{for Web & Client}

Trash folders in the view applet


If you display a trash folder as a view applet in a Web application,
documents marked for deletion in a Notes client are also marked for
deletion in the view applet. But refreshing the view in a browser by
pressing F5 does not delete the documents from the trash folder unless
you create an action to empty the trash. For an example of this, see the
Discussion template (discsw6.ntf).
Documents marked for deletion in the view applet will appear as marked
for deletion in the Notes client after you close and reopen the database in
the Notes client.

Adding a view for soft deletions


In some databases, selecting a document and choosing Edit - Delete
permanently deletes the document from a database. In other databases,
such as the Notes mail database, choosing Edit - Delete moves the
document into a Trash folder and stores it in a state of soft deletion.
This state makes it possible for a user to restore a document deleted in
error. You can turn on soft deletions for a database and control how long
to retain soft deletions in a database before actually deleting the
documents.
7-74 Application Development with Domino Designer

To turn on soft deletions for a database


1. Select the database in the Bookmark pane and choose Edit Properties.
2. On the Advanced tab of the Database properties box, check Allow
soft deletions.

Displaying and restoring soft-deleted documents


Documents in the soft delete state do not display in typical views and
folders. Instead, you must create a shared view to contain and display
documents in the soft deletion state. In this view, you can provide the
user with an action programmed to un-delete documents and restore
them to the database. In the Notes client, you can program the action
with the formula @UndeleteDocument. In the Notes client, the Remove
from Trash action in the Trash folder restores deleted mail messages.
A user can permanently delete documents from the Trash folder by
selecting one or more documents and choosing Edit - Delete or by
pressing the DEL key. You could also provide an action that uses the
@HardDeleteDocument command to permanently remove documents
from the Trash folder. For an example of this, see the Empty Trash
action in the Trash folder.
Form more information on the @UndeleteDocument and
@HardDeleteDocument commands, see the Lotus Domino 6 Programming
Guide.

Designing Views 7-75

Building Applications

3. Set a value for Soft delete expire time in hours. The default value is
48 hours. After that amount of time elapses, soft deletions are
permanently removed from the database.

Chapter 8
Designing Framesets

Overview of framesets
A frameset is a collection of frames and can add structure to your Web
site or Notes database. A frame is one section, or pane, of the larger
frameset window and is independently scrollable.
A frame can contain a form, folder, page, document, view, navigator, or
frameset. The frame can also contain a Web page and be associated with
a specific URL. Framesets let you create links and relationships between
frames. For example, you can leave one page displayed as users scroll or
link to other pages or databases.
Designers can set a frameset to launch automatically when a database,
form, or page opens.
Note Framesets created with Domino Designer Release 5 and later do
not work with releases of Lotus Notes before Release 5. A database
opened by a previous version of Notes will be launched using restored
as last viewed by user.

8-1

Building Applications

This chapter introduces frames and framesets.

Creating a frameset
1. Open Designer and choose Create - Design - Frameset. The Create
New Frameset dialog box appears.

2. At the Number of frames drop-down box, select two, three, or four


frames. You can make adjustments later.
3. Next to Arrangement, click one of the arrangements for the frames.
4. Click OK. The frameset with the chosen layout appears.
5. (Optional) Use the Frame action buttons, the Frame menu options, or
keyboard keys to further refine your frameset. You can:
Save the frameset.
Split the selected frame vertically by choosing Split into Columns
(SHIFT+INSERT key).
Split the selected frame horizontally by choosing Split into Rows
(INSERT key).
Delete the selected frame by choosing Delete Frame
(CTRL+DELETE key).
Refresh the content of the selected frame by choosing Refresh
Content.
Remove the content of the selected frame by choosing Remove
Frame Content (DELETE key).
Flip the frameset horizontally by choosing Flip Horizontally.
Cycle through frames by using the TAB key (SHIFT+TAB cycles
backwards).
8-2 Application Development with Domino Designer

6. Open the Frameset Properties box. At the Basics tab:


Name the frameset.
Provide an alias for the frameset. An alias is an internal name for
the frameset. Use an alias to change or translate the frameset name
without causing reference problems. The alias appears with the
initial list of framesets in the Work pane.

Click Available for public access if you want to have the


frameset available for public access.
Enter a title for the frameset in the Title field or use a formula to
compute the frameset title by clicking Formula Window and
entering the formula. The frameset title is the name that appears in
the Windows tab when the frameset is launched.
7. Add content to each frame by using the Frame Properties box.
8. To move borders between frames, you can:
Drag borders with the mouse.
Use the Arrow keys to drag the border of a selected frame:
To drag the border left, press the left (or right) arrow key.
To drag the border right, press SHIFT+the left (or right) arrow
key.
To drag the border up, press the up (or down) arrow key.
To drag the border down, press the SHIFT+the up (or down)
arrow key.
9. To preview the frameset:
To preview the frameset on the Web, choose Frame - Preview in
Web browser and choose a browser.
To look at the HTML source, select Other - Synopsis in the Design
pane. In the Design Elements tab of the Design Synopsis dialog
box, choose framesets from the drop-down list and select and add
each frameset for which you want to view the HTML source.
Make sure to check Include JavaScript and HTML in the
Content tab.
You can also look at the HTML source by previewing the frameset
on the Web and then viewing the source with the chosen Web
browser.
To preview the frameset in Notes, you can launch the database
into the frameset or choose Preview in Notes from the Designer
toolbar or Frame menu.
Designing Framesets 8-3

Building Applications

Add a comment. The comment appears with the initial list of


framesets in the Work pane.

Using the View menu with framesets


When you are designing frames and framesets, the View menu contains
the following commands:

Refresh all refreshes the content of each frame with changes you
have made since opening the frameset.

Show Frame Content once you have populated the frames, you
can use this menu option to view either the actual content of the
frame or a short description of the frame content. For example,
instead of an actual Web page appearing in a frame, the frame
contains text such as:
Content type: URL
Content value: http://www.lotus.com/

Providing content for a frame


When you first create a frameset, the text No content appears in each
frame. To provide content for a frame in a frameset, you can do the
following:
1. Select a frame in the frameset.
2. Choose Frame - Frame properties. The Frame Properties box appears.
3. On the Basics tab, provide a name for the frame.
Make sure that each frame has a unique name. Using the same name
for frames in different framesets is not recommended. For example, if
you have a frame named Banner in more than one frameset, you may
get unexpected results when you set it as a target frame.
Note that you should not use HTML predefined target names to
name a frame ( _self, _top, _parent, and _blank).
4. At the Type field of the Basics tab, choose one of the following ways
to provide content for the frame:
Link
Link requires that you paste in a link that youve already copied to
the Clipboard. Click the Paste icon to paste in the link. There are
three kinds of links you can paste in from the Clipboard: View,
Document, or Anchor. (Database links are not supported in
framesets.)
For more information on links, see the topic Creating Links in
the chapter Designing Pages.

8-4 Application Development with Domino Designer

Named Element
A named element is a design element that you have already
created and named. A named element can be a page, form,
frameset, view, folder, or navigator.
Enter a value (for example, if you already created a page named
PAGE1, enter it into the Value field). Alternately, you can click
one of the following icons:
Paste icon to paste in a name which you previously copied to the
Clipboard.
Folder icon to open the Locate Object dialog box and select a
design element from a list of elements.
If you choose Named Element - View or Folder, several options
appear:
Show action bar displays the View action bar when the view or
folder is loaded into the frame.
Show header displays the column headings.
Selection tracks mouse movement - as you move the mouse over
the view, the view selects the document the mouse is pointing to.
Basic simple appearance - enables several miscellaneous options,
including such options as showing strike-through text when an
item is marked for deletion, not allowing the scroll bar to be
hidden, not extending selection in the selection margin when the
mouse moves, using a simple grid for calendar views, and
defaulting to a 1-day format for calendar views.
If you want a view or folder on the Web, consider first embedding
the view or folder on a page or form. If you choose to make the
embedded view an embedded view applet, you preserve much of
the HTML view functionality and provide features such as
resizeable columns, multiple document selection, and scrolling.
URL
To put a Web page into a frame, choose URL and enter the full
URL specification (for example, http://www.lotus.com). You can
also paste in a URL or use a formula that evaluates to a URL. You
receive an error in the frame if the URL you specify is not
accessible. Note that all content rendered in framesets in Designer
uses the native Notes Web browser even if your current browser
selection is something else.

Designing Framesets 8-5

Building Applications

Formula icon (@) to use a formula that evaluates to a name.

When you click a link in a Web page (in the Notes client or in a Web
browser), the link may open within the same Web page or in a new
window, depending on the setting for that Web page.
5. (Optional) Enter the target frame for links activated within the
current frame.

Setting the style for frames


You can set properties such as scroll bars, size of frames, and border
properties in the Frame Properties box.
Note The Web browser you use may not fully support all the properties
you can set in the Frame Properties box.
To set the style for each frame:
1. Choose Frame - Frame Properties.
2. Specify the following properties for each frame.
For information on the Basics tab of the Frame Properties box, see the
previous topic Providing content for a frame.
Tab

Property

Frame Size tab Width and


Height

Scrolling

Description
Choose relative, percent, or pixel to specify
the frame width and height:
Relative sizes the frame relative to the
other frames in the frameset. For example,
a frame with no frames above or below it is
automatically set to relative and is the
height of the frameset.
Percent sizes the frame as a percentage
of the frameset. A frame set to 50 Percent
width is half the width of the frameset.
Pixel sizes the frame exactly in pixels.
If you change the width and height
properties for one frame, the width and
height of adjacent frames will change;
however, the properties of adjacent frames
are not automatically adjusted. Adjacent
frame properties are adjusted if you drag
the borders.
Choosing On forces a scroll bar for the
frame; choosing Off causes no scroll bar to
appear. If you choose Auto, the scroll bar
appears if it is needed. The default is Auto.
continued

8-6 Application Development with Domino Designer

Tab

Description

Allow
Resizing

Allow Resizing. If you choose Yes, you


allow users in the Notes client or Web
browser to change the height and width of
frames by dragging their borders. If you
choose No, users cannot drag borders to
re-size the frame.

Set Initial
Focus

Checking this box causes the focus to be on


this frame when the frameset is launched in
the Notes client. This feature works only
with Lotus Domino Designer 6 and later
and is ignored by previous versions. If this
property is enabled for more than one
frame in a frameset, the first frame found is
enabled. If this property in enabled on a
frame that either has no content or has
content which cannot be found, there is no
frame focus.

Border Style
(Applies to
this frame)

3-D border allows three-dimensional


borders between the current frame and its
adjacent frames.
Apply to all frames adds
three-dimensional borders between all
frames in the frameset.

Border style
(Applies to all
borders in
frameset)

Border width (in pixels). The default is 7


pixels. Checking Default means that the
frame displays according to the users
browser settings. Each browser renders
design elements differently, so be sure to
preview your work in each browser if you
are choosing this setting.
Border color choose a color from the
drop-down color chart. Click on the system
(monitor) icon at the top of the color chart
to get the default color. Click on the wheel
icon at the top of the color chart to create a
custom color.
continued

Designing Framesets 8-7

Building Applications

Frame Border
tab

Property

Tab

Property

Description

Caption Formula enter a formula that


Border
Caption (Notes translates to a caption that appears in the
border.
Client Only)
Show choose None, Caption only,
Arrows only, or Both. None shows the
default border with no caption or arrows.
Caption only displays a caption in the
border. Arrows only displays an arrow
in the border. This arrow lets you open and
close the frame. Both displays both a
caption and an arrow in the border.
Align - for a caption, choose to align so that
the caption appears inside the top or
bottom border of the frame. For an arrow,
choose to align so the arrow appears at the
top, bottom, left, or right border of the
frame. For both a caption and an arrow,
you can align top or bottom. Note that the
border appears only where the caption or
arrows appear. For example, if you choose
Top, then the border displays on the top
only.
Justify - choose to justify the caption or
arrows so they appear to the left, right, or
center of the border.
Open - choose a size in pixels or as a
percent of the frame. This size is the default
size that the frame opens to when the user
clicks on the border of a closed frame.
You can also specify text characteristics for
the caption and arrows, such as font, size,
style, and color. In addition, you can
specify a background color for the border.
Advanced tab

Frame Spacing The default is minimal space between


frames. You specify spacing between
frames in pixels. Checking Default means
that the frame displays according to the
users browser settings. Each browser
renders design elements differently, so be
sure to preview your work in each browser
if you are choosing this setting. This
property is not supported in the Notes
client.
continued

8-8 Application Development with Domino Designer

Tab

Property

Description

Specifying a target frame


In addition to adding content to a frame, you can target a specific frame
of a frameset so that data and links open in the target frame. You specify
a target frame in the Frame Properties box or in the Properties boxes of
many other elements (such as the properties boxes for pages, forms,
outline entries, embedded outlines, group scheduler, and hotspot
resources).
It is possible to set multiple target frames that appear to conflict with
each other. For example, you can set a target frame on an outline entry,
an embedded outline that contains that outline entry, the page that
contains that embedded outline, or on a frame that contains the page.
Which target frame takes precedence?
The general rule is that the most specific element takes precedence. In
this case, it is the outline entry which takes precedence. If you have not
specified a target frame in the outline entry, then the target frame set in
the embedded outline takes precedence. If you have not specified a
target frame in the embedded outline, then the target frame set in the
page containing the embedded outline takes precedence. And if you
have not specified a target frame in the page, then the target frame set in
the frame takes precedence.
If you have not specified a target frame anywhere in this hierarchy, the
link opens in the frame that contains the link. If you specify a target
frame that does not exist, the link opens in a new, top-level window.
Note that an embedded view and a view have the same level of
precedence. Note also that if a frame contains a page with an embedded
view applet, then clicking a document in the embedded view applet
actually opens a new window which overwrites the original window.

Designing Framesets 8-9

Building Applications

Margin Height The default is minimal space between the


frame border and the frame content. You
and Width
specify height and width in pixels.
Checking Default means that the frame
displays according to the users browser
settings. Each browser renders design
elements differently, so be sure to preview
your work in each browser if you are
choosing this setting. This property is not
supported in the Notes client.

For more information on specifying a target frame for an individual link


or element, see the online help for that elements properties box.
Note Remember to specify a name in the Frame Properties box for any
frame that is going to be a target frame.

Launching a database into a frameset


You can have a frameset display automatically when you open a Notes
database:
1. Create the frameset you want to display when the database first
opens.
2. In the Database Properties box, click the Launch tab.
3. In the On Database Open field, select Open Designated Frameset.
4. In the Name field, select the frameset you want to open.
When the database is opened, the specified frameset launches. If a view
link, document link, or @command is used to open a database, the
frameset may not open.

Launching a page or form into a frameset


You can specify that either a page or a form and the documents created
with that form open automatically in a specific frame of a frameset.
1. Open the page or form you want to open in a frame.
2. Choose Design - <design element> properties to open the properties
box for the page or form.
3. Click the Launch tab.
4. In the Frameset field, select the frameset in which you wish to launch
the page or form and the documents that are created with that form.
5. In the Frame field, select the frame in which you wish to display the
page or form and documents.
Note that you can select only framesets that are located in the same
database as the form on which you are working. Make sure that you
have already saved the frameset and given the frame a name in the
Frame Properties box.

8-10 Application Development with Domino Designer

Launching a view or folder into a frameset


You can specify that a view or folder open automatically in a specific
frame of a frameset. Note that this autolaunch feature for views and
folders works only on the Web.
1. Open the view or folder that you want to open in a frame.
3. Click the Launch tab.
4. In the Frameset field, select the frameset in which you wish to launch
the view or folder.
5. In the Frame field, select the frame in which you wish to display the
view or folder.
Note that you can select only framesets that are located in the same
database as the view or folder on which you are working. Make sure that
you have already saved the frameset and given the frame a name in the
Frame Properties box.

Designing Framesets 8-11

Building Applications

2. Open the View or Folder properties box for that view or folder.

Chapter 9
Designing Navigation for an Application

Outlines, navigators, and imagemaps


You can use the following navigational tools in your application:

An outline lets you create an organizing structure for an application


and gives you control over how elements display in a navigation
pane. An outline also gives you the power to create a sophisticated
site map that combines text, graphics, and automation, and lets you
combine database elements with links to Web sites and to pages,
documents, or views in other databases. Because an outline is created
from the contents of the database, it is easier to maintain than a
navigator and is more flexible.

A navigator is a graphical road map that directs users to specific


parts of an application. A navigator similar to a form, a page, or a
view is an independent design element and combines graphics,
text, and action buttons. Navigators can also be embedded in a form
or a page. Embedded navigators have the advantage of combining a
navigator with other form or page elements, and of letting you
design a navigator template to establish a uniform way of presenting
navigators in an application. One disadvantage of navigators is that
once you design a navigator, it is usually static and can be difficult to
change.

An imagemap is a graphic you enhance with programmable hotspots


that perform some action when a user clicks on them. Unlike a
navigator, an imagemap can reside only on a form or a page. You can
easily combine an imagemap with text and other form or page
elements. You can also control the display of an imagemap using a
hide-when or computed-for-display formula. For most situations, an
imagemap provides all the functionality you need to create a
great-looking navigational structure for your application, but if you
plan to combine a number of graphics and buttons, you might
consider creating a navigator instead.

9-1

Building Applications

This chapter explains how to use navigational tools for your application.

Outlines
Outlines, like imagemaps and navigators, provide a way for users to
navigate through an application. Unlike imagemaps or navigators,
outlines let you maintain a navigational structure in only one place. As
your site or application changes, you make only one change in the source
outline. Each navigational structure that uses that outline source is
dynamically updated.
You can create an outline that lets users navigate to the views and folders
in your database, perform actions, or link to other elements or URLs
outside of your application. You can create an outline that navigates
through your entire application or site or through part of it.
Important features of outlines include:

Outlines allow great flexibility of design. You can order how items
appear and create different levels of hierarchy, and you can use
framesets to include multiple outlines that launch links in target
frames.

Outlines are customizable. You can control how the outline appears
to users by changing text and button styles and adding icons from
your databases shared resources.

Outline entries are fully programmable. You can add logic that
controls how outline entries are rendered by the Notes client or Web
browser.

Once you create the source outline, you embed it on a page or form to
create an outline control, which displays the outline to users as a site map
or navigational structure. Users can click on the outline entries to take
them where you want them to go.

Overview of creating a navigator


To create a navigational structure using an outline, follow these steps:
1. Create a new blank or default outline.
2. Create outline entries for jumps or actions you want to present to the
user.
3. Embed your outline on a form or page or in a rich-text field of a
document.
4. Format the embedded outline.
5. (Optional) Include the embedded outline in a frameset.

9-2 Application Development with Domino Designer

Creating an outline
You can create a new outline or generate a default outline.

If you have already created all of your design elements or are working
with a database created from a template, you can begin by creating a
default outline and customizing it.
Designing for accessibility
Use outlines instead of navigators to create applications that are
accessible to assistive technologies like screen readers. An outline lets
you create an organizing structure for an application and gives you
control over how elements are displayed in a navigator pane. Outlines
are programmable and customizable so you can control the look of the
outline while maintaining accessibility. If the outline will be used for
Web applications, do not select the option to display using the Java
applet. Outlines displayed using the Java applet are not accessible.
For more information on designing an application for maximum
accessibility for people with disabilities, see the topic Designing an
application for maximum security in the chapter Planning an
Application.
To create a new outline
1. Click Shared Code - Outlines in the Design pane.
2. Click New Outline.
3. Add outline entries for each design element, action, or link you want
to include in the outline.
4. Save and name the outline. In the Save outline as box, type an
outline name.
Specify an alias if you plan to embed the outline and there is a
chance that the embedded outline could be renamed. An alias allows
you to change an outline name without rewriting formulas that
Designing Navigation for an Application 9-3

Building Applications

If you are using the outline to plan your application, you can create the
outline entries prior to designing the actual design elements. Begin by
creating a new outline and then adding entries for each element you plan
to include in your application. You can include outline entries for any
element that will be part of your application or site, such as jumps to
pages, documents, views, folders, Web pages, or other Domino
databases. Outline entries represent each piece or planned piece of your
application or navigation structure. Outline entries can also be clickable
actions, or can be top-level categories that organize other entries. You can
also choose what icons display with the entry. You can organize your
application into units and create multiple outlines to represent the
different portions of your application.

reference the embedded outline. An alias also remains the same if a


database is translated or modified. To specify an alias, type a vertical
bar (|) followed by the alias name. For example,
OutlineName|OutlineAlias.
To create a default outline
The default outline creates outline entries for all the views and folders in
the database. In addition, the default outline contains placeholders called
Other views, Other folders, Other private views, and Other
private folders.
1. Create a new outline.
2. Click Generate Default Outline.
To add a new outline entry to an outline
1. Open or create an outline.
2. Click New Entry.
Note You can also cut and paste outline entries from other outlines.
3. In the Outline Entry Properties box, enter the label you want to
appear in the outline, for example, Home Page or Main View.
4. In the Outline Entry Properties box, type the popup text that you
want to appear. Popup text appears if the window is not wide
enough to display the entire label and the user moves the mouse
over the outline entry.
5. (Optional) Specify an alias for the outline entry.
6. Specify a type for the element in the Content field. Types include:
None - use this to create a top-level category for nesting entries.
Action - choose this if you want the outline entry to perform an
action such as open or create a document. To enter an action, click
the @ button, and enter a formula using the formula language.
Link - such as to an anchor, document, view, or database link.
Named element - such as a Page, Form, or View.
If you are creating a link to a named element that does not exist,
Designer displays a prompt saying that you will need to create the
element later.
URL.
7. (Optional) In the Value field, specify or paste in a value that
corresponds to the Type that you have chosen (for example, paste in
a URL, if you have chosen Link; a formula, if you have chosen
Action). If you paste in a URL link, make sure the entire URL,
including protocol, is available. For example http://www.lotus.com.
9-4 Application Development with Domino Designer

8. (Optional) In the Frame field, specify the target frame where you
want the action or link to be displayed.
If you have not yet created a frameset, you can either enter the name
you are planning to use in your frameset or you can add this entry
later, after you have created your frameset.

To reorder elements in an outline


Create the order for the outline entries as you want them to appear to the
user. To reorder the elements after you create them, select one or more
outline entries in the Design pane and drag to move them up or down in
the list.
To create a hierarchy between elements
Outline elements can have a hierarchy, that is, there can be top-level
entries and subordinate entries. This is especially useful, for example, if
you want to create nested outline entries. To create a hierarchy between
elements, do one of the following:

Select one or more outline entries and click Indent Entry (or press
TAB) to indent the element one tab stop to the right.

Select one or more outline entries and click Outdent Entry (or
press SHIFT+TAB) to outdent the elements one tab stop to the left.

To delete an outline entry


1. Select an outline entry.
2. Press DEL or choose Edit - Delete.

Embedding an outline
To use an outline as a navigational device, it must be embedded on a
form, page, or rich text field of a document. Whether you choose to
embed your outline on a form, page, or document will depend on how
you want to use it. You can embed the outline on a form so that each
document created from that form includes the embedded outline. The
outline then presents an easy way for users to navigate to other views,
create a new document, move to the next document, and so on. For
example, in a Discussion database, you can embed the outline on the
Main Topic form. When a user creates a document with that form, the
outline appears on the document.

Designing Navigation for an Application 9-5

Building Applications

After you have created outline entries for the elements that you are
including in your application, you can reorder the elements or create a
hierarchy that structures your content. The order of the outline entries in
the outline will be reflected in the embedded outline control.

You might want outlines or outline entries to appear under certain


circumstances or for only certain kinds of users. Using the Programmers
pane gives you greater flexibility in planning and designing your
outlines. For example, you can supply different outlines to Notes or Web
browser users; or you can limit access to outline entries based on users in
different organizations such as sales or manufacturing.
The most common way to use an outline is to embed the outline on a
page and use it as part of a frameset. Embed the outline on multiple
pages if you need to have several occurrences of the same outline with
different styles (for example, one outline with only text, another with
graphical buttons).
If you want several navigational structures in one application you can do
one of two things. You can create one outline and embed it several times
on different pages, or you can create several different outlines and
embed each on different pages.
To embed the outline on a page
1. Click Shared Code - Outlines in the Design pane.
2. Open the outline you wish to embed.
3. Click Use Outline on the action bar at the top of the Design pane.
The embedded outline appears on a new page with the default style
applied to it.
4. If you do not want to display the same outline in all circumstances,
write a formula in the Programmers pane to display the appropriate
outline.
5. Choose File - Save. As prompted, enter a name for the page on which
the outline is embedded.
To embed the outline on a form, page, or document
1. Open or create the form, page, or document on which you want to
embed the outline.
2. Position the cursor where you want the outline to appear. In a
document you must be in a rich text field.
3. Choose Create - Embedded Element - Outline.
4. From the dialog box, select the outline you want to embed. The
dialog box lists all of the saved outlines in the current database. You
can also choose to embed an outline from a different database.
5. If you do not want to display the same outline in all circumstances,
write a formula in the Programmers pane to display the appropriate
outline.
6. After you have embedded your outline, you can format it.
9-6 Application Development with Domino Designer

Outline, outline entry, and embedded outline properties


There are three sets of properties associated with outlines:
Description

Outline properties

Gives the outline a name and alias


Makes the outline available to public access users
Specifies that the outline be read only

Outline entry properties

Assigns a label and alias to the outline entry


Selects what the entry will do: Jump to a URL,
link, or named element, perform an action, or
nothing
Selects the link or enters a formula
Enters the target frame for the action or link
Selects the image
Selects Does not keep selection focus
Specifies that the outline entry be read only
Selects hide options for the entry

Embedded outline
properties

Formats the embedded outlines look and


structure

Selected outline properties


To make the outline available to public access users
This option must be enabled for the outline to be available to public
access users - users with no access to the database, but who have the
privilege to read/write public documents. (Public access users will be
able to open the database to views enabled for public access and to
read/write documents enabled for public access.) If the designer wants
the public access user to be able to use the outline for navigation, the
outline must be enabled for public access users. The page and frameset in
which the outline appears must also be enabled for public access users.
For more information about public access, see the topic Creating public
access pages, forms, subforms, outlines, views, agents, and style sheets
in the chapter Security in an Application.
To make the outline read only
If you select Read only, users cannot edit the outline in place.

Designing Navigation for an Application 9-7

Building Applications

Property

Selected outline entry properties


Providing identifying information for an outline entry
1. Type the label that you want to appear in the outline entry.
2. (Optional) Type the popup text that you want to appear. Popup text
appears if the window is not wide enough to display the entire label
and the user moves the mouse over the outline entry.
3. (Optional) Type an alias. An alias is useful if you refer to an outline
entry in a formula.
Providing content for an outline entry
When you create an outline entry, you must provide content as follows.
1. In the Type field, choose one of the following ways to provide
content for the outline entry:
Action
Specify an action to provide an automated task.
For more information on actions, see the topic Actions in the
chapter Adding Automation to an Applications.
Link
Link requires that you paste a link that youve already copied to
the Clipboard. Click the Paste icon to paste one of the following
kinds of links: View, Document, Anchor, or a database link.
For more information on links, see the topic Creating links in
the chapter Designing Pages.
Named Element
A named element is a design element that you have already
created and named. A named element can be a page, form,
frameset, view, folder, or navigator.
URL
To put a Web page into an outline entry, choose URL.
2. In the Value field, type a value for the element type you have chosen.
For example, if you already created a page named PAGE1, type
PAGE1 in the Value field. If you chose a URL, type the full URL
specification (for example, http://www.lotus.com). You can also
paste a URL or use a formula that evaluates to a URL. Alternately,
you can click one of the following:
Use the folder icon to select a design element from a list in the
Locate Object dialog box.

9-8 Application Development with Domino Designer

Use the formula icon (@) to specify a formula that evaluates to a


name. The formula resolves to the name of an element; using a
formula allows you to dynamically specify the outline entry
source (for example, whether the named element links to a page or
a view).
Use the paste icon to paste an element which you previously
copied to the Clipboard.

To add an image to the entry


You can display an image with any outline entry. By default, outline
entries for views display the view icon, and outline entries for folders
display the folder icon. You can display these icons, hide the icons, or
choose one of your own.
To add an image to appear next to your entry:
1. Select an outline entry and choose Design - Outline Entry Properties.
2. On the Outline Entry Info tab, do one of the following
Click the folder icon in the Image section and select the shared
image resource for your graphic.
Click the @ button to use a formula to control the display of the
image.
Select Do not display an image.
Does not keep selection focus
After a user clicks on the entry, the entry will not remain selected. The
previously selected entry will retain the focus.
Read only
If you select Read only, users cannot edit the outline in place.
To hide an entry
You may want certain entries to show up only under certain
circumstances. For example, you can program an entry to be hidden
when viewed with a Web browser. To hide outline entries:
1. In the Outline Entry Properties box, click the Hide tab.
2. Select an option for hiding the entry or enter a formula in the
formula box.

Designing Navigation for an Application 9-9

Building Applications

3. (Optional) In the Frame field, type the target frame for the outline
entry source.

Selected embedded outline properties


An embedded outline has several areas you can format. Using the
Embedded Outline Properties box, you can set up the display of the
outline, including images in the background area and a hierarchy style
for entries in the title, top-level, and sub-level area.

There are two different style properties that control how the embedded
outline appears to the user: type and title.
The first, Type, determines whether the outline shows the hierarchy of
the outline entries. The hierarchy is set up when you outdent and indent
outline entries. If you select Tree style for type, then all of the outline
entries that have indented entries below them will show up as
expandable sections. You can choose to have green triangles (or twisties)
display next to expandable outline entries, or users can click on the
top-level entry to expand it. In a Tree style outline, all top-level entries
show at all times. Users expand and collapse entries as necessary.
9-10 Application Development with Domino Designer

Tree style outline with twisties turned on:

Building Applications

Tree style with simple title:

Designing Navigation for an Application 9-11

A Flat style outline displays one level of entries at a time. Initially, all
top-level entries display. When you click an entry, if it is expandable, the
sub-level entries associated with that entry will display. If it is not
expandable, it will jump to whatever link or action is associated with it. If
you want users to be able to navigate back up the outline, select Simple
for the title style. The title will continue to display allowing users to click
on it to get back to the previous level. If you choose Hide for the title
style you must provide a button or action if you want users to be able to
return to the top-level of the outline.
Initial display for flat style outline:

After clicking Phone Book entry:

To format an embedded outline


1. Open the form or page on which the outline is embedded.
2. Select the outline.

9-12 Application Development with Domino Designer

3. Choose Element - Outline Properties. The Embedded Outline


Properties box appears for you to set the overall display of the
embedded outline.
Info tab:

If you choose Flat Style, you have the option of displaying the
outline vertically or horizontally. Display horizontally displays
entries to fit the window across instead of down.
Title style - Hide or Simple. Simple style lets users navigate back
up to prior levels by displaying the parent of the current level in
an outline. Hide style does not display any hierarchy, so once
users go down a level in the outline they cannot navigate back up.
Target frame - Specify the frame where you want the source (link,
named element, or URL) displayed.
Twisties (Tree style only)
Show twisties - Select to display a triangle that users click to see outline
entries.
OS style - Select if you want the outline to appear in a structure
similar to the Design pane in Domino Designer. Instead of
twisties, the user clicks a plus sign (+) to expand and a minus sign
(-) to collapse. This setting is supported on Windows platforms.
Image - Specify a custom twistie image instead of the triangle.
Click the folder icon to select a shared image resource.
Optionally, click the @ button to use a formula to control the
image display.
Columns (Flat Vertical style only)
Show as multiple columns - If you select this setting, the entries at
any level automatically display in columns (instead of using scroll
bars) when the outline is longer than the allotted height. For
example, an outline that has entries that would normally require a
height of three inches to display would wrap into columns if the
outline had a fixed height of one inch. However, if the outline
height is set to Fit to content, columns do not automatically
appear because the outline height increases to the height it needs.
Column width - Specify the width of the columns in inches.

Designing Navigation for an Application 9-13

Building Applications

Type - Tree or Flat. This setting allows you to decide whether to


show the hierarchy of the Outline or not. Tree style shows all of
the outline entries in the hierarchy, while Flat shows only one
level at a time. Use the Flat style selection in conjunction with the
Title style setting.

Root entry - Specify a root by using the parent entry label or the
alias of the parent entry. (For backwards compatibility with Lotus
Domino Designer R5, you should specify the alias.) When you
specify a root entry, the children of the specified entry only are
displayed. One use of this field is to restrict access to elements in
your site or database.
If the specified entry does not have any children, then nothing will
display in the outline. If you want to give users a way to navigate
back up the hierarchy from the root entrys children, enable
Simple as the Title style for either a Tree or Flat outline. If you
want to limit users access to those children entries only, set the
root, and dont enable a Title style.
Outline size
Width
To specify the width of an embedded outline as a percentage of
the parent window, choose Fit to window (%).
To specify the width in inches of an embedded outline, choose
Fixed (Size).
To allow automatic sizing of an outline based on its content for
example, the number of entries and whether or not the entries are
expanded or collapsed choose Fit to content.
To specify the width as approximately the specified number of
characters based on the average character width of the specified
font, choose Fixed (Chars).
Height
To specify the height in inches of an embedded outline, choose
Fixed (height).
To allow automatic sizing of an outline based on its content for
example, the number of entries and whether or not the entries are
expanded or collapsed choose Fit to content.
To allow automatic sizing of the height of an outline based on the
size of the window that the outline is displayed in regardless of its
content, choose Fit to window.
Show scroll bar
To display a scroll bar if the embedded outline entries do not fit
on the screen, select Show scroll bar.
Web access - Select HTML or a Java applet to display an
embedded outline to Web users.

9-14 Application Development with Domino Designer

Special
Show folder unread information - If you select this option, folder
names in the outline become bolded when there is new or changed
information; the unread count follows the folder name. For
example: Infobox (8). Note that this option works only on Lotus
Notes/Domino 6.
Font tab

Normal state of entries


Selected (when the entry is selected)
Moused (when the mouse passes over the entry)
Background tab
For each of the areas on the embedded Outline, you can specify color
or image backgrounds. You can set mouse-over and selection colors.
Images can be tiled in various ways, such as top to bottom, or left to
right, or positioned under the text, for button effects. Images must be
shared image resources for the database.
Layout tab
Set the positioning for the title-level (if Simple title is enabled),
top-level, or the subsequent levels of:
The entire outline entry
Height - height of each entry. (This setting represents the width of
each entry in a flat horizontal outline.)
Vertical offset - aligns the outline entries relative to the top edge of
the embedded outline or previous outline entry. If you want to
customize the spacing between outline entries, use this setting.
Horizontal offset - aligns the outline entries relative to the left
edge of the embedded outline, for title or top-level entries.
Sub-level offset is relative to parent entrys left edge.
The label text of the outline entry
Alignment - within the outline entry.
Vertical offset - relative to the top or bottom edge of the outline
entry, depending on alignment; ignored for a middle vertical
alignment.
Horizontal offset - relative to the left or right edge of the outline
entry, depending on alignment; ignored for a center horizontal
alignment.
Designing Navigation for an Application 9-15

Building Applications

Select either Top-level font or Sub-level font to format the font of the
outline entries. If Title style is set to Simple, select the Title Font. You
can also select font colors for:

The outline entry image


Alignment - within the outline entry.
Vertical offset - relative to the top or bottom edge of the
embedded outline entry, depending on alignment; ignored for a
middle vertical alignment.
Horizontal offset relative to the left or right edge of the outline
entry, depending on alignment; ignored for a center horizontal
alignment.
Border tab
Set a border style, effect, and thickness.
For more information on borders, see the topic Setting a border
style, effect, and thickness in the Lotus Notes 6 Help.

Using the outline applet in Web applications


When you are designing a Web application, you have two options for
defining how an embedded outline displays in a browser:

Define the embedded outline as HTML. This is the default behavior.

Define the embedded outline as an applet.

The outline applet lets Web users work with outlines embedded in a
page or form. With the outline applet, Web browser users can:

See mouse-over distinctions for items in the outline, including


change of color to indicate a selected item

See background images

To enable the outline applet


1. Embed an outline in a page or form, or select an existing embedded
outline.
2. Choose Element - Outline Properties.
3. On the Info tab, select Web Access: Using Java Applet.

9-16 Application Development with Domino Designer

Displaying the outline in a frameset


To add structure to your Web site or Notes database, after you have
formatted the outline you can insert it into a frameset.
1. Either create a new frameset or open an existing frameset.

3. In the Type field, select Named Element.


4. Select Page or Form. Enter a value by either clicking the Folder icon
and selecting it from the list box or typing the name of the page or
form containing the outline.
5. (Optional) Click the formula icon (@) to enter a formula that
evaluates to the named element.
6. (Optional) Enter the name of the target frame the links should appear
in when a user clicks on an outline entry.
For more information on framesets, see the chapter Designing
Framesets.

Navigators
Navigators are objects and graphics that include programmed areas that
direct users to specific parts of a database. They let users find documents
or take actions without having to open views. If you are designing a
navigator for the Web, consider either embedding a navigator or
importing a navigator into a form, subform, page, or document.
Navigators usually include hotspots; that is, programmed areas that
users click to execute an action. A hotspot can be text, graphics, or a
combination of both.
If you use navigators in an application, you usually want the navigator to
display automatically when the application opens.
To use a navigator in a Web application, you must select Web browser
compatible as a navigator property. With this setting on, Domino
converts a navigator to an HTML imagemap. Navigators on the Web
always display as full-screen imagemaps. To control the size and display
of a navigator on the Web, you can embed a navigator in a form.
If your navigator inherits its design from a template, do not make any
changes to the design of your navigator, since any changes you make will
be overwritten by the template.

Designing Navigation for an Application 9-17

Building Applications

2. Right-click on the frame in which you want the outline to appear and
select the Frame Properties box.

Designing for accessibility


Navigators provide a graphical display of folders, views and design
elements to make it easier for most users to find information. However,
you cannot access a navigator without a mouse, and the graphics are
inaccessible to assistive technologies like screen readers. To make
navigators accessible to someone using a keyboard or a screen reader,
place all navigator actions on the Actions menu.
Outlines, navigation tools which provide the functional equivalent to
navigators, are accessible and easier to maintain than navigators.
Whenever possible, use outlines in place of navigators to provide custom
navigation for your application.
For more information on designing an application for maximum
accessibility, see the topic Designing an application for maximum
accessibility for people with disabilities in the chapter Planning an
Application.
Navigator objects
You create a navigator by combining navigator objects and adding
actions to objects. Navigator objects include graphic backgrounds,
hotspot rectangles, hotspot polygons, hotspot circles, graphic buttons,
buttons, text, rectangles, rounded rectangles, ellipses, polygons, and
polylines. To create navigator objects, you can import or paste objects
from another application or you can use the drawing tools Designer
supplies.
All navigator objects except polylines behave the same on the Web as
they do in Notes. Polyline objects display on the Web, but clicking them
has no effect.

Navigator actions
You can add actions to all navigator objects except those pasted or
imported as graphic backgrounds.
Designer provides the following simple actions that you can attach to
navigator objects:

Open another navigator.

Open a view or folder.

Serve as an alias for a folder.


Click the object to display the contents of the designated folder in the
view pane.

Open a database, view, or document link.

Open a URL.

9-18 Application Development with Domino Designer

To create more complex flexible actions use @function formulas or a


LotusScript program. LotusScript programs can perform tasks that arent
possible with @function formulas. For example, manipulating a database
ACL.
For more information on writing formulas and scripts for buttons and
hotspots, see the Domino Designer Programming Guide.

If you cant copy and paste a navigator that is similar to the one you
need, create a new navigator.
1. Select Other - Navigators in the Design pane.
2. Click New Navigator.
3. Choose Design - Navigator Properties.
4. Give the navigator a name that describes its use.
5. To use the navigator in a Web application, select Web browser
compatible.
6. (Optional) Choose an initial view or folder to open along with the
navigator.
7. (Optional) Select Auto adjust panes at runtime so that users wont
have to manually resize a navigator that doesnt fit a window.
8. Click the navigator window.
9. Use the Create menu or the SmartIcons bar to draw objects or paste
objects from the clipboard.
10. Click each object and choose Design - Object Properties to assign a
name and style.
11. In the Programmers pane, select a Run option and assign actions to
each object. Run options specify what happens when users click the
object.
Select Simple action to choose a predefined automation, such as
Open a View.
Select Formula to define an action using the formula language.
Select Script to define an action using LotusScript.
12. Close and save the navigator.

Designing Navigation for an Application 9-19

Building Applications

Creating a navigator

To edit a navigator
1. Open the navigator in Designer.
2. Choose Design - Navigator Properties and make changes as needed.
3. (Optional) To change any object, click on the object, select Design Object Properties, and make changes as needed.

Adding graphic objects to navigators


You can create graphic objects in another product, such as a drawing,
charting, or mapping package, and import or paste the objects into a
navigator as a graphic background for the whole navigator or as a button
that you automate with an action. A navigator can have only one
background graphic, but it can have many buttons.
Designer includes a set of drawing tools, available on the SmartIcons bar
or on the Create menu, that you can use to create or enhance graphic
components of a navigator. The drawing tools are displayed in the
SmartIcons bar when the navigator is in Designer.
Note that polylines do not work on the Web, even though they display
on the Web.

Adding and enhancing graphics in a navigator


The following types of files can be pasted or imported into a navigator:
BMP (Bitmap)
GIF
JPEG
PCX
TIFF 5.0s
Note Graphic backgrounds cannot be moved; graphic buttons can be
moved.
To paste a graphic from another product
1. Create a new navigator, or open an existing navigator.
2. Choose one of the following:
Create - Graphic Button to paste the graphic as a button on the
navigator.
Create - Graphic Background to paste the graphic as a background
for the navigator.
3. If you are creating a Graphic Button, drag the graphic where you
want the button to appear.
9-20 Application Development with Domino Designer

To import a graphic
1. Create a new navigator, or open an existing navigator.
2. Choose File - Import.
3. Select the file to import and click OK.

To edit a graphic
Double-click a drawn object to edit its properties. For example, you can
change colors or widths of lines on drawn objects.
Use drawing tools available from the Create menu or the SmartIcons bar
to enhance existing objects.
To edit an object that is under another object, click the overlying object
and choose Design - Send to Back and then select the object you want to
edit. Hotspots are always on top and cannot be sent to the back.
To delete a navigator object
To delete a navigator object (such as a button, graphic button, or
rectangle), select the object and choose Edit - Delete.
To remove a graphic background, choose Design - Remove Graphic
Background.
Tips for drawing new navigator objects
To create several identical navigator objects quickly, hold the SHIFT
key down while choosing Create. Draw all the objects you need;
choose Create - <shape name> to exit create mode.

To draw a square or a circle, hold the SHIFT key down while


dragging the shape.

To move an object that isnt locked into position, drag the object to a
new location.

To resize an object, click the object, position the cursor on one of the
sizing corners, and drag the object to the size you want.

To line up objects at a grid mark, choose Design - Navigator


Properties, click the Grid tab, and select Snap to grid. Choose a
grid size (1 pixel is the most precise).

To freeze an object at its current position and size, click the object,
choose Design - Object Properties, and select Lock size and
position.

Designing Navigation for an Application 9-21

Building Applications

4. Click Graphic Button to import the graphic as a button, or click


Graphic Background to import the graphic as a background for the
navigator.

Adding text to and highlighting navigator objects


You can add text to most objects, including buttons, rectangles, polygons,
and so on. You cannot add text to the following objects: polylines,
hotspot rectangles, hotspot polygons, graphic buttons, and graphic
backgrounds. You can also highlight an object. When an object is
highlighted, its appearance changes when the cursor is over it or when it
is clicked.
1. Create a new navigator, or open an existing navigator.
2. Click a navigator object.
3. Choose Design - Object Properties.
4. Click the Info tab. Enter text for the object in the Caption box..
5. Click the HiLite tab.
Select Highlight when touched to show the highlighted style
when the users cursor passes over the object.
Select Highlight when clicked to show the highlighted style
when the user clicks the object. The object remains highlighted
until the user clicks another object.
6. (Optional) Change the highlight border width, highlight border
color, and highlight background color.
7. (Optional) Click the Styles tab and do one of the following to define
the unhighlighted style:
Select a border width, border color, and background color.
For a button, select a button face color, bevel width, and border
color.
Select Make Default to apply to all new objects of this type.
8. Close and save the navigator.
Tip Choose Design - Preview in Notes or Design - Preview in Web
Browser <browser> to select the highlight settings.

Adding hotspots
A hotspot is a programmed area that you click to execute an action.
Hotspots are always topmost on a navigator you cannot send them to
the back.
To automate a hotspot, attach an action to it. For example, if your
navigator is a map, you can create hotspots so that a user clicking on a
region in the map views information about that region.

9-22 Application Development with Domino Designer

To create a hotspot
1. Create a new navigator, or open an existing navigator.
2. Use the Create menu to add a hotspot. For example, Create - Hotspot
Polygon. (Or select a hotspot tool from the SmartIcons palette.)
3. Click on the navigator and drag to create the hotspot. The polygon
tool allows you to create a line segment each time you click.
Double-click to complete the drawing and close the polygon hotspot.

Adding actions to navigators


After you add objects to a navigator, you automate the objects by
attaching actions to them. For example, to program a graphic button so
that it opens a particular view when a user clicks it, select Run: Simple
Actions and then choose Open a view or folder in the Action field of
the Programmers pane. Then select a particular view in the
Programmers pane.

Simple actions for navigators


You can use these simple actions for navigators.
Action: Open a view or folder
When users click an object that opens a view or folder, the preview pane
(if it is open) changes to display the selected document in the new view
or folder.
Action: Alias a folder
When users click an object that activates a folder, the folder activated by
that object replaces the current folder (if one is open). To return to the
original folder, use View - Go To.
Action: Open another navigator
When users click this object, the current navigator (if there is one) is
replaced by the new navigator. The replacement navigator must be from
the same database.
Action: Open a link
The action prompts you to paste a link to a document, view, or database.
When a user clicks this type of object, Designer presents the specified
document, view, or database.
Action: Open URL
The action prompts you to specify a URL to open. Clicking the navigator
object opens the URL.
Designing Navigation for an Application 9-23

Building Applications

4. (Optional) Double-click the hotspot to edit its properties.

Custom actions
You can use an @function formula or a LotusScript program to define a
custom action. A navigator that runs an @function formula allows you to
create specialized actions that arent related to switching to a view, a
folder, a navigator, or a link.

To attach an action
1. Create a new navigator, or open an existing navigator.
2. Select a navigator object.
3. In the Programmers pane, click Run: Simple action(s).
4. Select the simple action to run and supply any required information.
5. Close and save the navigator.

To attach a formula or script


1. Create a new navigator, or open an existing navigator.
2. Select the navigator object.
3. To add a formula, select Run: Formula in the Programmers pane.
Then, type the formula and click the green check mark to confirm it.
4. To add a script, select Run: LotusScript in the Programmers pane.
Then, write the LotusScript program.
5. Close and save the navigator.
For more information on writing formulas and scripts for buttons and
hotspots, see the Domino Designer Programming Guide.

Examples
This section includes examples of automating navigators.
Opening a view
A navigator that switches to another view gives users a graphical way to
choose a view so they dont need to know the name of a view in the view
pane. The Main Navigator in the Discussion template uses objects to
open these views: All Documents, By Category, and By Author.
Creating a navigator object that opens a navigator
A navigator object (such as a button) that switches to another navigator is
a graphical way to guide users through a series of decisions to reach the
information they need.

9-24 Application Development with Domino Designer

This navigator displays a bar chart created in 1-2-3.

Creating a shortcut navigator with an @function formula


This shortcut navigator allows users to click the icon instead of using the
Create menu to create a new Action Item document.

Designing Navigation for an Application 9-25

Building Applications

To find out more information, users click a bar that represents an areas
sales. Each bar in the first navigator is a hotspot rectangle that takes users
to the Weekly Details by Country navigator. When users reach the
second navigator, they see another bar chart that displays weekly sales
by individual country. Clicking a bar in this chart opens the view for the
country (for example, View by country\France). Each bar in the second
navigator is a hotspot rectangle whose Open a view or folder action
specifies the appropriate country view.

The action for the icon is Run a formula with the formula:
@Command([Compose];"";"3. Action Item")

Making a navigator object that runs a LotusScript program


When users double-click the navigator object (for example, a button), this
script opens the current database:
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Call db.Open("", "")
Messagebox(db.Title & " " & db.FileName)
If db.IsOpen = True Then msg$ = "open" Else msg$ =
"closed"
Messagebox("Database is " & msg$)
End Sub

Displaying a navigator when users open a database


You can set up a navigator to appear when users open a database. The
navigator can display in the Navigator pane or in a full-screen window.
For example, the interface to an online Help system might be a
full-screen navigator. If you set up the database to open a navigator, the
initial view of that navigator overrides the default view or the current
view for the database.
1. Select the database that contains the navigator you want to display
and choose File - Database - Properties.
2. Click the Launch tab.
To display the navigator in a navigation pane, select When
opened in the Notes client: Open designated Navigator.
To display the navigator in a full-screen window, select When
opened in the Notes client: Open designated Navigator in its own
window. Note that the regular navigation, view, and preview
panes are not available from a full-screen navigator, but users can
choose View - Go To and then choose the view name to return to a
specific view.
3. Select Standard Navigator in the Type of Navigator field.
4. Select the name of the navigator in the Name field.

9-26 Application Development with Domino Designer

Hiding navigators
Designer includes several ways to hide a navigator from users. There
may be times when you want to present one navigator to Notes users
and another to Web browser users.

To hide a navigator from Web users


Open a database in Designer and click Other - Navigators in the Design
pane. Highlight a navigator name in the Work pane and choose Design Design Properties. Click the Design tab and select Hide design element
from Web browsers.
To hide a navigator from users of Notes Releases 4 and higher
When you have a navigator tailored to users of older Notes releases,
open the database in Designer, click Navigators in the Design pane,
highlight a navigator name in the Work pane, and choose Design Design Properties. Click the Design tab and select Do not show this
design element in menus of Notes R4 or later clients. The navigator
doesnt appear to anyone using Notes Release 4.0 or higher.

Embedding navigators in a form, subform, page, or document


Embedding a navigator in a form, subform, page, or document gives you
control over the display of a navigator on the Web. It also allows you to
combine the navigator in the same window with other objects.
Note For compatibility with previous releases, the reserved field
$$NavigatorBody still works on forms. It duplicates functionality now
provided by embedding.

To embed a navigator in a form, subform, page, or document


1. Open a form, subform, or page in Designer or open a document in
the Notes Edit mode.
2. Place the cursor where you want to embed an element.
3. Choose Create - Embedded Element - Navigator. The Insert
Embedded Navigator dialog box appears.
4. Select a navigator to embed.
Designing Navigation for an Application 9-27

Building Applications

To hide a navigator from Notes users


Open a database in Designer and click Other - Navigators in the Design
pane. Highlight a navigator name in the Work pane and choose Design Design Properties. Click the Design tab and select Hide design element
from Notes R4.6 or later clients.

5. (Optional) If you dont want to display the same navigator in all


circumstances, click Choose a Navigator based on a formula in the
Insert Navigator dialog box. When you click OK to close the dialog
box, write a formula in the design pane to display the appropriate
navigator.
6. (Optional) Click the embedded element and choose Element Navigator Properties. The Embedded Navigator Properties box
appears. You can then change the alignment, style, or hide the
element under certain conditions.
7. Close and save the form, subform, page, or document.
To change the navigator, click the embedded navigator and choose
another from the list in the Programmers pane.
You can embed multiple navigators anywhere on a form, subform, page,
or document, in tables, in collapsed sections, and in design elements
having a left, right, or center alignment. Avoid hiding embedded
navigators with the Hide design element from Web browsers option.
Forms with hidden navigators wont display on the Web.

To delete an embedded navigator


To delete an embedded navigator, click it and choose Edit - Delete.

Overriding an embedded navigator with a navigator template


A navigator template is a navigator that has the name
$$NavigatorTemplate for <navigator name>. In a Web application,
Domino displays the navigator that was named in the form or page name
in every embedded navigator. To override this behavior, designate only
one embedded navigator as the one to reference the form name navigator
or page name navigator and ignore its original value.
There is no equivalent procedure for $$NavigatorBody fields.
1. Select the embedded navigator and choose Element - Navigator
Properties. The Embedded Navigator Properties box appears.
2. Click the Info tab and select Display navigator specified in form
name when this form is used as a Navigator Template.

9-28 Application Development with Domino Designer

Importing a navigator into a form, subform, page, or document


When you import a navigator into a form, subform, page, or document, a
composite image of the navigator is pasted in. The imported navigator
actually becomes a picture object so that you edit it. The navigator text
boxes, graphic buttons, polygons, and other navigator objects are
converted to imagemap hotspots on the newly created picture object.

Note that you can import only navigators that are Web-browser
compatible. Select Web browser compatible at the Info tab of the
Navigator Properties box for the navigator you want to import.
When you import a navigator, navigator simple actions are converted to
equivalent hotspots:
Navigator Simple Action

Hotspot equivalent

Open another Navigator @Command([OpenNavigator];NavigatorName)


Open a View or Folder

@Command([OpenView];ViewOrFolderName)

Alias a Folder

@Command([OpenView];FolderName)

Open a Link

Resource link of type link

Open URL

Resource link of type URL

To import a navigator into a form, subform, page, or document


1. Open a form, subform, or page in Designer or open a document in
Edit mode.
2. Place the cursor where you want the imported navigator to display.
3. Choose Create - Embedded Element - Import Navigator. The Import
Navigator dialog box appears.
4. Select a navigator to import.
Note that the navigator you select must already be saved as Web
browser compatible.
5. Save and close the form, subform, page, or document.

Designing Navigation for an Application 9-29

Building Applications

An advantage of importing a navigator is that formulas and LotusScript


that were originally attached to navigator objects become attached to the
imagemap hotspots. Imported navigators, unlike navigators and
embedded navigators, allow you to make changes to the formulas and
the LotusScript. An imported navigator, unlike an embedded navigator,
has no links to the original navigator.

Testing navigators
To test a navigator while you design it, switch to Testing mode to see if
the simple action, formula, or script runs.
For navigators that perform multiple steps or complex tasks, split the
process into several small tasks and create an action for each. Test and fix
each small task first. When everything is working correctly, combine the
formulas into one, and then test the automation again by creating a
sample copy of the database and testing all navigator behavior. You can
preview in either Notes or a Browser to see how the action actually
performs.
To test a navigator, follow these steps.
1. Create a new navigator, or open an existing navigator.
2. Choose Design - Preview in Notes or Design - Preview in Web
Browser <Web browser>.
3. Highlight and click each object to see if it works correctly.
4. If the test produces unexpected results, close the previewed item and
use the Windows task bar to return to Designer.
5. Correct the problems and run the test again.
6. When the test shows no problems, close and save the navigator.

Creating an imagemap
An imagemap is a graphic you enhance with programmable hotspots
that perform some action when a user clicks on them. Image maps are
often used as navigational structures in an application. For example, an
imagemap of a plate of food might have hotspots users click to see
recipes for the food pictured. Unlike a navigator, which is an
independent design element, an imagemap resides on a page or form, so
you can easily combine an imagemap with text and other page or form
elements, and you can control the display of an imagemap using a
hide-when or computed-for-display formula. If you plan to create a site
map or navigator that combines several graphics with text and action
buttons, create a navigator instead of an imagemap.
An imagemap can be any graphic you can paste or import into a page or
form, with the exception of graphics in PI format. If you create an
imagemap and then need to change the graphic, you can change the
graphic while keeping the hotspots intact.

9-30 Application Development with Domino Designer

To create an imagemap
1. Paste, create, or import a graphic or image resource on a page or
form.
2. Select the graphic.
3. Choose Picture - Add Hotspot <hotspot shape>.
4. Click and drag to draw the hotspot on the graphic.

5. Do one of the following:


Choose Picture - Hotspot properties. On the Hotspot Info tab of
the Hotspot <shape> Properties box, specify a link, named element
link, or URL link. For information on linking, see the topic
Creating links in the chapter Designing Pages.
In the Script area of the Programmers pane, specify a simple
action , formula, or LotusScript or JavaScript routine to run when
a user clicks the hotspot.
6. On the Advanced tab, add alternate text.
7. (Optional) Specify a target frame where the linked document will
display when a user clicks the hotspot.
8. (Optional) On the Advanced tab, specify the Imagemap tab order for
the hotspot. The tab order specifies the order in which hotspots are
selected when a user presses the TAB key.
To move a hotspot
Once you create a hotspot you can move it as necessary. To move a
hotspot, do one of the following:

Click and drag the hotspot that you want to move.

Select the hotspot and use the arrow keys to move one pixel at a
time.

To delete a hotspot from an imagemap


1. Select the hotspot.
2. Choose Picture - Delete Selected Hotspot(s).

Designing Navigation for an Application 9-31

Building Applications

Note To draw a polygon hotspot, click the points of the polygon,


double-clicking to close the shape. To draw a hotspot around the
entire graphic, select Default Hotspot.

To copy an imagemap
You can copy an imagemap from another page, form, or document, and
Designer will maintain all of the hotspots from the original imagemap.
1. Select an imagemap and copy it to the Clipboard.
2. Open the page or form where you want to place the imagemap and
choose Edit - Paste.
To change the graphic for an imagemap
1. Select the current graphic.
2. Choose Picture - Replace picture.

9-32 Application Development with Domino Designer

Chapter 10
Automation in Applications

Automation
Automation in an application speeds up repetitive tasks, handles
workflow, updates information, performs calculations, runs programs,
and checks for errors.
You can add automated components to most design elements in a
Domino application: a database, a page, a frameset, a view, a form, or a
document. The automated components include:

Actions
Use an action with a form or view to set up a user-activated task.
You can make the action available in the Actions menu or as a button
in the action bar. In particular, use actions to simulate Notes menu
items for Web browser users. Then, those users can complete Notes
tasks when accessing Domino databases.

Hotspots
Use a hotspot in a form or document to set up a user-activated task.
The hotspot can be a link to another Web site, database, or element in
a database; a button; a pop-up; or an action.

Agents
Use agents to set up user-activated tasks, or background tasks, in any
part of a Domino application. Agents can be simple, such as moving
documents to a folder, or complex, using Java programs to run
multiple automated tasks at scheduled times. Agents are stored with
databases, but you can use them to run automated tasks for views,
documents, fields, and databases.

Programs that are activated by an event


Associate an automated task with an event that occurs when a design
element is used. For example, set up an error-checking automated
task to verify user input after a user has saved a document.
10-1

Building Applications

This chapter explains how to add automation features to an application


to make it easier to perform tasks in the background.

To set up the tasks associated with these automated components, use the
following:

Simple actions
You can add automation to design elements without knowing a
programming language. You can select one or more simple actions
from a list. Simple actions cant be customized and are not supported
in Web applications.

Formulas
You can write an @function formula that runs by itself or with a
simple action. You cannot combine LotusScript in an @function
formula. You can use some @functions in LotusScript using the
LotusScript Evaluate function.

LotusScript
LotusScript is a complete scripting language that can support most
application-wide tasks.

JavaScript
Use JavaScript triggered in events (for example, onClick of a button
or onLoad of a form) to interact efficiently with the user for tasks
such as form and field validation and simulating dialog boxes. Use
Common JavaScript to enter code that works on both the Notes client
and the Web.

Java
You can write Java programs or import Java files into agents.

Note Lotus Domino Designer 6 now supports code modules that are
lgreater than 64K for LotusScript, JavaScript, and Java.

Actions
You can create an unshared action in a view, folder, form, page, or
subform to provide one-click shortcuts for routine tasks in a view or
document. Actions become part of a design elements design and are not
stored with individual documents.
You can also create a shared action in a database that can be used in
multiple views, folders, pages, forms, and subforms. Shared actions are
stored as shared resources in the database.
To build an action, you can use any of the following:

Simple actions that you select from a list

Formulas

10-2 Application Development with Domino Designer

LotusScript

JavaScript

Common JavaScript

When Web browsers accessing the database need substitutes for


Notes menu choices.

To present a shortcut as a clickable button.

When the automated task is relevant only to a subset of documents.

When users need to see all the available choices in a row at the top of
a document.

When the automated task isnt limited to a particular section of a


form.

If formulas are complex and you dont want to save the formula with
each document.

Examples of actions
View actions Let users create, print, delete, or categorize
documents.

Form actions Process an approval; mail a document; or give Web


users, who dont have access to Notes menus, a way to click to edit,
save, or close documents.

Simulate Notes menus for Web users.

Automatically send documents to reviewers.

Automatically process employee requests.

Notes on actions
Some views and forms in databases contain system actions, available
either in the Actions menu, as buttons, or both. You cant change the
System actions functionality, but you can customize their appearance
in the action bar. Open the view or form. Click Objects and the system
actions are displayed in the list.

Automation in Applications 10-3

Building Applications

When to use actions


Because actions are available in a view or document, use them for any
general-purpose task related to a group of documents. For example, use
actions:

Hotspots
Hotspots are associated with text or an image in the body of a document
and can complete any of these types of automated tasks:

Link
Open a Web site, a database, or an element in a database (a page,
view, frameset, form, document, folder, or navigator).

Text pop-up
Display information in a pop-up.

Button
Complete a programmed task, using simple actions, formulas,
LotusScript, JavaScript when the button is used in the Notes client. In
addition, you can code the same button to run JavaScript when the
button is used in a Web browser.

Formula pop-up
Complete a programmed task using only formulas, with the results
displayed in the pop-up.

Action hotspot
Complete a programmed task using simple actions, formulas,
LotusScript, or JavaScript when the action hotspot is used in the
Notes Client. In addition, you can code the same action hotspot to
run JavaScript when the action hotspot is used in a Web browser.

When to use hotspots


Create a hotspot in a document when the hotspot is specific to the
document. Create a hotspot in a form when every document using that
form needs the hotspot.
Examples of hotspots
Use a document or database link to provide a cross-reference for
more information that is stored in a document in other database.

Use a URL link to cross-reference a Web site for downloading


software.

Use a text pop-up to provide help information about what values to


specify in a field.

Use a button to submit a completed document for processing or add


a database to a users workspace.

10-4 Application Development with Domino Designer

Agents
Agents are stand-alone programs that perform a specific task in one or
more databases. Agents are the most flexible type of automation because
they:
Can be run by users in the foreground or run automatically in the
background as scheduled agents.

Are not associated with a specific design element.

Can be run on a specific server, on several servers, on workstations,


or the Web.

Can call other agents.

Can consist of simple actions, formulas, LotusScript, or Java


programs.

Can be distributed easily because they can be replicated.

Can be shared or private.


A shared agent is created by one user and can be run by other
users.
A private agent (sometimes called a personal agent) is usually
created and run by the same user. In Lotus Notes, the private
agent is not available on the Actions menu. In Domino Designer,
anyone with Designer level access or higher can see and run a
private agent.

Because agents are so flexible and powerful, you might consider their
characteristics first to decide the type of agent you want to build, and
then build it.
The Agent Manager supports all aspects of running and troubleshooting
agents. The Agent Manager checks security, manages agent scheduling,
monitors events and starts the appropriate agents when their associated
events occur, records information in a log (the Agent Log), and performs
database operations to run the automated tasks associated with the
agent. Although you dont work directly with the Agent Manager, you
use its components for troubleshooting an agent.
When to use agents
Use agents for database-wide and domain-wide automated tasks and for
complicated automated tasks. You can use them to easily access, process,
and manage data on other servers or in other databases.
See Agents to run before Web users open or save documents for an
example.

Automation in Applications 10-5

Building Applications

Notes on agents
Some databases and templates have built-in agents. For example, the
mail template has several built-in agents that let users manage their
messages and customize their mail databases.
To see the agents in a database, select the database and choose View Agents.

Events
When users work in Domino design elements, Domino tracks their
operations as events (for example, opening a database, opening a view,
opening a document). You can attach programming tasks to these events.
To build a program for an event, you can use:

Formulas

Simple actions

LotusScript

JavaScript

Common JavaScript (which works on both the Web and the Notes
client)

When to use event programming


Use event programming to run tasks that users shouldnt have to activate
themselves and that are very specific. Event programming is particularly
useful when the timing of the program must be precise or the tasks are
associated with a particular design element.
For a table of events that can be automated, see Event Descriptions in the
Domino Designer Programming Guide.
Examples of event programming
Error checking when a user completes a field or closes a document

Recalculating fields when a user saves a document

Prohibiting certain actions in a document

Prompting for user input

Displaying information when a user clicks a button

10-6 Application Development with Domino Designer

Types of events
Every design element has events that you can program, but they vary
according to the design element. In the Programmers pane, click the
Objects tab to review the events you can program.

Examples:
PostOpen open a specific view to direct users to action items

QueryDocumentDelete prevent users from deleting a particular


document when the value of a status field on an action item is
Open.

PostDocumentDelete archive a deleted document.

QueryClose prevent users from closing a database when there are


still action items in the action item view assigned to them.

View and folder events


View events occur when users work in a specific view or folder. View
events include opening or closing a view, adding documents to a
calendar view, or adding documents to a folder.
Examples of view and folder events
QueryOpen prevent users from opening a view in certain
circumstances such as from opening a month end view before the
twentieth day of the month.

PostOpen create a new document or open an existing one.

QueryRecalc inform users before a large view refreshes that it


could take a while and ask them if they really want to proceed.

QueryPaste prevent users from pasting documents into the


database.

PostPaste change the value of StartDateTime and EndDateTime in


the document when you paste an appointment on a particular day
and time slot.

QueryClose prevent users from closing a view such as when there


are still action items in the action item view assigned to them.

QueryAddToFolder lets you prevent someone from dragging a


document from one folder or view to another. For example, you can
prevent documents from moving to the Done folder if their status is
still Open. Note that the trigger for this event is in the view or folder
from which the document is moved.
Automation in Applications 10-7

Building Applications

Database events
Database events pinpoint database-wide activities such as opening and
closing a database or deleting and undeleting documents.

In addition to the events available for all views, calendar views have
specific events.
Examples of calendar view events
RegionDoubleClick create a new document when users click an
area in a calendar view.

QueryDragDrop prevent someone from dropping an appointment


on an inappropriate day or time, such as a weekend day or a time
that is after 5 PM.

PostDragDrop change the value of StartDateTime and


EndDateTime in the document after you drop an appointment on a
particular day and time slot.

Form events
Form events occur at the document level when users open or close a
document. They are useful for speeding up document display times
because they execute only when a specific form event occurs, unlike field
recalculations that occur each time a document is saved, opened, or
refreshed.
Examples
Initialize load an additional program before a document displays.

QueryClose check for errors and validate fields before closing a


document.

QuerySave reset a field value when users save documents rather


than using conditional formulas in the field itself. For example, to
reset the status field if the document is being saved, create a script
for a QuerySave event rather than include a formula that uses
@If(@IsDocBeingSaved;x;y).
With QuerySave, you can also execute processing logic and avoid the
unnecessary recalculations inherent in computed fields. For example,
you have a form with a hidden computed field called State that
determines where documents are in the workflow and where they
need to be sent. By replacing the field formula with a LotusScript
program that sets a field value during the QuerySave form event, set
the field value in the document only when it is saved, not when it is
opened or refreshed.

10-8 Application Development with Domino Designer

Field events
Field events capture users movements into or away from a field.
Examples
Entering refresh hide-when formulas

Exiting guide users to a certain field

Exiting verify that users supplied valid information

Examples
Compose a new document

Save a form

Make a calculation

Agent event
The Initialize event stores all the programming associated with the agent.
Always add the programming to the Initialize event for an agent.

Creating a form, subform, page, or view action


You can create actions in forms, subforms, pages, views, or folders to
provide one-click shortcuts for routine tasks in a view or document.
Actions become part of a design elements design and are not stored with
individual documents. To create an action:
1. Open a form, subform, page, view, or folder.
2. Choose Create - Action - Action. The Actions Properties box appears.
Note that from the Create - Action menu you can also create an
action with subactions or you can insert system actions or insert
shared actions.
3. On the Action Info tab, do one of more of the following:
Enter a name for the action.
Label name - If you want dynamic labeling of actions, you can enter
a formula in the label field. The dynamic label then appears as the
name in the button or checkbox and on the action menu. Note that
dynamic labeling works only in Lotus Domino Designer 6 or later.
Earlier versions of Domino Designer use the name as the label.
Automation in Applications 10-9

Building Applications

Click events
The Click event occurs when users click actions or hotspots, or choose
tasks from the Actions menu. Other events for actions, buttons, and
hotspots allow you to add programming to other events. After the object
is loaded, the initialize event is triggered and then the click event is
triggered.

If applicable, specify a target frame (in the current frameset) to be


the target of the action. For example, if you create an action that
opens a view, specify the name of the frame in which the view
should open.
Select the display type for the action. You can choose Button,
Checkbox, or Menu separator.
Checkbox lets you show the state of an item (checked or
unchecked). If you choose Checkbox, you can enter a Value in the
Value field (for example, a formula that evalutes to true of false).
You can also highlight the Click event in the Objects list of the
Programmers pane to enter a Click value. If you want the action
bars state (checkbox) to be reevaluated when a different
document becomes current, make sure to check the Evaluate
actions for every document change option at the Options tab of
the Views Properties box. You can also use the @GetViewInfo
function.
If you choose Menu separator, a menu separator appears and
there is no action. You can also use menu separators between
subactions of an action drop-down list.
Check Include action in Action bar to make the action available
as an item in the action bar.
If the action is a button action, you can also choose to have only
the icon appear in the action control bar.
Check Right align action control to have the action control
aligned on the opposite side of whatever is set in the Action Bar
Properties box. Note that it may not necessarily be right aligned.
For example, If you choose Buttons start at left in the Action Bar
Properties box and Right align action control in the Action
Properties box, then the button appears on the right. However, if
you chose Buttons start at right in the Action Bar Properties box
and Right align action control in the Action Properties box, the
button is actually aligned on the left, that is, on the opposite side
of the setting in the Action Bar Properties box.
Check Include action in Action menu to make the action
available as a menu item in the Actions menu.
You can select an icon to appear on the action button. If you prefer
a Notes graphic, select Notes and then click Image to select a
graphic for the icon from a set available in Notes.
If you prefer a customized graphic, select Custom. In the Image
field, specify the name of an image resource or click the folder
icon to browse for an image resource. The image resource must
reside in the current database. You can specify the name of an
10-10 Application Development with Domino Designer

image resource that does not yet exist. Designer warns you that
the image does not exist and that you must create it later. Click @
and specify a formula (or set of formulas) to display an image
programmatically.

4. (Optional) On the Action Hide When tab, specify when to hide the
action.
5. (Optional) On the Advanced tab, specify how Notes workflow
proceeds after the user activates the action.
6. In the Info List of the Programmers pane, click Objects and select the
action you just created.
7. To program the action to run one of the client or one of the Web
program code types, choose either Client or Web at the Run
pull-down list.
Choose Client when the automated task will run in the Notes client.
You can then select one of the following Client code options:
Simple actions
Formula
LotusScript
JavaScript (runs only on the Notes client)
Common JavaScript (runs on both the Notes client and the Web)
Choose Web when the automated task will run in a Web browser.
You can then select one of the following Web code options:
JavaScript (runs only on the Web)
Common JavaScript (runs on both the Notes client and the Web)
8. Save the form, subform, page, view, or folder.
To create an action with subaction
Creating actions with one of more subactions lets you create a
hierarchical list of actions. You can also drag and drop actions to create
hierarchies. To create an action with subactions:
1. Open a form, subform, page, view, or folder.
2. Choose Create - Action - Action with Sub Action. A main action with
an indented sub-action appears in the Action pane. The Actions
Properties box also appears.

Automation in Applications 10-11

Building Applications

Tip If you do not specify a name or label for the action, Notes will
use the graphic for the whole button. You wont be able to see the
action in the action list, because theres no name for it, but you can
click on the space at the end of the action list to access it.

3. Define the main action and the sub-action.


You can also drag and drop other actions so they are subactions of
the main action.
To create system actions
When you create system actions, you are creating a predefined list of
common view and form actions.
1. Open the form or view.
2. Choose Create - Action - System actions. The list of actions created
appears in the Action pane. These system actions include:
Categorize
Edit document
Send document
Forward
Move to folder
Remove from folder
Copying and deleting actions
To copy: select the action in the Action pane and choose Edit - Copy and
Edit - Paste.
To delete: select the action in the Action pane and choose Edit - Delete.
To change properties: select the action in the Objects list and choose
Design - Action Properties.
To change automation: select the action in the Objects list and edit the
programming tasks in the right pane.
Actions menu
The Actions menu is a context-sensitive list of any actions and agents
available for a particular part of an application, as well as some menu
commands included with the Notes software. From an open view, Notes
users see only those actions associated with the view, plus any manually
run agents. From an open document, Notes users see the actions
associated with the form used to create the document, plus any manually
run agents. Web users dont see the Actions menu.
Calling an agent
You can use a form or view action to run an agent. Use the
@Command([RunAgent]), @Command([ToolsRunMacro]), or the
OpenAgent URL command to call an agent.

10-12 Application Development with Domino Designer

Examples: actions
Simulate Notes menus for Web users
Web users dont have access to Notes menu choices when they work in
Domino databases. Therefore, you should create menu equivalents for
them.

To Web-enable all buttons in a database as well as certain @commands,


select the database property Web access: Use JavaScript when
generating pages. Without this property set, Domino recognizes only
the first button in a document and treats it by default as a Submit button
that closes and saves the document.
Be aware that Domino displays all buttons, actions, and hotspots even
those that contain @commands and @functions that arent supported for
Web applications.
Complete these steps to create a button to open a new Main Topic in the
current database:
1. Open the view where you want to add the button for Web users.
2. Choose Create - Action - Action.
3. Complete the Action Properties box. On the Action Info tab, do the
following:
Enter the name Create Main Topic.
Select Include action in button bar.
Select Notes graphic and select a graphic for the button.
4. In the Info List, click Objects and click Create Main Topic.
5. In the Run pull-down list, select Client and then Formula.
6. Enter this formula:
@Command([Compose];"Main Topic")

7. Save the view.

Automation in Applications 10-13

Building Applications

Create actions with @command formulas and make them available as


buttons in the action bar. Keep in mind that Domino cannot translate
commands based on a selected document in a view because there is no
notion of a selected document on the Web. For actions such as Create
Response Document, you must add a form action to the Main Topic
form for opening a Response document.

Examples of other commonly used menu items:

Create a document
@Command([Compose]; "formname")
@Command([Compose];"":"database"; "formname")

Open a view
@Command([OpenView]; "viewname")
@Command([OpenView];"":"database"; "viewname")
@Command([OpenView];"By Date")

Delete an open document


@Command([Clear])

Close an open document or view


@Command([CloseWindow])

Sending a document to reviewers


You want to simplify the process of distributing proposed concert
schedules to a review board.
1. In the Concert Schedule form, create a field of type Names that will
specify all the reviewers.
2. In the Concert Schedule form, choose Create - Action - Action and
specify the following in the Action Properties box:
Name Enter Distribute for Review.
Display Select Include action in button bar; deselect Include
action in Action menu.
Button Graphic Select Notes graphic and pick a graphic from
the pull-down list.
3. In the Info List, click Objects and select Distribute for Review
(Action).
4. In the Run pull-down list, select Client and then Simple action(s).
5. Select the Add Action and Send Document actions.
6. Save the form.
Approving and denying requests
You want to improve a Requisition form to make it easy for managers to
approve or deny requests that are mailed to them. You create two form
actions: Approve Request and Deny Request.

10-14 Application Development with Domino Designer

The Approve Request action uses this formula to change the


documents status to Approved and routes the document to the next
approver:

The Deny Request action changes the documents status to Denied and
routes a notification to the initiator.
FIELD Status:="Denied";
@MailSend(Initiator;"";"";"Re: Your request";"Your request
was unable to be approved. Contact " + PreviousApprover +
"for more information.");

Action bar
The action bar is a horizontal button bar that lies below the SmartIcons
bar. If there are system actions or actions you created to be displayed as
buttons, users see the buttons when they open the view or create a
document using the form.
The Action Bar Properties box lets you set the style of the action bar and
its buttons. You can also enable the Domino action bar applet for Web
users.
1. Choose Design - Action Bar. The Action Bar Properties box opens.
2. On the Action Bar Info tab, select one or more of the following:
Alignment - lets you choose whether to have the action bar
buttons align from the left or the right.
Web Access - lets you use the Domino action bar applet so that the
action bar displays better to Web users.
- To enable the applet, select Using Java Applet. The applet lets
Web users:
Scroll across the action bar, when needed.
For actions that have pull-down list selections for Notes client
users, the action selections are displayed as a second row of
buttons when the user clicks the main action. The second row of
buttons is displayed at 75% the size of the main action buttons.
Web users can view all the selections and click one to select it.
- To disable the applet, select Using HTML.
Automation in Applications 10-15

Building Applications

FIELD Status:="Approved";
@MailSend(NextApprover;"";"";"For your review";"Click
Approve Request to approve this requisition or click Deny
Request to return the request to " +
Initiator;"Initiator":"Body";[sign]);

Note If you want buttons to align from the right on the Web, you
must choose Using Java Applet.
3. On the Action Bar Size tab, select one or more of the following:
Bar height - choose one of the following:
- Default - automatically determines the appropriate height for the
action bar.
- Exs - specify the size of the action bar in exs. An exs is equal to
the size of the lower case of the font that you have chosen. A
height of three exs is equal to three times the size of the lower case
font you have chosen.
- Fixed - specify an absolute bar height in pixels.
Font, Size, and Style - if you selected Exs, specify the font, the size
of the font, and the style of the font (for example, bold or italic) for
the items in the Action Bar.
4. On the Action Bar Background tab, select one or more of the
following:
Color - specify a color for the background of the action bar.
Image - you can also choose to use an image for the background.
To use an image, click the folder icon and select the name of a
shared image resource that you have created and stored in the
database as a Resource, or click @ and specify a formula (or set of
formulas). Note that using an image may not be supported on the
Web.
Options - lets you choose how to present the background image.
For example, you can center it, tile it, repeat the image vertically,
and so on.
5. On the Action Bar Border tab, select one or more of the following:
Border style and color - choose the style and color of the action bar
border. For example, you can choose a solid line border or a
border with a ridge or no border at all.
Border effects - lets you choose to have a drop shadow border and
set its width in pixels.
You can also set the thickness of the border (as well as the
thickness of the outside and inside border, if applicable).
6. On the Button Properties tab, select one or more of the following:
Button Size - lets you set the height, the width, and the margin for
all the buttons on the action bar. If you choose Fixed size, you can
specify the size in pixels.

10-16 Application Development with Domino Designer

If you choose default for the height, for the width, or for the
margin, its size is automatically set. Note that if you have images
that are much taller than the font, you should not choose a default
height, but should specify a fixed height.
Button Options:

- Align text - choose whether to have button text aligned center,


left, or right.
- Internal margins - set the margins within the button in pixels.
- Always show drop-down - checking this causes the drop-down
character (down caret) to display inside the Action button. If this
is not checked, the drop-down character displays only on mouse
over.
Button Background - lets you either select a color for the button
background or use an image for the background. To use an image,
click the folder icon and select the name of a shared image
resource that you have created and stored in the database as a
Resource, or click @ and specify a formula (or set of formulas).
Note that using an image is not supported on the Web.
7. On the Button Font tab, select the font properties for the buttons on
the action bar. You can set the font, the size of the font, the color of
font, and the font style.

Creating and inserting shared actions


Shared actions are stored in databases and can be found under the
Shared Code heading in the Design pane. Once you create a shared
action, any other view, folder, form, subform, or page in the database can
access the shared action.

To create a shared action


1. Open the database where you want to store the shared action.
2. Click Shared Code in the Design pane.
3. Click Actions. A list of shared actions appears with information
about each shared action.
This information lets you know whether the shared action appears in
an action bar or in a menu, whether a graphic is associated with the
action, what the code type is (formula, simple action, LotusScript,
Automation in Applications 10-17

Building Applications

- Display border - controls when the button border displays. You


can choose to display the button border On Mouse Over, Always,
or Never.

JavaScript, or Common JavaScript), and whether the action appears


in Notes, on the Web, or for mobile users.
Note that if the database is set up to be a multilingual database,
shared actions can be grouped under multiple sections called shared
action notes. These shared action notes act like folders for different
languages.
4. To create a new shared action, click the New Shared Action button.
(If you have shared action notes, make sure you first select the
shared action note under which you want the shared action to
appear.)
The Actions Properties box appears.
5. On the Action Info tab:
Enter a name for the shared action.
Label name -If you want dynamic labeling of actions, enter a
formula in the label field. The dynamic label then appears as the
name in the button or checkbox and on the action menu. Note that
dynamic labeling works only in Lotus Domino Designer 6 or later.
Earlier versions of Domino Designer use the name as the label.
If applicable, specify a target frame (in the current frameset) to be
the target of the action. For example, if you create an action that
opens a view, specify the name of the frame in which the view
should open.
Select the display type for the action. You can choose Button,
Checkbox, or Menu separator.
Checkbox lets you show the state of an item (checked or
unchecked). If you choose Checkbox, you can enter a value in the
Value field (for example, a formula that evalutes to true of false).
You can also highlight the Click event in the Objects list of the
Programmers pane to enter a Click value. If you want the action
bars state (checkbox) to be reevaluated when a different
document becomes current, make sure to check the Evaluate
actions for every document change option at the Options tab of
the Views Properties box. You can also use the @GetViewInfo
function.
If you choose Menu separator, a menu separator appears and
there is no action. You can also use menu separators between
subactions of an action drop-down list.
Check Include action in Action bar to make the action available
as an item in the action bar.
If the action is a button action, you can also choose to have only
the icon appear in the action control bar.
10-18 Application Development with Domino Designer

Check Right align action control to have the action control


aligned on the opposite side of whatever is set in the Action Bar
Properties box. Note that it may not necessarily be right aligned.
Check Include action in Action menu to make the action
available as a menu item in the Actions menu.

If you prefer a customized graphic, select Custom. In the Image


field, specify the name of an image resource or click the folder
icon to browse for an image resource. The image resource must
reside in the current database. You can specify the name of an
image resource that does not yet exist. Designer warns you that
the image does not exist and that you must create it later. Click @
and specify a formula (or set of formulas) to display an image
programmatically.
6. Click the Hide When tab to specify when to hide the action.
7. Click the Advanced tab and specify how Notes workflow proceeds
after the user activates the action.
8. In the Info List of the Programmers pane, click Objects and select the
shared action you just created.
9. To program the shared action to run one of the client or one of the
Web program code types, choose either Client or Web at the Run
pull-down list.
Choose Client when the automated task will run in the Notes client.
You can then select one of the following Client code options:
Simple actions
Formula
LotusScript
JavaScript
Common JavaScript
Choose Web when the automated task will run in a Web browser.
You can then select one of the following Web code options:
JavaScript
Common JavaScript
10. Save the shared action.

Automation in Applications 10-19

Building Applications

You can select an icon to appear on the action button. If you prefer
a Notes graphic, select Notes and then click Image to select a
graphic for the icon from a set available in Notes.

To create shared action notes


A shared action note is found only in multilingual databases and acts as
a folder for shared actions of one language. Each shared action note in a
database contains the same actions. The difference between the shared
action notes is the language and the region to which they are set.
To create shared action notes in a multilingual database:
1. At the Design tab of the Database Properties box, check
Multilingual database so that the database is set as a multilingual
database.
2. Click Shared Code in the Design pane.
3. Click Actions. At least one collapsible shared action note appears.
4. Select the shared action note and choose Design - Design Properties.
The Design Document Properties box appears.
5. At the Design tab, select the language and the corresponding region,
if any, for all the actions contained in this shared action note (for
example, Portuguese as the language and Brazil as the region).
6. For each new shared action note, set the language and region and
make sure the note contains the same shared actions as are found in
the other shared action notes in this database.
7. Right click each shared action to check its Action ID. The Shared
Actions Properties box appears. At the Action Info tab for each
shared action:
Make sure each shared action in a shared action note has a
different Action ID.
Make sure the Action ID for a shared action is the same across
shared action notes. For example, if a Cancel action contained in
the Danish shared action note is set to Action ID 16, the Cancel
action contained in the Turkish shared action note should also be
set to Action ID 16.
To delete a shared action note
1. Select the shared action note.
2. Choose Edit - Delete.
Note When you delete a shared action note, you delete all the shared
actions it contains.

10-20 Application Development with Domino Designer

To insert a shared action


1. Open the view, folder, form, subform, or page where you want to
use the shared action.
2. Choose Create - Action - Insert Shared Action. The Insert Shared
Action dialog box appears.

4. Click Done when you are finished inserting shared actions.


5. In the Info List, you can click Objects and select an action, or select an
action in the Action pane.
The next time you use the view, folder, form, subform, or page, the
shared action is available.

To edit shared actions


To edit a shared action, open the database with the shared action. Click
Shared Code, then Actions, and then double-click the shared action you
want to edit. The Shared Action Properties box appears.

Example: links
For each concert schedule you send out, you want to provide a
cross-reference for more information about the performer. Create a link
in the document you create for a specific concert and specify a URL with
detailed information about the performer.
1. Edit the document announcing the concert.
2. Select text for the link hotspot.
3. Choose Create - Hotspot - Link Hotspot.
4. At the Hotspot Info tab of the Hotspot Resources Link Properties
box:
Type: Select URL
Value: Specify the Web address; for example:
http://www.concertseries.org/performers/luke.html
5. Save the document.

Automation in Applications 10-21

Building Applications

3. Select a shared action and click Insert for each shared action you
want to insert. Each shared action is added to the Action pane and
also to the Objects list for the design element.

Creating a button
1. Open the design element to which you want to add the button (a
page, view, frameset, form, folder, or navigator), or edit a document.
2. Click where you want to add the button and choose Create - Hotspot
- Button.
3. On the Button Info tab of the Button Properties box, you can set the
following properties:
Label: Enter the text you want to appear in the button.
If you enter text that is wider than the button and you want it to
wrap automatically, check Wrap label text as needed.
Width: Specify a value, in inches, for the width of the button.
You can also choose one of the following width options:
Maximum width specifies that the value in the Width field is
the maximum width for the button. The width may be less if the
width of the button text is less.
Minimum width specifies that the value in the Width field is at
least the width specified. The button may be wider if the button
text is wider.
Fixed width specifies that the value in the Width field is the
actual width of the button. If you checked Wrap label text as
needed, any text wider than the fixed button width wraps
automatically. If you have not checked Wrap label text as
needed, any text wider that the fixed button width may
disappear.
Fit Content sets the width of the button to fit the width of the
text you specified in the Label field. If you choose this option, you
cannot set the width manually.
Style: Specify a color for the button background. You can also
choose to have a button with square edges or rounded edges.

10-22 Application Development with Domino Designer

Type: Use this setting if you are creating a hotspot button for a
template dialog box and you want the button to behave in a
certain way (such as closing the dialog box after the button is
pressed). You can create the following types of buttons:
Description

Normal

Normal is the default button. Pressing a normal


button performs the button action but does not
close the dialog box it is part of.

OK

When clicked in a template dialog box, this button


closes the dialog box with an OK operation and
displays a standard Windows OK message. This
button is not compatible with Lotus Domino
Designer Release 5 and earlier.

Cancel

When clicked in a template dialog box, this button


closes the dialog box with a cancel operation and
displays a standard Windows Cancel message. This
button is not compatible with Lotus Domino
Designer Release 5 and earlier.

Help

This button is active on Macintosh platforms only.


When clicked, it displays a help message. This
button is not compatible with Lotus Domino
Designer Release 5 and earlier.

Default

Check this box for the hotspot button you want to


become the default button for the template dialog
box. If the user presses Enter when the focus is not
on a button, this is the default button that is pressed
instead. Note that a dialog box can have only one
default button.

The advantage of using the OK, Cancel, and Help buttons is that
you can place the buttons anywhere you want. Previously, these
buttons could be aligned only vertically on the right or
horizontally on the bottom of the dialog box. In addition, you can
associate some LotusScript with these buttons; however, the
buttons always close the dialog box despite any code.
If you use the OK or Cancel buttons, the template dialog box must
be invoked using @DialogBox with the [NOCANCEL] and
[NOOKCANCEL] paramaters.
4. (Optional) On the Hide When tab, specify when to hide the button.
5. In the Info List, click Objects and select the button you just created.

Automation in Applications 10-23

Building Applications

Type of button

6. To program the button to run one of the client or one of the Web
program code types, choose either Client or Web at the Run
pull-down list.
Choose Client when the automated task will run in the Notes client.
You can then select one of the following Client code options:
Simple actions
Formula
LotusScript
JavaScript
Common JavaScript
Choose Web when the automated task will run in a Web browser.
You can then select one of the following Web code options:
JavaScript
Common JavaScript
7. Save the design element or document.

Other button tasks


Button task

Steps to perform

To change
properties

Click the button and choose Button - Button Properties.

To change
automation

In the Info List, click Objects, select the button in the Objects
list and edit the programming tasks in the script area.

To delete

Click the button and choose Edit - Delete.

Call an agent

Use the @Command([RunAgent]) or the OpenAgent URL.

Example: Buttons
Using a button to add a database to a users workspace
The Human Resources department sends new employees a mail message
that welcomes them to the company and gives them orientation
information. You decide to add a button to the Welcome form to make it
easy for new users to find Benefits information. New employees see the
button when they read their Welcome message. Double-clicking the
button adds Server1s Benefits Information database to the users
workspace (if it isnt already there) and opens it to the View by Category
view. The button uses this formula:
@Command([FileOpenDatabase];"Server1":"BENEFITS.NSF";"View
by Category")

10-24 Application Development with Domino Designer

Creating a text pop-up


A text pop-up can appear on a page or form and displays text to a user
when a click or mouse-over occurs.
1. Open the page or form you want to add the pop-up to, or edit a
document.
3. Choose Create - Hotspot - Text Pop-up.
4. On the Hotspot Info tab of the HotSpot Pop-up Properties box, do
one or more of the following:
Enter the text for the pop-up.
Select whether to pop up the text when the user mouses over or
clicks the hotspot.
Select whether to identify the hotspot with a border and whether
to use the highlight color or a default green.
5. (Optional) On the Hide When tab specify when to hide the pop-up.
6. Save the form or document.

Other text pop-up tasks


Text pop-up task

Steps to perform

To change properties

Cick the pop-up and choose Hotspot Hotspot Properties.

To delete, but keep the associated text Click the pop-up and choose Hotspot Remove Hotspot.

Example: Text pop-ups


Users register for conferences using a form you designed, but they
frequently enter an incorrect e-mail address. You want to give users
more information about what you need in the field. Create a text pop-up
to display the information when they mouse over the field label.
1. Open the form.
2. Select the field label.
3. Choose Create - Hotspot - Text Pop-up.

Automation in Applications 10-25

Building Applications

2. Select text or an image to associate with the text pop-up.

4. On the Hotspot Info tab of the HotSpot Pop-up Properties box, do


the following:
Enter the following text:
Specify your Notes mail address, not your internet
mail address. For example, specify "Ken Jones@ABC" not
"kjones@abc.com."

Select Pop-up on mouse over.


Select Show border around hotspot and Use highlight color.
5. Save the form.

Creating a formula pop-up


A formula pop-up completes a programmed task using only formulas.
The results display in the pop-up on the page or form.
1. Open the page or form you want to add the pop-up to, or edit a
document.
2. Select text or an image to associate with the formula pop-up.
3. Choose Create - Hotspot - Formula Pop-up.
4. On the Info tab of the HotSpot Pop-up Properties box, do one or both
of the following:
Select whether to pop up the formula when the user mouses over
or clicks the hotspot.
Select whether to identify the hotspot with a border and whether
to highlight the text.
5. (Optional) On the Hide When tab, specify when to hide the pop-up.
6. In the Info List, click Objects and select the hotspot you just created.
7. Enter its formula.
8. Save the form or document.
Note Consider using formulas that display information, such as @Time.
Also, do not use formulas that take action, such as @OpenView.

10-26 Application Development with Domino Designer

Other formula pop-up tasks


Formula pop-up task

Steps to perform

To change properties

Click the hotspot and choose Hotspot Hotspot Properties.

To delete but keep the associated text Click the hotspot and choose Hotspot Remove Hotspot.
Click the Hotspot entry in the Objects
list and edit the formula in the script
area.

Example: formula pop-ups


1. Open the form you want to add the pop-up to.
2. Select text.
3. Choose Create - Hotspot - Formula Pop-up.
4. On the Info tab of the HotSpot Pop-up Properties box, do the
following:
Select On click.
Select Border the text.
5. In the Objects list, click the hotspot and enter the following formula:
@Time(@Now)

6. Save the form.

Creating an action hotspot


In Lotus Notes, an action hotspot completes a programmed task using
simple actions, formulas, LotusScript, JavaScript, or Common JavaScript.
Use Common JavaScript so that the action hotspot can be used in both a
Web browser and the Notes client.
1. Open the form, subform, or page on which you want to add the
action hotspot.
2. Select text or an image to associate with the action hotspot.
3. Choose Create - Hotspot - Action Hotspot.
4. On the Hotspot Info tab of the Action HotSpot Properties box,
specify the frame in which you want the data to display when the
user clicks the link hotspot. You can also choose to have a border
appear around the hotspot.
5. (Optional) On the Hide When tab, specify when to hide the hotspot.
Automation in Applications 10-27

Building Applications

To change the formula

6. In the Info List, click Objects and select the action you just created.
7. Program the action hotspot to run one of the client or one of the Web
program code types by choosing either Client or Web at the Run
pull-down list.
Choose Client when the automated task will run in the Notes client.
You can then select one of the following Client code options:
Simple actions
Formula
LotusScript
JavaScript
Common JavaScript
Choose Web when the automated task will run in a Web browser.
You can then select one of the following Web code options:
JavaScript
Common JavaScript
8. Save the form, subform, or page.

Other action hotspot tasks


Action hotspot task

Steps

To change properties

Click the hotspot and choose Hotspot Hotspot Properties.

To delete, but keep the associated Click the hotspot and choose Hotspot text
Remove Hotspot.
To change automation

Click the Hotspot entry in the Objects list


and edit the programming in the Script area.

To call an agent

Use the @Command([RunAgent]) or the


OpenAgent URL command.

Creating a program for an event


Use event programming to run tasks that users shouldnt have to activate
themselves and that are very specific. Event programming is particularly
useful when the timing of the program must be precise or the tasks are
associated with a particular design element.
1. Open the design element to which you want to add automation.
2. In the Info List, click the Objects tab and select the event.
3. From the Run list, choose either Client or Web.
10-28 Application Development with Domino Designer

4. Depending on whether you chose Client or Web, you can choose


from the following:
Simple actions
Formula
LotusScript
JavaScript
5. Save the event.

Examples: Creating an event script or formula


Displaying a message when users close a document
The following QueryClose event script for a form displays a message
when users close a document theyve edited:
Sub QueryClose(Source As Notesuidocument,ContinueAsVariant
Dim workspace As New NotesUIWorkspace
Dim doc as NotesUIDocument
Set doc = workspace.CurrentDocument
If doc.EditMode Then
Messagebox("Call Pat at x-314 if you have any
questions.")
End If
End Sub

Filling in fields automatically


The following script for a field Entering event fills in the FullName field
by concatenating the FirstName field, a space, and the LastName field:
Sub Entering(Source As Field)
Dim workspace As New NotesUIWorkspace
Set doc = workspace.CurrentDocument
firstName = doc.FieldGetText("FirstName")
lastName = doc.FieldGetText("LastName")
fullName = firstName & " " & lastName
Call doc.FieldSetText("FullName", fullName)
End Sub

Requiring a field to be filled in


The following script for a field Exiting event requires users to fill in a
LastName field after they fill in the FirstName field:
Sub Exiting
Dim W As New NotesUIWorkspace
Dim UIDoc As NotesUIDocument
Set UIDoc = W.CurrentDocument
If (UIDoc.FieldGetText ("LastName") <> "") Then
Automation in Applications 10-29

Building Applications

Common JavaScript

UIDoc.GotoField "FirstName"
Else
UIDoc.GotoField "LastName"
Messagebox "You must enter the persons last name.", 0,
"ERROR"
End If
End Sub

Creating an agent
Before you begin, plan your agent carefully. For example, decide what
type of agent you want (simple action, formula, LotusScript, imported
Java, or Java), what it will act upon, where it will run, how it will be
invoked, whether it will perform restricted or unrestricted operations,
and under whose ID it should run (run on behalf of).
1. In Designer, open the database in which you want to create an agent.
2. Choose Create - Design - Agent. The Agent Properties box appears.
3. On the Basics tab, enter a name for the agent in the Name field.
Note that names and aliases should be unique. (Agents that call other
agents look for the first instance of a name and will attempt to run
that agent. If more than one agent has the same name, you may run
into problems.)
4. Optionally, enter a comment in the Comment field. The comment
appears when you view the list of agents.
5. Click Shared if this agent will be used by other users. A shared agent
is one that other users have access to. Note that ownership of a
shared agent can be reassigned to another user who saves or re-signs
the agent.
Click Private if you want the agent to be an agent that only you can
run. In Lotus Notes, private agent are not available on the Actions
menu. In Domino Designer, anyone with Designer level access or
higher can see and run a private agent.
Beginning with Lotus Domino Designer 6, you have the option of
converting a private agent to a shared agent or a shared agent to a
private agent.

10-30 Application Development with Domino Designer

6. If the agent searches for text in documents, you can specify the
following settings in the Options section:
Check Store search in search bar menu to display your search
query in the search bar.
Check Store highlights in document so that your search matches
are highlighted in the searched documents.

Note that you should check this option only if the agent (or the
top-level agent that calls this agent) is triggered by On event Action menu selection.
To get the full benefit of this feature, the database should reside on a
server and the agent must be invoked via the client.
If you check this box and the agent references front end classes, the
user receives a run-time error.
8. In the Runtime section of the properties box, choose one of the
following triggers for the agent. Different options appear depending
on the trigger you choose.
On event - see the topic Triggering an agent on an event for
more information on the event options.
On schedule - see the topic Triggering an agent on a schedule
for more information on the schedule options.
9. Click the Security tab of the Agent Properties box to set up security
for the agent.
10. Close the Agent Properties box after you have filled in the necessary
fields.
11. From the Run list in the Programmers pane, choose one of the
following to define the agents automated components:
Simple actions
If you choose Simple actions, click the Add Action button to add
a simple action.
Formula
LotusScript
Java
Imported Java
12. If you want to create a search, select the Object tab and then the
Document Selection event in the Programmers pane. Then use the
Add Condition button to invoke the Add Condition dialog box.
Automation in Applications 10-31

Building Applications

7. To run an agent without having to wait until it completes, check


Run in background client thread.

Note that this way of creating a search replaces the Search button
found in earlier versions of Designer.
13. Save the agent.
Note that the agent is being saved and signed with your current ID.
Scheduled agents are enabled by default when first created and existing
scheduled agents that are edited are saved with their current state of
enabled or disabled.
For additional information on using the Enable, Disable, and Sign
buttons, see the topic Useful agent procedures later in this chapter.
For additional information on agent security, see the topic Security for
agents on servers and the Web later in this chapter.
For troubleshooting information, see the topic Troubleshooting agents
later in this chapter.

Triggering an agent on an event


Once you have created an agent, you must choose whether to trigger the
agent on an event or on a schedule. To trigger an agent on an event:
1. On the Basics tab of the Agent Properties box, click On event.
2. Choose one of these events in the following table:
Event to trigger agent

Use for

Action menu selection User-activated agents or for WebQuerySave or


WebQueryOpen agents.
Agent list selection

Agents that are only to be called by other agents


and for agents that are still being developed or are
run from Designer.

Before new mail


arrives

Processing mail before it is deposited in the mail


databases; for example, to move incoming mail to a
folder.
With this option, the agent runs before the message
is listed in the database. Therefore, be careful what
other options you choose. For example, do not use
the Mark Documents Read simple action because
documents will always be marked unread when
they are listed in the database.
Note that this option is limited to one agent per
database.
continued

10-32 Application Development with Domino Designer

Use for

After new mail has


arrived

Processing incoming mail: to respond to it, forward


it, or file it.
Interactive functions and functions that read or
modify data external to the current document are
ignored when documents are mailed into the
database. For example: @DbColumn,
@DbCommand, @DbLookup, @MailSend,
@Prompt, @Command, or @PostedCommand are
all ignored.
Note that you can use this option multiple times
within the same database.

After documents are


created or modified

Workflow tasks where a task is performed based on


new or changed documents. This trigger is actually
a scheduled agent handled by the Agent Manager
and can execute either on the local Notes client or
on a server.
When you select After documents are created or
modified, an Edit settings button appears. If you
click the button, the Schedule dialog box appears.
Here you can set a start and end date for the agent,
tell the agent not to run on weekends, and either
choose a server for the agent to run on or choose
the local Notes client. You can also specify that the
server is chosen when the agent is enabled.
The delay time using this agent varies between 5 to
30 minutes, depending on the server load.

When documents are


pasted

Documents that are pasted into the database and


need to be modified as they are being pasted. Note
that this event requires action by the user and does
not happen in the background.
Paste-activated agents cannot use @Command or
@PostedCommand.

3. If you selected Agent menu selection or Agent list selection,


choose one of the following targets from the Target list. These are the
documents on which the agent will run.
All documents in database
All new and modified documents
All unread documents in view
All documents in view
All selected documents

Automation in Applications 10-33

Building Applications

Event to trigger agent

None - choose None for any agent that is not working with a
specific set of documents. For example, choose None if you have
an agent that displays a message to the user. None also lets you
use @commands.
Note Beginning with Lotus Domino Designer 6, Run Once is no
longer listed as an option on the Targets pull-down list. (Run Once was
often used to set up Web agents.) Choose None instead.

Triggering an agent on a schedule


Once you have created an agent, you must choose whether to trigger the
agent on an event or on a schedule. To trigger an agent on a schedule:
1. On the Basics tab of the Agent Properties box, click On Schedule.
2. In the list next to the Schedule button, choose one of the schedules
listed in the following table.
Note that the Web does not support scheduled invocation of agents;
however an agent on the Web can be triggered in other ways, such as
through Tools/Macros or from the URL.
Schedule for agent

Use for

More Than Once


a Day

High-priority databases, such as those critical to a


business process and for databases that replicate several
times a day, such as workflow applications that route
documents for approval.
Be aware that if you schedule very frequent runs (for
example, every 5 minutes), the servers performance
could be adversely affected.

Daily

Activities that are important but that will not cause a


delay if they are only generated once a day. Examples
include mailing news wire articles or generating
low-priority assignments.

Weekly

Routine tasks, such as generating summary reports and


sending reminders.

Monthly

Low-priority maintenance tasks, such as archiving


documents and distributing company newsletters.

Never

Agents that you do not want to run in particular


circumstances. For example, use this run option for
agents that do run on the Web or for agents that are
called by other agents.

10-34 Application Development with Domino Designer

3. Once you make a choice from list, click the Schedule button to
display the Schedule dialog box. You can add more details about
running the agent. For example:
If you specified More than once a day, you can specify how
often you want the agent to run on each day. You can also specify
that the agent not run on weekends.

If you specified Monthly, you can specify a day of the month and
time of the day for the agent to run.
4. In the same Schedule dialog box, you also specify the servers on
which you want the agent to run. You can choose from the Run on
list. Alternatively, you can have users choose the server.
Server agent runs on Use
Local

The agent runs only on the client. Use this option to


schedule agents to run in the background on the local
Notes client. The database containing the agent must
be a local database. The agent will run with the rights
of the current Notes ID.
Note that for scheduled agents to run on the local
Notes client, the user must first select Enable
scheduled local agents on the Basics tab of the User
Preferences dialog box (Choose File - Preferences User Preferences).

Any server

The agent runs on any server that the agent is


available on. When agents run on multiple servers
and they are changing documents in databases that
are replicated, you should specify the servers they
run on to prevent replication conflicts. Then, set up
the databases replication schedules so they dont
interfere with the agents scheduled runs.
Note that this option does not cause problems if you
are using copies (instead of replicas) of the database.

Specific server

The agent runs only on the single server you select


from the list of available servers.

Choose when agent Checking this option prompts users to select a server
is enabled
when the agent is enabled. This option is useful for
distributing agents in ready-to-use applications.

Automation in Applications 10-35

Building Applications

If you specified Weekly, you can specify the day of the week and
time of day for the agent to run.

5. From the Target pull-down list, select the documents in the database
the agent will run on. You have two choices:
All documents in database
All new and modified documents
These options are not supported on the Web.
If you paste, modify, or enable a scheduled agent, the agent will run
immediately if it has missed running on the day of the changes.
Note Agents are scheduled according to the interval you set up, not the
exact time of day. For example, if you schedule an agent to run hourly, it
runs about one hour after the last time it ran.

Agents that miss their scheduled run


If a scheduled agent is edited (for example, enabled, modified, saved, or
pasted), it will usually run immediately if it has missed its scheduled
run. This is true for agents scheduled monthly and weekly. It is partially
true for agents scheduled daily.
If a agent scheduled to run daily misses its scheduled run because it was
disabled, it will run if it is enabled within half an hour of the scheduled
run. However, If a scheduled agent is saved, pasted, or modified, it will
run immediately if it has missed its schedule.

Useful agent procedures


To view a list of agents
1. Open a database in Designer.
2. Click Shared Code - Agents in the Design pane. A list of agents
appears in the Work pane.
When you view a list of agents in the Work pane, an icon may appear
next to the name of a scheduled agent. The icons are:

Check mark with a 6 next to it - the scheduled agent is enabled and


runs only on Lotus Notes/Domino 6 (or on Lotus Notes/Domino
R5.08 or later).

Check mark with a 5 next to it - the scheduled agent is enabled and


runs only on Lotus Notes/Domino R5.07 or earlier.

Check mark - the scheduled agent is enabled and runs on any


version of Notes.

A yellow X - the scheduled agent is disabled.

The list of agents also gives you important information about each agent.
You can easily view such information as the agent name, its alias, trigger,

10-36 Application Development with Domino Designer

modification date, the person who modified it last, and whether the
agent works in Notes and on the Web.
To copy an agent
1. Open a database in Designer.
2. Click Shared Code - Agents in the Design pane. A list of agents
appears in the Work pane.
4. Choose Edit - Copy.
To delete an agent
1. Click Shared Code - Agents in the Design pane. A list of agents
appears in the Work pane.
2. Select the agent.
3. Choose Edit - Cut.
To select multiple agents
1. Click Shared Code - Agents in the Design pane. A list of agents
appears in the Work pane.
2. Click the first agent and do one of the following:
Press CTRL and hold while you click the next agent.
If selecting more than two agents, press CTRL while you click the
next agent.
To select a range of consecutive agents, press SHIFT while you
select the first and last agent in the range.
If you have Designer access or above, you can disable shared scheduled
agents to prevent servers from running them. This is useful for
debugging a problem with an agent. Designers can still run disabled
agents by choosing View - Agents, selecting an agent, and choosing
Actions - Run. After you re-enable them, scheduled agents resume their
schedule.
To disable individual agents
1. Click Shared Code - Agents in the Design pane. A list of agents
appears in the Work pane.
2. Select the agent and click the Disable button. Note that the agent is
re-signed.
The check mark icon next to the agent name disappears and an X
icon appears in its place.

Automation in Applications 10-37

Building Applications

3. Select the agent.

To disable all agents in a database


1. Choose File - Database - Properties.
2. On the Database Basics tab, check Disable background agents for
this database.
Note If you disable agents through the Database Properties box, the
agents are not re-signed and the Enable/Disable state of each agent is not
changed. Unchecking this box does not necessarily enable all agents. It
only allows those already enabled to run.
To enable a disabled agent
1. Click Shared Code - Agents in the Design pane. A list of agents
appears in the Work pane.
2. Select the disabled agent. (It should have a yellow X icon next to the
agent name.)
3. Click Enable.
The X icon disappears and a check mark icon appears next to the
name of the agent. Note that the agent is re-signed.
By default, Web agents run under the identity of the agent author (the
person who saved the agent). To run agents under the identity of the
Web user, double click the name of the agent in the Work pane. On the
Security tab of the Agent Properties box, check Run as Web user.
To sign an agent
1. Select the agent.
2. Click Sign.

Examples of agents to run before Web users open or save


documents
To perform error checking, field validation, and other processing before
Web users open or save documents, create a shared agent that runs
manually. Then write a formula that uses @Command([RunAgent]) or
@Command([ToolsRunMacro]) to run the agent and attach it to the
WebQueryOpen or WebQuerySave form events. This simulates the
LotusScript QueryOpen and QuerySave form events that arent
supported on the Web.

WebQueryOpen events
A WebQueryOpen event runs the agent before Domino converts a
document to HTML and sends it to the browser. Domino ignores any
output produced by the agent in this context.

10-38 Application Development with Domino Designer

Examples for using this agent include performing large computations


that arent possible with @commands or collecting statistics about who
opened documents and when they did so.

WebQuerySave events
A WebQuerySave event runs the agent after field input validation
formulas are run and before the document is actually saved to disk or
mailed. The agent can modify the document or use the document data to
perform other operations. The document is automatically saved after the
agent runs. Do NOT have the agent explicitly save the document (for
example, by calling NotesDocument.Save) because an explicit save could
cause incorrect results.
A WebQuerySave agent can produce output to be sent back to the user.
For example in a LotusScript agent, you can use the Print command to
return raw HTML. If the agent produces output, then the form should
not have a $$Return field because Domino will return only the agent
output and ignore the field.
Examples for using this agent include:

Performing complex field validation. If the document does not pass


validation, you can prevent Domino from saving the document by
adding a SaveOptions field with a value of 0 to the form.

Simulating CGI programs that run on user-supplied data by


programming a WebQuerySave event and adding a SaveOptions
field with a value of 0 to the form. When the agent runs, you can
collect field values from the filled-out form without generating a new
Notes document.

Collecting statistics based on data submitted by browsers, such as


CGI variables, by writing a program that uses CGI variables and
attaching it to a WebQuerySave event.

Automation in Applications 10-39

Building Applications

Note WebQueryOpen agents run when the user opens a form or


document, but do not run when the user saves a document. This means
that computed fields set by a WebQueryOpen agent are not saved when
the user submits a document. To make sure computed fields are saved,
you can either recalculate them in the WebQuerySave agent or set the
form property Generate HTML for all fields.

Setting up agent security using the Security tab


Beginning with Lotus Domino Designer 6, you can set up basic security
for an agent by using the Security tab of the Agent Properties box. This
tab contains the following options:
Option

Description

Run as Web user Checking this causes the agent to run with the effective user
name of the Web user.
Run on behalf of Lets you specify on whose authority this agent can run. Note
that restricted signers can run agents only under the same
authority as their own (that is, the restricted signers enter
only their own name or else the agent returns an error at run
time). Unrestricted signers and signers with rights to run
On behalf of anyone can run agents on behalf of anyone.
Whoever you specify in this field has to be included in the
ACL of any database being accessed.
If the agent is sending mail or creating documents, this name
is used as the mail sender or document author.
This feature is not supported on releases earlier than Lotus
Domino Designer 6.
Allow remote
debugging

Checking this enables the agent to be debugged through a


remote debugger. Only LotusScript can be remotely
debugged; however, you can monitor or cancel the execution
of agents written in Java or formula language or written as
simple agents.

Restricted
operations

Lets users who have unrestricted rights specify whether the


agent should run in restricted mode, unrestricted mode, or
unrestricted with full administration rights mode. By
default, the value is set to restricted mode because this is the
safest setting. For users who have restricted rights, this
option has no effect on the agent.
You have the following choices from the drop-down list:
Do not allow restricted operations the agent is not
allowed to perform restricted operations. Note that this is
the most secure choice. The reason the agent cannot perform
restricted operations is that the agent has rights that are
restricted.
Allow restricted operations the agent can perform
restricted operations because it is has been granted
unrestricted rights. Note that this is a less secure choice than
the previous one and grants the agent more power.
continued

10-40 Application Development with Domino Designer

Description

Restricted
operations
(continued)

Allow restricted operations with full administration rights


the agent can perform restricted operations and can do so
with full administration rights. This choice grants even more
power to the agent because the agent now has been granted
unrestricted rights and given full administration rights. Use
this choice with caution. For more information on restricted
operations, see the topic Restricted LotusScript and Java
agent operations later in this chapter.

Allow user
activation

Checking this box allows users with ACL editor access to


enable this agent. This allows a scheduled agent on the
server to be enabled or disabled without resigning the agent.
If this box is checked and someone enables the agent, the
agent is not re-signed. If this box is not checked and
someone (with Designer access or above) enables the agent,
the agent is re-signed.

Default access
for viewing and
running this
agent

The default level for viewing and running the agent is All
readers and above. You can deselect this field and choose
who you want to have default access for viewing and
running the agent.

Allow public
access users to
view and run
this agent

Lets users who have public access to documents in a


database view and run the agent.

Security for agents on servers and the Web


For agents created and run in Notes databases stored on servers or run
from the Web, you can set up several levels of security controls to
prevent unauthorized operations.

Automation in Applications 10-41

Building Applications

Option

Who can create agents?


To control who can create agents that run on servers, use database ACLs.
Note Web users cannot create agents.
To create

Access needed

Private agents

Reader access or higher and must have Create


private agents enabled in the ACL

Private agents using


LotusScript and Java

Reader access or higher and must have Create


private agents and Create LotusScript/Java
agents enabled in the ACL

Shared agents using simple


actions and formulas

Designer access or higher

Shared agents using


LotusScript or Java agents

Designer access or higher and must have


Create LotusScript/Java agents enabled in
the ACL

Who can run agents?


To control who can run agents on servers, use the Server document in the
Domino Directory and database ACLs. See the topic Controlling agents
that run on a server in the Lotus Domino Administrator Help for more
information.
Private agents
To control who can run private agents, open the Server document in the
Address Book and click the Security tab. In the Programmability
Restrictions section:

If everyone who can access the server can run private agents, leave
Run private agents blank.

If only specific users can run private agents, specify their names in
Run private agents.

Web users cannot run private agents.


Shared agents
To control who can run shared agents, use the database ACL. Users with
Reader access or higher can run shared agents.

If users are allowed to run shared agents, assign them Reader access
or higher.

If users are not allowed to run shared agents, do not list them in the
ACL or assign them Depositor access.

10-42 Application Development with Domino Designer

Caution Unrestricted Java and LotusScript agents can potentially


violate security. Only a limited number of trusted users should have
unrestricted rights.

Where can agents run?


To control whether agents are allowed to run on servers, use the Server
document in the Address Book. Click the Security tab. In the Server
Access section:

If everyone running an agent that accesses the server is allowed to


access the server, leave Access server blank.

If you dont want users accessing the server either directly or


through agents, specify the user names in Access server. Then, if a
user who is not specified attempts to run an agent that accesses the
server, the agent is not run. You can also specify user names in Not
access server.

What operations can agents run?


To control which documents agents can process, Domino checks the ACL
of the database where the documents are stored, as follows:

For agents that use simple actions, LotusScript, and Java, Domino
checks the users ACL.

For agents that use formulas, Domino checks the replica ID of the
database in which the agents were created. Therefore, to ensure that
agents using formulas can access documents in other databases, you
must list the database replica ID in each database the agent will
access.

To control whether agents are allowed to create databases, use the Server
document in the Address Book. Click the Security tab. In the Server
Access Section:

If everyone is allowed to create databases, leave Create new


databases blank. Then, anyone running an agent that creates new
databases can do so on the server.

Automation in Applications 10-43

Building Applications

LotusScript/Java agents
LotusScript and Java include operations that have full access to the
servers system and can manipulate system time, file I/O, and operating
system commands. Users or groups with unrestricted access can run an
agent that includes any of these operations in the LotusScript and Java
components. Users or groups with restricted access can include most
operations. The only restricted commands are those that allow access to
the servers system.

If you dont want users creating databases, specify the user names of
people allowed to create databases in Create new databases. Then,
if a user who is not specified runs an agent that creates a database, an
error is reported and the database is not created.

When are restrictions checked?


Domino checks the security restrictions differently depending on
whether the agent is running:

Locally or on the server

In the foreground or background

If the agent is started from the Web or the Notes client

Locally on Notes
An agent runs locally when:

It runs within a Notes client database.

You choose Local from the Run on list for a scheduled agent.

A user starts the agent from the Actions menu in the Notes client,
from the Agent - Run menu in Designer, from the When documents
Have Been Pasted trigger, or from calling the agent by agent.run.

When an agent runs locally, Notes does not check security restrictions,
unless you have set the Enforce ACL option. (To set the Enforce ACL
option, choose File - Database - Access Control and then click the
Advanced icon.)
On the server
An agent runs on the server when it is running in a database stored on a
server and it is started by one of the following:

Before new mail arrives

After new mail arrives

If documents have been created or updated

On schedule more than once a day

On schedule daily

On schedule weekly

On schedule monthly

Called by an agent via agent.runonserver (the agent being called


must reside on the server)

If the agent is running on a server, Domino checks all security


restrictions.

10-44 Application Development with Domino Designer

Foreground or background
An agent runs in the foreground when a user starts it from the Notes
Actions menu, selects it from the Designer Agents list, or clicks an Action
button. When agents run in the foreground, security restrictions are not
checked.

From the Notes client or the Web


Agents run in the Notes client or on the Web based on the effective user.
The effective user is the user under whose authority the agent runs. The
effective user depends on the environment in which the agent runs.
Agent type

Effective user

Notes client agent

Current user ID

Web agent

One of the following:


Current Web user
Agent signer (agent owner)
On behalf of (set in the Security tab of the Agent
Properties box).

Scheduled agent

Either:
Agent signer (agent owner)
On behalf of (set in the Security tab of the Agent
Properties box).

When a user runs an agent from the Notes client, the agent runs with the
rights of the effective user, which is the current User ID.
When a Web user runs an agent, the agent also runs using the rights of
the effective user and Domino checks the effective users rights to access
the database. However, you can set up the agent so that Domino checks
the invokers rights to access the database instead of the effective users
rights. Checking the invokers rights can provide more security.
To specify that Domino verify the invokers access to the database, follow
these steps:
1. Double-click an agent name in the agent list.
2. Click the Security tab.
3. Check Run as Web user.

Automation in Applications 10-45

Building Applications

An agent runs in the background when it is scheduled or it is triggered


by an event (for example, when documents are modified) or when it is
called by agent.runonserver. When agents run in the background,
Domino checks security restrictions.

When Run as Web user is checked, Domino prompts Web users for
their name and password when they attempt to run the agent. Domino
uses the login information to check for the invokers rights in the
database ACL.

Security controls for agents that are called by agents


When agents call other agents, Domino checks the security restrictions
for each agent. However, when the agent signers are different, Domino
checks security as follows:

If the first agent uses simple actions or formulas:


Domino checks all agents that are called against the rights of the
signer of the first agent.

If the first agent uses LotusScript or Java:


Domino checks each agent that is called against the rights of the
signer of each agent.

Troubleshooting agents
You can experience problems running agents at several points during
agent development, deployment, and implementation. Try the following
to help diagnose any problems.

Run the agent on the Notes client.

Simulate an agent run (for all types of agents).


Before running an agent on a live database, test it by simulating a
run. The test also diagnoses whether the agent will run by checking
security and schedule settings.

Review the Agent Log (for all types of agents).


The Agent Log displays information about when the agent last ran
and whether it ran successfully.

Use the Notes server console (for all types of agents).


There are three server console commands available to display
information about agent scheduling, status of agent queues and
control parameters, and status of agent debugging settings that are in
effect.

10-46 Application Development with Domino Designer

Set up the Agent Manager debug information (for all types of


agents).
You can specify that the Agent Manager record debug information
about any combination of the following: control parameters, events,
loading reports, memory warnings, performance statistics, execution
reports, and scheduling. Messages appear on the server console and
are recorded in LOG.NSF.
Run commands in the LotusScript debugger (for foreground agents
built with LotusScript.)
Choose File - Tools - Debug LotusScript and run the agent. The
LotusScript debugger appears and you can run any debugging
command in the agent as you would for any LotusScript program.

Track information with the NotesLog classes (for background agents


built with LotusScript or Java).
The NotesLog class is added to your agent code and can capture
information you want to track. The NotesLog class records the
information in the Agent Log.

Check the Notes log database (LOG.NSF).

Testing agents
You can test an agent in the following ways:

For agents that do not call other agents, use the Test menu command.

For agents that use LotusScript, use the LotusScript debugger.

For more complicated agents, create a test copy of the database you
can work with before you work with the original database.

To use the Test menu command


1. Select the agent and choose Actions - Test.
2. Read the Agent Log and check:
How many documents would be processed (for formula and
simple action agents)
What action would be taken if the agent were actually run
3. If necessary, make corrections and run the test again.
To use the LotusScript debugger
1. Choose File - Tools - Debug LotusScript.
2. Run the agent and the LotusScript debugger appears. You can then
review each step as the agent the agent runs.
3. You can also use message boxes and print statements.

Automation in Applications 10-47

Building Applications

To create a test database


You may wish to make a test copy of an existing database before working
with the actual database.
For agents that have multiple steps or complex tasks, split the process
into several smaller tasks and create an agent for each. Test and fix each
smaller agent first. When everything is working correctly, combine the
agents into one. Then test the agent again.
Note Java agents have a console tool to which agents can print
messages. In Designer, choose File - Tools - Show Java Debug Console. In
addition, you can use the remote debugging tool (File - Tools - Remote
Debugging), which allows remote debugging of the LotusScript in an
agent script and allows the monitoring of the execution of Java agents.
1. Choose File - Database - New Copy to make a test copy of the
database, with documents.
If the agent works on mailed documents, the test database must be
on a server, and a Mail-in Database document must exist in the
Address Book.
2. Create test documents:
If the agent works on mailed documents, mail a few documents to
the test database.
If the agent works on pasted documents, paste a few documents
into the test database.
3. (Optional) Create a debug document to write values to.
4. Run the agent.
5. Use other available debugging tools to catch errors and make
corrections.
6. Rerun the agent until it is working correctly.
7. Copy the tested agent to the live database.

Viewing the agent log


Every time an agent runs, it writes a log report with the following
information:

When it ran

The number of documents it processed

The actions it took on the documents

10-48 Application Development with Domino Designer

Each time an agent runs, it writes over the previous log report. Domino
stores the Agent Log with the database. The Agent log stores accurate
information on simple action agents and formula agents. Information on
LotusScript agents, Java agents, or agents calling other agents is not
necessarily complete.

To view the most recent Agent Log:


1. Select a database and choose View - Agents.
2. Select an agent whose log you want to check and choose Agent - Log.
3. Review the information in the Log.

Notes server console commands


These server console commands support agent debugging:

tell amgr schedule


Use this command to see if the agent is scheduled to run. If it doesnt
appear in the list when it should, then you know to check its
schedule, to check whether or not the agent is enabled, and to check
whether or not the database has background agents disabled.
This command does not list agents that are manually run from the
Actions menu or Agents list.

tell amgr status


Use this command to see where your agent is running (that is, in
which queue) and what parameters are in effect.

tell amgr debug


Use this command to display and change the debugger settings.
These settings apply to the Agent Manager debugger that you enable
in the NOTES.INI file.

Automation in Applications 10-49

Building Applications

If you are running agents built with LotusScript or Java and the agents
run in the background, you can add the NotesLog class to your agent
code to record run-time information in the Agent Log.

Tell amgr schedule


This command lists each agent that is scheduled to run on the current
day. It lists only agents that run in the background. Check the list for the
following information to make sure the agent is scheduled correctly.
Display

Description

First column: The Agent Manager queue that


the agent currently is in.
ESV
E: Eligible to run
S: Scheduled to run
V: Waiting to run

What to check for


If the agent is scheduled, make
sure it is listed with an E or S.
If it is listed, check that the
correct time is listed. If the
agent is not listed, check the
When should this agent run
setting.
If the agent runs when new
mail arrives or a document is
created or updated, it should
be listed with a V. If it isnt
listed, check the When should
this agent run setting.
If the agent has an incorrect
event or isnt listed when its
supposed to be, it means that
you selected an incorrect
When should this agent run
setting.

Second
column: S M
U

The event that activates the


agent.
S: Daily, weekly, monthly, or
more than once a day schedule
M: New mail has arrived
U: One or more documents
have been created or updated

Time of day

If the agent is scheduled to run Check and make sure the agent
daily, weekly, monthly or more is listed.
than once a day, the time of day
the agent will run is listed.

Today

If the agent is scheduled to run Check and make sure the agent
daily, weekly, monthly, or more is listed.
than once a day and the time it
is supposed to run hasnt gone
by, then Today is listed.

Agent Name

The agent name that is


scheduled to run.

Database
Name

The name of the database that


the agent works in.

10-50 Application Development with Domino Designer

Make sure youre looking at


the correct copy of the agent.

tell amgr status


This command lists the number of agents in queues and other run-time
statistics. Even though agent names are not listed, you can check the
queue information to determine if the queues are processing the number
of agents you would expect. You can also check the run-time statistics to
see how the Agent Manager is set up.
For example, Agent Manager status information includes:
The number of agents in queues waiting for events, such as New
Mail and Document Update.

The number of agents in queues waiting for a scheduled time to


elapse, such as the Scheduled Task queue.

The time period, such as Daytime or Weekend.

The maximum amount of time that a LotusScript/Java agent is


allowed to run.

tell amgr debug


This command lists the Agent Manager debugger settings you specified
with the Debug_AMgr statement in NOTES.INI. Use this command to
make sure the debugger settings are correct and to change them using the
same options that are available for the Debug_AMgr statement, except *.
For example, to add options for the Agent Manager that you have
already set up to display agent debugging information (-e option):
tell amgr debug -e, -l, -m, -p

Agent Manager debugging information


You can specify that the Agent Manager record debugging information
in these ways:

Specify Debug_AMgr in NOTES.INI


Use this statement to provide debugging information about agent
loading, scheduling, and performance. When you specify
Debug_AMgr, you can use the tell amgr_debug command at the
Notes console to change the settings.
Note If you specify that the Agent Manager display all possible
debugging information, agent performance can be significantly
affected.

Specify Log_AgentManager in NOTES.INI


Use this statement to provide a subset of the information recorded
with Debug_AMgr. Log_AgentManager does not affect agent
performance as much as Debug_AMgr could.

If you specify both statements, the Debug_AMgr settings take precedence.


Automation in Applications 10-51

Building Applications

Debug_AMgr
To specify that the Agent Manager record debug information, edit
NOTES.INI and add the following statement:
Debug_AMgr=option

where option can be one or more of the following:

c list agent control parameters

e list Agent Manager event information

l (lower-case letter-L) list agent loading information

m list agent memory warnings

p list agent performance statistics

r list agent run-time reports

s list Agent Manager scheduling information

v (verbose) list more information about agent loading, scheduling,


and queues

* list all of the information for all options

After you specify Debug_AMgr in NOTES.INI and you run an agent on a


server, check the Notes console and Notes Log (LOG.NSF) for the
debugging information. Optionally, you can redirect the debug
information to be recorded in a separate file on the server. When you
redirect the debugging information to a separate file, performance can be
affected. To redirect information, edit NOTES.INI and add the following
statement:
DEBUG_OUTFILE=<file-name>

If you run an agent on a database stored on your local workstation, you


must redirect the output because the Notes console is only on the server.
Log_AgentManager
To specify that the Agent Manager record less debugging information
than with Debug_AMgr, edit NOTES.INI and add the following
statement:
Log_AgentManager=option

where option can be one of the following (but not more than one):

0 do not list debugging information

1 list partial and complete information about successful agent runs

2 list complete information about successful agent runs

10-52 Application Development with Domino Designer

NotesLog Class
Use the NotesLog class in LotusScript and in Java agents that run in the
background. Add the NotesLog class to your agent code to record
run-time information. It is particularly helpful for capturing variable
values, error handling, and verifying code logic. By default, the NotesLog
class records information to the Agent Log. When you set up items you
want recorded, make sure you dont exceed the Agent Log limit.

Dim agentLog As new NotesLog("Agent log")


Dim collection As NotesDocumentCollection
Dim db As NotesDatabase
Dim s As NotesSession
Dim count As Integer
Call agentLog.OpenAgentLog
Set s=New NotesSession
Set db = s.CurrentDatabase
Set collection = db.UnprocessedDocuments
Set note = collection.GetFirstDocument
count = collection.Count
Do While (count >0)
Subject = note.Subject
Call agentLog.LogAction("Processing:"+Subject(0))
Set note = collection.GetNextDocument(note)
count = count-1
Loop
Call agentLog.Close

Agent Log limit


The Agent Log can hold only 64KB of information. When the information
written to it exceeds this limit, the following message is displayed and
the agent stops running:
Error executing agent <agent-name> in <database-name>. Memory
allocation request exceeded 65,000 bytes.
Make sure that the information you want recorded to the Agent Log does
not exceed this limit. If it does, rework the NotesLog class code to record
less information per run.

Automation in Applications 10-53

Building Applications

To use NotesLog, follow this LotusScript example that tracks the


documents an agent is processing by capturing the documents subject.
The information is recorded in the Agent Log.

AgentRunner
AgentRunner is a Java application program for debugging Domino
agents in a Java IDE. There are two versions of AgentRunner for different
package classes:

lotus.domino.AgentRunner for lotus.domino (Notes/Domino,


Release 5.0 and later)

lotus.notes.AgentRunner for lotus.notes (Notes/Domino Release


4.6.x)

Also included is a set of debug classes that access Notes context


information while running in a Java IDE.
For more information on using AgentRunner, see the topic Using
AgentRunner in the Domino Designer Programming Guide.
Note AgentRunner is not initially available in Release 6.

Simple actions for automation


Use the following simple actions with shared and unshared actions,
buttons, action hotspots, picture hotspots, and agents. To access a list of
simple actions, select Simple actions from the Run pull-down list and
click Add Action.
Note that Web applications do not support simple actions.
Copy to Database
Copies the selected document to the database you specify. You can copy
and paste selected documents within the same database or to another
database on the same server or another server. They are marked as read
in the target database.
To specify:
1. Click Choose Database.
2. Select the server and target database.
Copy to Folder
Copies the selected document to the folder you specify. You must create
new folders before you can select them. Copying a document from one
folder to another does not remove the document from the source folder.
A duplicate of the document is not created; instead the document is
displayed in a new place.

10-54 Application Development with Domino Designer

Delete from Database


Deletes the selected documents from the database. If there are replicas of
this database on other servers, documents deleted in this database are
also deleted in the replicas unless Do not send deletions made in this
replica to other replicas is selected in your database replication settings
(choose File - Replication - Settings and click Send to see what the
settings are).

Combine this action with one that changes field values. Then when users
change the values in a document, they can mark it read at the same time.
Do not use this option with an agent that is processing documents with
Before New Mail Arrives.
Mark Document Unread
Marks selected documents as unread. Use this action for flagging a
document that users want to read again.
Modify Field
Replaces or appends a single field value with a new text value you
specify. This action replaces only text values for documents in Edit mode.
To replace a value with something other than text, use an @function
formula or LotusScript program. This action can modify the value of a
hidden field, if you can specify the fields name.
The Append Value option does not work for rich text, number, or time
fields or for fields that are not available within documents already saved
in the database. Also, Append Value is not available if a database does
not contain any documents (for example, a database template).
To include Append Value in databases without documents:
1. Create a place holder document containing the field.
2. Create the agent using the field from the place holder document.
3. Delete the document.
To specify a value:
1. Select the field to be modified from the Field pull-down list.
2. In the Value text box, enter the new value.
3. Select Replace value or Append value.
Automation in Applications 10-55

Building Applications

Mark Document Read


Marks selected documents as read. Use this action to mark an unread
document as read without opening it or for reverting a document that
was modified back to its read status because it doesnt actually need to
be read again for example, if it has been modified by an agent.

Modify Fields by Form


Replaces several field values on a form with new text values you specify.
This action replaces only text values. To replace a value with something
other than text, use an @function formula or LotusScript program. This
action marks processed documents as read.
To specify:
1. Select the form.
2. Enter the new value in the fields.
Move to Folder
Moves the highlighted document in a view or folder to a different folder.
This action removes the document from the source folder and adds it to
the specified folder. The document is not deleted from the database.
Remove from Folder
Removes selected documents from a folder you specify but does not
delete the documents from the database. If a document is included in
several folders, this action removes the document from the specified
folder, but does not remove the document from other folders. If a
document is included in only one folder, this action removes the
document from the folder and changes its category to Uncategorized.
Reply to Sender
Sends a reply to a mail memo automatically. Replies are not sent to a
mail memo that was generated by an agent. The Body field accepts only
plain text. It does not accept styled text, graphics, or attachments.
To specify:
1. Select Reply to sender only or Reply to all.
2. In the Body field, enter the reply text.
3. (Optional) Click Include copy of document to append the original
message to your reply.
4. Select Reply only once per person if a person is included in
multiple mailing groups.
Run Agent
Allows you to chain agents together with other agents or combine
LotusScript programs, @function formulas, and Java in one agent. The
agent to be run must already exist in the database.
The documents that additional agents process are determined by the first
agent. All subsequent agents use the same documents, regardless of their
own settings. The first agent completes its search and actions first and
then passes that information to the second agent. For example, Agent A
10-56 Application Development with Domino Designer

searches for all documents with the word green, replaces green with
yellow, and then runs Agent B. Agent B launches its own search
queries and actions only on the documents that Agent A processed.

If the document contains the DeliveryPriority, DeliveryReport, or


ReturnReceipt fields, they control the delivery priority, generation of a
delivery report, and generation of a return receipt. If the document
doesnt contain these fields, they default to normal priority, no delivery
report, and no return receipt, respectively.
Send Mail Message
Mails the selected document as a whole document or as a link. The Body
field accepts only plain text. It does not accept styled text, graphics, or
attachments.
To specify:
1. Specify recipients in the To field.
2. (Optional) Click More to specify more addresses using text or
formulas for the To:, cc:, bcc:, and Subject: fields.
3. Enter a subject.
4. In the Body field, enter the message text.
5. (Optional) Click Include copy of document to append the
document to the message.
6. Select Reply only once per person if a person is included in
multiple mailing groups.
Send Newsletter Summary
Searches a database for documents matching conditions you specify, then
sends a summary document with links to the individual documents. The
summary information includes items such as a one-line description of the
Date, Author, and Title columns.
The Gather at least option does not apply to sending a document
summary from a view or folder with an action because the action can act
on only the highlighted document, and Gather at least acts on multiple
documents.
Automation in Applications 10-57

Building Applications

Send Document
Mails the current document to the recipients designated in the
documents SendTo field. This action works like the @MailSend function.
To predict the recipient, the document must have a SendTo field. If it
doesnt, Notes uses the contents of the internal $UpdatedBy field as the
recipient. If the document also contains the CopyTo or BlindCopyTo
fields, it is routed to those recipients at the same time.

To specify:
1. Specify recipients in the To field.
2. (Optional) Click More to specify more addresses using text or
formulas for the To, cc, bcc, and Subject fields.
3. Enter a subject.
4. In the Body field, enter the message text.
5. Select Include summary for each document using view to send a
text summary of each document. Deselect it to send only document
links.
6. Choose a view.
@Function Formula
Adds a customized @function formula.

Using LotusScript for automation


Use LotusScript(R) for shared and unshared actions, buttons, action
hotspots, picture hotspots, script libraries, events, and agents.
LotusScript can be used to access data in Notes databases and in external
applications. For example, you can use LotusScript to change a value in
one document based on values in other documents or modify database
ACL lists.
See the Domino Designer Programming Guide and the LotusScript Language
Guide for more information about LotusScript.
Working with HTML
You can use the LotusScript Print statement with HTML as follows:

To display HTML information


For example, add this line to display the message Thank you for
your submission:
Print "<H1>Thank you for your submission</H1>"

To provide instructions to a browser


For example, add this line to direct a browser to the Domino Web
site:
Print "[http://domino.lotus.com]"

10-58 Application Development with Domino Designer

Restrictions for using the Print statement include:


It must be attached to a user-run automated component, such as an
action, a button, a manually-run agent, or a WebQuerySave event
that uses @Command([RunAgent]) or
@Command([ToolsRunMacro]).

If it is attached to a manually-run agent, it must also be a shared


agent.

It cannot be attached to a WebQueryOpen event.

Restricted LotusScript and Java agent operations


Note that restricted operations are available only to users with
unrestricted access; restricted operations are not available to users with
restricted access.
The ability to use the LotusScript or Java backend class methods to create
new or replica databases is controlled by the Create New Databases
and Create Replica Databases fields in the Server document in the
Domino Directory.
Classes and methods in this table also apply to remote Java/JavaScript
programs that access server based Domino objects over CORBA/IIOP.
User access is controlled by the server document fields Run Restricted
Java/Javascript and Run UnRestricted Java/Javascript found under
the heading IIOP Restrictions.

Table of restricted backend class and method


Task

LotusScript

Java

Using a
disk-based log
file

NotesLog OpenFileLog(path)

Log openFileLog(path)

Using
Environment
variables

NotesSession
GetEnvironmentString()

Session
getEnvironmentString()

NotesSession
SetEnvironmentVar()

Session
SetEnvironmentVar()

NotesSession GetEnvironment
Value(SystemVariable,true)

GetEnvironmentValue
(SystemVariable,true)

NotesDocument Sign()
NotesDocument Encrypt()

Document sign()
Document encrypt()

Encrypting or
signing

continued
Automation in Applications 10-59

Building Applications

Task

LotusScript

Embedded Object NotesRichTextItem


manipulation
EmbedObject()
NotesEmbeddedObject
ExtractFile(path)

Java
RichTextItem
embedObject()
EmbeddedObject
extractFile(path)

Table of restricted programming language operations


Task

LotusScript statement

Java

File I/O

Chdir
Chdrive
close
curdir
dir
eof
fileattr
filedatetime
filelen
freefile
get
getfileattr
input
input #
inputb
line input #
loc
lock s
lof
mkdir
Open
reset
rmdir
seek
setfileattr
unlock
width
write

No file I/O operations


allowed

Network I/O

N/A

No network I/O
operations allowed
continued

10-60 Application Development with Domino Designer

LotusScript statement

Java

Setting system
date/time

Date and Date$


Time and Time$

N/A

Calling a C routine

External C calls Declare

Users with unrestricted


access must also set the
NOTES.INI parameter
JavaUserClasses to the
file name of the class file
that contains the native
methods. For example,
use JavaUserClasses=
c:\lotus\notes\MyJavaCl
asses. This overrides a
security restriction of the
Agent class loader, which
does not allow classes
with native methods to be
loaded.

Executing another
application

ActivateApp
Shell

Not allowed

Formulas for automation


Use formulas for shared and unshared actions, buttons, formula
pop-ups, hotspots, events, specific infoboxes, and agents.

Using @command formulas with actions and hotspots


When an action or hotspot uses an @command formula, the formula
works only when it runs in the appropriate context. Keep the following
in mind:

A hotspot or action can process a field or an entire document, but not


a selected area. When you point to the button to activate it, you lose
the previous selection that is, the previous highlight disappears,
and only the button is highlighted. To work around this, use the
@command with parameters such as EditLeft or EditRight which
move the focus within a document. Then when the user activates the
hotspot or action, Notes uses the formula to determine what is
affected.

Formulas designed to edit a field dont work when the document is


in Read mode. To work around this, use the
@command([EditDocument]) to put a document in Edit mode.

Automation in Applications 10-61

Building Applications

Task

Security features that affect automation formulas


Automated components with formulas run by users work only if users
activate them in the correct context and have enough privileges to
perform the automated task. For example, if a formula in a hotspot uses
@SetField to change a field value, the hotspot doesnt work when the user
activating it has only Reader access or the document is in read mode.
An automated component with formulas cannot usually complete
unauthorized tasks on a database stored on a server because most users
do not have privileges that allow them to run such tasks. However, in a
local database where you have Manager privileges by default, an
automated component with a formula could potentially change
documents. If you are unfamiliar with the formulas associated with an
automated component, review them first.
If the users NOTES.INI file includes this statement
NoExternalApps=1

then any formula involving the following features is disabled:

@command

@PostedCommand

@DbCommand, @DbColumn, @DbLookup (only if it refers to a


non-Notes database)

@MailSend

Dynamic Data Exchange (DDE) including all @DDE functions

Object Linking and Embedding (OLE)

Launching attached files


The user doesnt see a message, but the formula wont run.

JavaScript for automation


Use JavaScript for shared and unshared actions, buttons, action hotspots,
picture hotspots, script libraries, and events. JavaScript Version 1.3 is
currently supported.
JavaScript is particularly useful for providing interactive components,
such as:

Form and field validation

Mouse effects (such as image rollover buttons and friendlier URLs)

Numeric calculations

Dialog box simulations

10-62 Application Development with Domino Designer

If you have selected JavaScript, you can write code that executes in either
the Notes client or on the Web. If you have selected Common JavaScript,
you can write code that executes in both the Notes client and on the Web.
When you use JavaScript, more processing can be done at the
workstation instead of the server, thereby reducing network traffic and
improving run-time task processing.

You can also check the following table to see what JavaScript objects are
available in each automated component and whether they are supported
in different browsers and the Notes client.

Table of supported JavaScript objects for automated components


This table lists the JavaScript objects that are available for automated
components and which browsers support the event. This table assumes
you are running Internet Explorer 5.0 or later, or Netscape Navigator
4.73 or later.
Action
Hotspot

Form
Action

Shared
Action Form

View
Action

Shared
Action View

IE

IE

IE

IE

IE

Notes
browser,
Notes
client,
Netscape,
IE

Notes
browser,
Notes
client,
Netscape,
IE

Notes
browser,
Notes
client,
Netscape,
IE

Notes
browser,
Notes
client,
Netscape,
IE

Notes
browser,
Notes
client,
Netscape,
IE

Works in Netscape, Notes


Netscape, Netscape,
IE
client,
IE
IE
Netscape,
IE

Netscape,
IE

Netscape,
IE

JavaScript Button
Object
onBlur
Works in Internet
Explorer
(IE),
Netscape
onClick
Works in Notes
browser,
Notes
client,
Netscape,
IE
onDblClick

continued
Automation in Applications 10-63

Building Applications

JavaScript works with Notes objects, such as windows, documents, or


fields. The objects that you can attach to JavaScript vary, according to the
component you are working on. In the Info List, click Objects to see what
is available. For example, set up a JavaScript automated task for an
OnClick event in a hotspot.

JavaScript Button
Object

Action
Hotspot

Form
Action

Shared
Action Form

View
Action

Shared
Action View

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

IE

Netscape,
IE

Netscape,
IE

IE

IE

Netscape, Netscape, Netscape,


IE
IE
IE

Netscape,
IE

Netscape,
IE

Netscape, Netscape, Netscape,


IE
IE
IE

Netscape,
IE

Netscape,
IE

Works in Netscape, Netscape, Netscape, Netscape,


IE
IE
IE
IE

Netscape,
IE

Netscape,
IE

onFocus
Works in IE,
Netscape
onHelp
Works in IE
onKeyDown
Works in IE
onKeyPress
Works in IE
onKeyUp
Works in IE
onMouseDown
Works in Netscape, Netscape, Netscape, Netscape,
IE
IE
IE
IE
onMouseMove
Works in IE

IE

IE

IE

onMouseOut
Works in IE
onMouseOver
Works in IE
onMouseUp

10-64 Application Development with Domino Designer

Actions and agents names


The names you give to manually-run agents appear as choices in the
Actions menu. The names you give to form actions and view actions
appear as choices in the Actions menu and on the action bar. The names
are case sensitive and can be any combination of characters, including
letters, numbers, spaces, and punctuation.

Choose short names for form and view actions that you design to
appear as action bar buttons.

Choices on the Actions menu appear in alphabetical order. To force


names to appear in a different order, number or letter them.

Use consistent names across databases to enable users to recognize


identical agents and actions.

Naming techniques
Aliases
You can use an alias with agents. An alias is another name, or synonym,
for a particular agent. Using an alias, you can change or translate the
name that users see without disabling formulas that reference the
original name. Aliases follow the same naming rules as regular names.
To create an alias, add a vertical bar (|) symbol and the alias name to the
right of the original name. Always keep the original name as the leftmost
name.
Agent1 | Agent1_Alias
You can have more than one alias. Separate each with the vertical bar (|)
symbol.

Shortcut keys
A shortcut key is an underlined letter in a choice on the Actions menu.
Windows, OS/2, and UNIX users type only the shortcut letter to select
the menu item. To specify a shortcut, type an underscore before the letter
you want to assign as the shortcut. For example, S is the shortcut for this
Save action:
_Save

Notes ignores the underline when it displays the name of an action on


the action bar.

Automation in Applications 10-65

Building Applications

Naming tips

Hiding automated components


When you create most automated components, you can hide them under
varying conditions. Use the Hide When tab located on many Properties
boxes to specify when to hide it.

Hide from Notes R4.6 or later


Hides a component when it is viewed from a Notes workstation. This
is useful for hiding components such as action bar buttons that you
provide to Web users as substitutes for Notes menu choices.

Hide from Web browsers


Hides a component when it is viewed from a Web browser. This is
useful for hiding components that arent relevant to Web users.

Hide from Mobile


Hides a component when it is viewed by a mobile user.

Hide when opened for reading; Hide when previewed for reading
Hides a component when a document is opened in Read mode.
These options are useful for components that are relevant only to
new documents or documents in Edit mode for example, actions
that modify a field.

Hide when previewed for editing; Hide when opened for editing
Hides a component when a document is opened in Edit mode. These
are useful for components that are relevant only to completed
documents for example, moving documents to another database,
creating response documents, or marking documents as unread.

Hide when printed


Hides the component when users print a document. This is useful for
removing clutter from a printed document.

Hide when copied to the clipboard


Hides the contents of the component when users copy a document.
Note If you create or save a document from a form that contains a
field with Hide when copied to the clipboard checked and then
copy the contents of the document somewhere else, the contents of
that field will not be pasted.

Hide if formula is true


Hides the component under certain conditions for example, based
on user name or access level in the access control list. For example,
the following formula hides the component from all users except
Barbara Meehan:
@If(@Name([CN];@UserName) !="Barbara
Meehan";@True;@False)

10-66 Application Development with Domino Designer

Chapter 11
Including Java Applets in Applications
This chapter describes adding Java applets to forms, documents, and
pages. Although Java applets are used mostly for Web applications, you
can also include them in Notes applications.

Java applets overview

Form The applet is included in each document created with that


form.

Document The applet is available only in the document.

Page The applet is available only in the page.

A Java applet usually consists of a collection of files, with one file that
contains the main class, or the starting point for the applet. There can
also be image files, archive files, and Java source files. You can store Java
applet files as follows:

When you import an applet, the files are attached as hidden files to
the form, document, or page where you include the Java applet.

When you link to an applet, files are stored on the Web and a URL
reference to those files is stored in the form, document, or page
where you include the Java applet.

When you set up shared applet resources, the files are stored in the
database where you include the Java applets that use those files.

Requirements and restrictions for Java applets

Java applets are supported for most releases of Internet Explorer 4.x
and 5.x and Netscape Navigator 4.x. Browser support is platform
dependent. For the latest information on supported browsers, see the
topic Supported Web browsers in the Release Notes.

11-1

Extending Applications

Applets are self-contained Java programs that can run in your Domino
application. Java applets are often used to add animation to Web
applications. Although Java applets are mostly used for Web
applications, you can also include them in the following elements of a
Domino application:

Java applets created with Notes 4.6 and later will not work with
previous releases of Notes, unless the applet is stored on the Web
and it has no parameters.

Notes 6.0 and later support Java Virtual Machine (JVM) version 1.3.

Overview of adding a Java applet to an application


To include a Java applet in an application:
1. Enable Java applets on your workstation.
2. Import the applet from files on your workstation or on a file server,
or link to an applet on the Web.
3. Use the Programmers pane and the Properties box to set applet
parameters, attributes, and properties. Some applets will run with no
modification, but most require that you set parameters or attributes
before you can run them.
4. Correct problems with the Java applets. If the applet doesnt run, you
may need to include additional files or set additional parameters.
5. Optionally, you can set up shared applet resources, that is, set up
related files so that they can be used by several applets.
For more information about Java or to find applets you can use, see the
Sun Microsystems Java Web site at http://java.sun.com.

Enabling Java applets


Before you can add a Java applet to a Domino or Notes application, you
must set up your workstation.
1. If you want to link to applets on the Web, make sure your Location
document specifies a valid Web proxy. See your system
administrator if you have questions about setting up a Web proxy.
2. Choose File - Preferences - User Preferences.
3. In the Basics tab, scroll down the Advanced Options list and select
Enable Java applets.
Note If Enable Java applets is not listed, check with your system
administrator.
4. Click OK.

11-2 Application Development with Domino Designer

Importing an applet
Before you import a Java applet, you must enable Java applets on your
workstation and make sure all the related files are available on your
workstation.
1. Open a page or form, or click in the rich text field of a document.
2. Choose Create - Java Applet.
3. In the Create Java Applet dialog box:
Select Import an applet from the file system.
In Base Directory, enter the path for the applet files.
In Class Name, enter the name of the main class.
To avoid typing the path and class name, click the folder icon to
browse for the main class file for the applet. Clicking the main
class file inserts the class and the path in the correct fields.
5. Browse for the applet files from the local file system, or from the
Shared Resources list, then do one of the following:
If you are using a shared resources applet, specify the database
where the applet files reside. Select the related applet files and
click Add/Replace File.
If you are inserting an applet that is packaged as a JAR file, select
the JAR file, and click Add/Replace File to include the JAR file.
6. Click OK twice.
7. (Optional) Set applet parameters, attributes, and properties.

Getting the main class name


One way to make sure you have the correct name for the main class
(which you enter in the Create Java Applet dialog box) is to use any text
editor to open the associated *.HTML file and check for this HTML tag:
<applet code=filename.class>

For example, the main class name for the following Java applet is
ArcTest.class.
<applet code=ArcTest.class width=400 height=400></applet>

Including Java Applets in Applications 11-3

Extending Applications

4. Click Locate to see all related files for the applet.

Selecting related files


Applet files can be of the following types:

Class *.CLASS

Archive *.JAR, *.ZIP, *.CAB

Resource *.JPG, *.JPEG, *.GIF, *.AU

Source *.JAVA

For most applets, you must select all class and resource files. Select the
source files only if you plan to send the applet to another user who wants
to export them and change the applet.
If you are inserting an applet that is packaged as a JAR file, you can enter
the path and the main class name as described above. Note that browsing
for the JAR file inserts the filename with a CLASS extension in the Class
Name field. In some cases, the file name and the main class name are the
same; in other cases, they are different and you must edit what appears
in the Class Name field to be the correct main class name.
If you have more than one applet in a form, document, or page, Notes
stores only one copy of common files.

Importing applets packaged as CAB or ZIP files


If you import an applet that is packaged as an archive file (such as either
a CAB or ZIP file), consider the browsers the application users have:

For Internet Explorer users, include the CAB file.


Note Domino does not display an embedded applet that is
packaged as a CAB file.

For Netscape users, include the ZIP and JAR files.

If users are likely to use either or both browsers, include CAB, JAR,
and ZIP files. Domino creates the appropriate parts of the APPLET
tag for these files. Netscape ignores the CABBASE (or CABINETS)
parameter and Internet Explorer ignores the ARCHIVE attribute.

Note At the Folder tab of the Java Applet Properties box, you can view
the applet files from an applet you imported. If you did not import an
applet, this field is blank.

11-4 Application Development with Domino Designer

Linking to an applet on the Web


Before you link to a Java applet on the Web, you must enable Java
applets on your workstation.
1. Open a page or form, or click in the rich text field of a document.
2. Select Create - Java Applet.
3. In the Create Java Applet dialog box:
Select Link to an applet on a Web server.
In Base URL, enter the URL where the applet files are stored. Do
not specify the document that references the applet. For example,
use
http://java.sun.com:80/applets/Bubbles

instead of
http://java.sun.com:80/applets/Bubbles/index.html

4. Click OK.
5. (Optional) Set applet parameters, attributes, and properties.

Setting applet parameters


Some Java applets have parameters that use default values. You do not
need to specify values for these parameters. For applets that have
parameters without default values, however, you must set parameter
values or the applet will not run. You can manually enter parameters and
values, or you can paste all of the parameters in the Programmers pane
and edit associated values.
To set individual applet parameters
1. Select the Java applet and, if the Programmers pane is not displayed,
choose Java Applet - Java Applet Parameters.
2. Click Applet Parameters in the Programmers pane.
3. Use any text editor and open the HTML file associated with the Java
applet.
If you imported the applet, check the HTML file on your file
system.
If you linked the applet, use a Web browser and check the HTML
file on the Web. For example, on Netscape you can choose View Page Source to see the HTML file.
Including Java Applets in Applications 11-5

Extending Applications

In the Base class name field, enter the name of the main class. Note
that Java is case-sensitive to file names.

4. Click Add.
5. Enter the parameter name. For example, enter bgcolor for the
following HTML tag:
<param name=bgcolor value="black">

6. Enter the corresponding value in the Parameter Value window. For


example, enter black for the example HTML tag in Step 5.
To set all applet parameters
1. Use any text editor or Web browser and open the HTML file
associated with the Java applet.
2. In the HTML file, select all of the parameters and copy them to the
Clipboard. For example, copy all of the following text:
<param name=bgcolor value="black">
<param name=fgcolor1 value="red">
<param name=fgcolor2 value="magenta">

3. Select the Java applet and if the Programmers pane is not displayed,
choose Java Applet - Java Applet Parameters.
4. Click Applet Parameters.
5. Click Paste to add the parameters and their values.
Tips
To change a parameter value, click its name in the Programmers
pane. Then change its value in the Parameter value window.

The parameter value is a formula; therefore, you must enclose text


values in double quotes. In addition to text strings, a parameter value
can be an @function or a field name.

If you are running an applet through a browser, you can add


JavaScript to a form or document to interact with the applet by
calling its public methods or setting/getting its public properties.

Specifying applet parameters, attributes, and properties


After importing or linking an applet, you may need to set one or more of
the following so that the applet runs correctly:

Parameters specify values the applet needs at startup and for


correctly displaying the applet in your application. The HTML file
lists parameters for the applet in <param> tags.
To set parameters, use the Programmers pane and click Applet
Parameters.

11-6 Application Development with Domino Designer

Body attributes specify values that are specific to a browser, such as


alignment values. Attributes are set at run time using a formula.
Domino uses the formula to generate HTML code that is placed in
the <applet> tag.
To set attributes, use the Programmers pane and click HTML Body
Attributes.

Alternate HTML attributes are usually used by browsers that do not


support Java. Domino uses the Alternate HTML attributes to
generate HTML code that is placed in the <applet> tag.
To set Alternate HTML attributes, use the Programmers pane and
click Alternate HTML.

Properties specify how an imported or linked applet appears in the


page, form. You can also use Java applet properties to hide the applet
under specific conditions.
To set properties, use the Java Applet Properties box.

1. Select the Java applet and, if the Programmers pane is not displayed,
choose Java Applet - Java Applet Parameters.
2. Click HTML Body Attributes.
3. Enter an HTML attribute in the formula window.

Setting Alternate HTML attributes


Use Alternate HTML for a browser that does not support Java.
1. Select the Java applet and if the Programmers pane is not displayed,
choose Java Applet - Java Applet Parameters.
2. Click Alternate HTML.
3. Enter text or a formula.
For example, enter the following to tell users that their browser
doesnt work with the Java applet:
"You're trying to run a Java applet with a browser that
doesn't support Java. You can run this applet with
Domino, Netscape Versions 3 and 4, or Internet Explorer
Versions 3, 4, or 5."

4. (Optional) Use the Text to display when applet is not running


property in the Java Applet Info tab of the Java Applets Properties
box to specify text that a browser displays when it supports Java but
cannot display the Java applet.

Including Java Applets in Applications 11-7

Extending Applications

Setting HTML attributes

Setting properties
Use the Java Applet Properties box to set applet properties (such as
height and width). You can also use the Properties box to hide an applet
by condition, or to hide an applet based on the browser accessing it.

To set applet properties


1. Select the Java applet and choose Java Applet - Java Applet
Properties.
2. Click the Info tab to set any of these properties.
Property

Description

Base class

The name of the main class file.

DocBase

Provided for information only. You cannot edit it.

CodeBase

CodeBase is the path storing the class files, relative to the


base class file. If you linked to an applet on the Web, the
URL of the directory containing the applet is displayed,
and you can edit the URL name. Otherwise, the field is
provided for information only.

Size

The Height and Width fields set the size of the applet
display area in the Domino application where the applet is
running. If the applet is too large to run in the default size,
you must reset these settings, using the height and width
settings from the HTML file. To determine the applet size,
use any text editor or Web browser to view the HTML file.
Check the width and height values specified in the
<applet> tag. Enter these values in the Width and Height
fields. You can also specify a size for the applet as a
percentage of its parent window.

Text to display
Domino displays the text you specify when it cant run the
when applet is not applet. Enter a simple text string, such as This applet is
running
not working at this time.
Applet uses Notes Enable the applet to access Notes objects.
CORBA classes
Applet uses
CORBA SSL
security

If you select Applet uses Notes CORBA classes, this


setting becomes available.

11-8 Application Development with Domino Designer

To hide an applet under certain conditions


You can hide an applet so it appears only under certain conditions in the
form or page.
1. Select the Java applet and choose Java - Java Applet Properties.
2. Click the Hide-When tab and choose one of the following:

Hide paragraph from


You can hide the applet according to what client is being used to
access the application. For example, you might hide an applet from a
mobile user to improve the performance of the mobile application.
Or you might hide an applet from a Notes user but choose to display
the applet to Web clients.

Hide paragraph when document is


You can hide the applet according to how the document is being
used. For example, you might hide the applet when the document is
open for editing.
Hide paragraph if formula is true
You can customize the conditions for hiding the applet by writing a
hide-when formula that specifies the criteria for hiding the applet.

To hide an applet based on the browser accessing it


1. Create a field named HTTP_USER_AGENT in the form where you
imported or linked the applet, or in the form used by the document
where you imported or linked the applet.
2. For the field type, select Text and Computed for display. Optionally,
you can hide the field.
3. Enter the following formula for the field value:
HTTP_USER_AGENT

When a user accesses a document that uses this form, the Web server
fills in the field with a string describing the browser type and
version. The format of the string differs according to the browser.
Some examples:
Mozilla/3.0Gold (WinNT; I)
Mozilla/2.0 (compatible; MSIE 3.02; Update a; Windows
95)

Including Java Applets in Applications 11-9

Extending Applications

4. Select the Java applet and choose Java Applet - Java Applet
properties. Click the Hide When tab and enter a formula that uses
this field to hide the applet for a particular browser. Use the
@contains(HTTP_USER_AGENT; string) formula.
For example, use the following formula to hide the applet from
Internet Explorer:
@Contains(HTTP_USER_AGENT; "MSIE")

Setting up shared applet resources


For large Java applets with multiple files, consider storing some of the
related files as shared resources in the database. When you set up files as
shared resources, all the applets can use a single copy of the file, instead
of each applet storing its own copy. Then, if a file requires updating, you
only need to update one file. For applications that include multiple
databases, one database can hold shared resources for use in all the
related databases.
To create a shared applet resource
1. Select the database where you want to set up the shared resources.
2. Choose Resources - Applets.
3. Click New Applet Resource.
4. In the Base Directory field, enter the path where the Java applet
files are stored.
5. Select the files you want to set up as shared resources from the
Available Java Files list and click Add/Replace file.
6. Click OK and enter a name. Click OK and Domino stores all the files
as a shared resource with the name you entered.
7. (Optional) Double-click the shared resource to open the Java
Resource Properties box. At the Basics tab, you can rename the
shared applet and give it an alias. You can also view the files that
make up this applet.
To use a shared applet resource
You can include a shared applet resource from the current database, or
from another database on your desktop.
1. Open a document and click in a rich text field.
2. Choose Create - Java Applet.

11-10 Application Development with Domino Designer

3. In the Create Java Applet dialog box:


Select Import an applet from the file system.
In Base Directory, enter the path for the applet files.
In Class Name, enter the name of the main class.
4. Click Locate to see all related files and shared resources for the
applet.
5. Select Shared Resources in the Browse list, specify the database
where the shared resource resides, and select the related applet files.
Click Add/Replace File.
6. Click OK twice.

Stopping, selecting, and restarting applets

To stop an applet
To stop running one or all applets in a page, form, or document, choose
View - Show - Java Applets Running.

To select an applet
1. If the applet is running, you cannot select it. Choose View - Show Java Applets Running to stop the applet.
2. Click directly to the right of the applet.
3. Use the left arrow key to select the applet.

To restart an applet
When you open the page, form, or document containing an applet, it
starts running automatically. To restart an applet after you stopped it,
double-click it.

Copying and deleting applets


You can copy applets and paste them in other applications or on another
page, form or document within the same application. You can also delete
an applet you no longer need.

Including Java Applets in Applications 11-11

Extending Applications

Applets start running automatically when you open a page, form, or


document containing them. However, to select and work with an applet,
you must first stop it.

To delete an applet and its related files


Before you delete an applet, remember that you cannot undo the
deletion. Also, when you delete an applet that you have imported, the
related files are also deleted, unless another applet shares the files. If you
want to delete shared files, you must delete them in each page, form, or
document that contains an applet that uses them.
1. Stop the applet if it is running.
2. Select the applet and choose Edit - Delete.

To copy an applet
You can copy an applet from one page, form, or document to another
page, form, or document. When you copy an applet you have imported,
all its related files are copied. When you copy an applet you have linked
to on the Web, only the link is copied.
1. Stop the applet if it is running.
2. Select the applet and choose Edit - Copy.
3. Click in the page, form, or document where you want to copy the
applet.
4. Choose Edit - Paste.
5. (Optional) Set applet parameters, attributes, and properties.

Refreshing and exporting applet files


You can refresh an applet when you need to update existing files or add
new files to the applet. Exporting an applet allows you to copy all the
applet files to your workstation or any other place to which you have
access.
To refresh applet files
1. Select the Java applet and choose Java Applet - Refresh.
2. Select files to add or replace, and click Add/Replace File.
3. Click Refresh.
To export files
1. Select the Java applet and choose Java Applet - Export.
2. Choose the directory to export the files to and click OK. Domino
exports all the applet files and creates subdirectories as needed.

11-12 Application Development with Domino Designer

Setting security for applets


To protect the security of the file system, Java security generally does not
allow applets to access Notes classes. However, you can set up the applet
so that it can access Notes classes, thereby allowing it to open a database
and change data in it.

To set security for applets in Notes


To set up secure access for applets that will access the file system or
Notes Java classes through Notes, you must first set up an access control
list (ACL), then set up an execution control list (ECL) for each user or
group. The ECL controls access to the file systems and to the Notes
classes on the workstation.
1. In the database storing the Java applet, choose File - Database Access Control and set up the ACLs.
2. Choose File - Security - User Security.
4. Select What Others Do.
5. Select Using Applets.
6. Under When applet is signed by, enter the users and/or groups
that will have access to the file system or Notes classes.
7. In the Allow list, select the options the users can use while running
the Java applet.
8. Click OK.
When a user runs the applet, Domino checks for execution rights of the
person or group that signed the applet. If an applet is signed by a person
or group without the correct authorization, Domino alerts the user of the
illegal operation. The user can stop the operation and not run the applet,
trust the signer of the applet one time, or automatically add the signer to
the execution control list.

To set security for applets in Web applications


Complete these steps to set up secure access for applets that will access
the file system or Notes Java classes through a browser.
1. Use CORBA to write a Notes/IIOP applet that accesses the Notes
classes.
2. Import the Notes/IIOP applet in a page, form, or document, using
the same procedure as for any other applet.
3. When you click Locate to Include the related applet files, make sure
to include the NCSO.JAR file.
Including Java Applets in Applications 11-13

Extending Applications

3. Enter password.

4. Import or link the Java applet that users will run.


5. Select the Java applet and choose Java Applet - Java Applet
Properties.
6. In the Java Applet Info tab select Applet uses Notes CORBA
classes.
Assuming your browser and server are set up correctly, you should be
able to use a supported browser to view these embedded CORBA applets
on a Domino server. You do not need to set alternate HTML for the
CORBA applet to run. When you check the setting that specifies the
applet as a CORBA applet, Domino automatically provides the HTML
source code that the applet needs to make an IIOP connection back to the
server.
To extend the AppletBase class
An applet intended for run-time access of lotus.notes.noi extends
AppletBase and puts its functional code in the methods notesAppletInit()
and notesAppletStart(), as shown in the sample code below, and in
notesAppletStop(). You do not have to distinguish between local and
remote access. AppletBase will make local calls if the applet is running
through the Notes client and remote calls if it is running through a
browser.
Here is an example of an applet that makes NOI calls:
import lotus.notes.noi.*;
public class platform4 extends AppletBase
{
java.awt.TextArea ta;
public void notesAppletInit()
{
setLayout(null);
setSize(100,100);
ta = new java.awt.TextArea();
ta.setBounds(0,0,98,98);
add(ta);
ta.setEditable(false);
setVisible(true);
}
public void notesAppletStart()
{
try
{
// Can also do getSession(user, pwd)
Session s = this.getSession();
11-14 Application Development with Domino Designer

if (s == null) { //we were not able to make the


connection, warn user
ta.append("Unable to create a session with the
server");
return;
}
String p = s.getPlatform();
ta.append("Platform = " + p);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}

Saving applet data

Externalization
The applet stores specific information that it needs in order to return
to the state it was in before it was reinitialized. To maximize
efficiency, it is recommended that you use externalization.

Serialization
The applet stores all information, for example, each variable and its
current value, each class, and all header information.

Considerations
Although you can set up an applet for both externalization and
serialization, Notes cannot support both. An error is not reported, but
one applet cannot do both.
In the Java applet itself, you must write methods to support the Java
Externalize interface. If the applet does not have these methods, you can
still run the applet. However, the data cannot be saved, even if you set
up the parameters.
If you save data, keep these points in mind:

If the applet is imported in a subform, the data from the subform has
precedence over the data in the form. Therefore, modifying an applet
in a subform modifies all of the forms that include that subform.

Including Java Applets in Applications 11-15

Extending Applications

Various actions in a Notes document, form, or page, such as resizing or


editing applet parameters, cause the applet to reinitialize to the state it
was in when you opened the document, form, or page. When the applet
reinitializes, it loses data you entered and its current state. There are two
methods for saving applet data:

Data from an applet contained in a document takes precedence over


the data stored in a form or subform.

If you imported the applet in a document and you are saving data, the
data file will be copied if you export the applet. If you imported the
applet in a form, the data file will not be copied if you export the applet
from a document you created with the form.
Externalization
There are three parameters available to direct Notes to save and reuse
externalized data:

ReadExternalData
Directly after reinitialization, the applet uses this parameter to load
data previously saved.

ExternalData
Any time after reinitialization, the applet uses this parameter to load
data previously saved.

WriteExternalData
After a Notes save event, the applet uses this parameter to save
current data. The data is saved as an external object with an
attachment in the document that references it. The attachment is
hidden and cannot be seen by the user.

Usually you do not need to use both ReadExternalData and


ExternalData. Use either one depending on when you want the applet to
load data.
Generally, the values you assign to the parameters are the same.
To set up externalization
1. Select the Java applet and choose Java Applet - Java Applet
Parameters.
2. Click Applet Parameter in the Programmers pane.
3. If you want the applet to load data as soon as it has completed
initialization, click Add and do the following:
In the Parameter Name field, enter ReadExternalData and click
OK.
In the Parameter value window, enter the value for
ReadExternalData. Its value is the name of a file that is attached to
the page, form, or document where the applet is stored. For
example, enter:
mydata

11-16 Application Development with Domino Designer

4. If you want the applet to load data at some other point after
initialization, click Add and do the following:
In the Parameter Name field, enter ExternalData and click OK.
In the Parameter value window, enter the value for ExternalData.
Its value is the name of a file that is attached to the page, form, or
document where the applet is stored. For example, enter:
mydata

Notes appends the value with the entire URL of the data file.
5. If you want the applet to save data at the end of the session, click
Add and do the following:
In the Parameter Name field, enter SaveExternalData and click
OK.

mydata

If the file attachment does not exist, Notes creates it and stores the
data in it.
Example HTML code
<PARAM NAME="readexternaldata" VALUE="mydata">
<PARAM NAME="writeexternaldata" VALUE="mydata">

Serialization
There are two parameters available to direct Notes to save and reuse
serialized data:

Object
The applet uses this parameter, a standard HTML parameter, to load
(using Java VM and VM) previously saved applet data in the
serialized object. The object must exist before the applet attempts to
load it, or the operation fails.

WriteObject
After a Notes save event, the applet uses this parameter, a Notes
extension, to save the data. The data is saved as a serialized object in
a hidden attachment to the document. The user cannot see the
attachment.

Including Java Applets in Applications 11-17

Extending Applications

In the Parameter value window, enter the value for


SaveExternalData. Its value is the name of a file that is attached to
the page, form, or document where the applet is stored. For
example, enter:

To set serialization
1. Select the Java applet and choose Java Applet - Java Applet
Parameters.
2. Click Applet Parameters in the Programmers pane, and then click
Add.
3. To load the previously saved data, enter the following in the
Parameter Name field and click OK:
Object

4. In the Parameter value window, enter the value for Object. Its value
is the name of a file that contains the previously saved state
information from the WriteObject parameter. This file is attached to
the page, form, or document where the applet is stored. For example,
enter:
mydata

5. To save the applet data, click Add, enter the following in the
Parameter Name field, and click OK:
WriteObject

6. In the Parameter value window, enter the value for WriteObject. Its
value is the name of the file that is attached to the page, form, or
document where the applet is stored. For example, enter:
mydata

Example of HTML code


Your parameters might look like this:
<PARAM NAME="object" VALUE="mydata">
<PARAM NAME="writeobject" VALUE="mydata">

Tips and troubleshooting for Java applets


When the applet runs, the status bar displays messages such as Loaded
<applet-name>, Initialized <applet-name>, and Started
<applet-name>. If the applet does not load properly, a dotted gray
rectangle appears instead. Review the sections below and choose File Tools - Show Java Debug Console to examine the applet and determine
the problem.

11-18 Application Development with Domino Designer

Troubleshooting an applet that is not running


If the applet is linked to a Web site, check that your Web proxy is
running. Get the name of your Web proxy from your Location
document. If you are running Windows, go to the DOS prompt and
use the ping command followed by the proxy name to determine if
your connection is valid. If the ping command returns an error rather
than a reply, contact your system administrator for help restoring
your Web proxy.

Check that you included all the necessary applet files. Choose Java
Applet - Refresh to add additional files to the applet. To make sure
you have all the files, select All for File Types and click Select All to
include everything.

Check that you entered the correct name for the applet files. Java is
case sensitive, so the file names must match exactly.

Make sure you correctly specify the parameters required by the


applet. Choose File - Tools - Show Debug Java Console and view the
messages reported by the Java applet. Check for missing parameters
and add in parameters that are required.

Accessing resource files


Java applets frequently use resource files such as images and audio files.
There are three common ways that applets access these files:

By specifying a full URL for the file, for example,


http://www.someplace.com/image.gif.

By using the applet class getDocumentBase method to construct a


URL relative to the location of the document in which the applet is
found.

By using the applet class getCodeBase method to construct a URL


relative to the code base of the applet, that is, the location from which
the applets files were loaded.

Depending on what method you use, Domino may not be able to locate
resource files for the applet. The getCodeBase method is the most reliable
method for specifying resource files. If you experience problems with
applets not finding resource files, modify your applet to use
getCodeBase. Recompile the files and choose Java Applet - Refresh to
replace these files in the document.

Including Java Applets in Applications 11-19

Extending Applications

Specifying a full URL


If your applet specifies a full URL to locate a resource file, for example,
getImage(http://www.someplace.com/images, image.gif), the
applet attempts to find the file at that URL. This usually works when
running applets within the Notes client in a document served by a
Domino server, as long as you correctly configure your Notes client to
access files on the Internet.
Similarly, you can access images attached to Notes documents by
constructing the Domino URL to include a $FILE for example,
getImage(http://www.someplace.com/database.nsf/MasterView/862..
12E/$FILE, image.gif). As above, the Notes client must be able to
access the Domino server in order for an applet running in the Notes
client to be able to access this file.
One of the drawbacks of specifying a full URL for an applet resource file
is that it may be slow to access this file through the Internet and not all
Notes clients are set up to directly access the Internet. Also, this course of
action assumes that the location of this file will not change. If these are
not concerns, spcifying a full URL is a reliable way to access resource
files.
Using getDocumentBase
The least reliable means of specifying resource files is the
getDocumentBase method. The getDocumentBase method of specifying
resource files returns the base URL (that is, the full document URL minus
the document file name) of the document in which the applet is located.
For example, if an applet is running in a document at:
http://www.someplace.com/test/example.html

the getDocumentBase method returns a URL specifying:


http://www.someplace.com/test

Some applets use this method to specify a URL for resource files for
example, getImage(getDocumentBase(), image.gif). Using the above
URL as an example, the applet would be looking for the image file at the
URL
http://www.someplace.com/test/image.gif

11-20 Application Development with Domino Designer

Note, however, that the Domino URL for a document does not simply
refer to a file; instead, it is a command for the Domino server to generate
the HTML representing a document. If you use the getDocumentBase
method as a Domino URL, you get unexpected results. For example,
suppose you linked an applet with the following Domino URL:
http://www.someplace.com/database.nsf/MasterView/862..12E?Op
enDocument

In this case, using the getDocumentBase method in conjunction with the


getImage call returns:
http://www.someplace.com/database.nsf/MasterView/image.gif

The applet cannot find the file because the document ID is gone and the
image is an attachment to a document, requiring a $File qualifier as part
of its name.

Using getCodeBase
The most reliable means of specifying a resource file for an applet is the
getCodeBase method. The getCodeBase method returns the base URL
from which the applet was loaded. The codebase for an applet can be
specified by the CODEBASE attribute in the APPLET tag. When Domino
generates the HTML for an applet which has been inserted into a Notes
document, it generates a full URL for the CODEBASE attribute. For
example, given the example above, the getCodeBase method returns:
http://www.someplace.com/database.nsf/MasterView/862..12E/$F
ILE

When used in conjunction with resource calls, such as getImage calls,


getCodeBase correctly specifies the resource file. For example:
getImage(getCodeBase(), "image.gif")

yields the following URL when the applet is served by Domino:


http://www.someplace.com/database.nsf/MasterView/862..12E/$F
ILE/image.gif

This results in a URL that allows the applet to successfully find the file.

Including Java Applets in Applications 11-21

Extending Applications

Because the documents ID has been removed (and since the image is in
an attachment in the document and thus needs $FILE to qualify the file
name), the requested image cannot be found by the applet.

Modifying parameter values to locate resource files


Some applets include parameters that refer to resource files or to
directories containing resource files. For example, an applet may include
a parameter specifying a file for use as a background image or a
directory for audio files. You may need to edit the applet so that these
parameters are relative to the code base, rather than to the document
base.
If you are not building the applet yourself, for example, if you are linking
to an applet on the Internet, or if you obtained a set of CLASS files
without the source code, you might need to edit a parameter value after
inserting the applet into a form or document. In that case, prepend the
string $notes_codebase to the parameter value.
For example, instead of using images/image.gif, use
$notes_codebase/images/image.gif as the parameter value. Domino
converts any occurrences of the $notes_codebase string in a parameter
into the code base for the applet. The parameter value
$notes_codebase/images/image.gif is therefore converted by Domino
to:
http://www.someplace.com/database.nsf/MasterView/862..12E/$F
ILE/images/image.gif

Since this effectively means that you are providing a full URL when
specifying the parameter value, the getDocumentBase method in the
applet is overridden, and the applet will be able to find the resource file.

11-22 Application Development with Domino Designer

Chapter 12
Including Java Servlets in Web Applications
The following topics describe creating and running Java servlets on a
Domino Web server. Servlets are invoked by URLs and are capable of
performing a wide variety of custom operations for a Web application.

Overview of Java servlets

Domino supports both Java servlets and Java applets for Web
applications. The most important difference between these types of Java
programs is how they are run. Servlets are server-side programs; a
servlets Java class is loaded and run entirely within the Domino server
and the result from the servlet, usually a page of HTML, is returned to the
browser. In contrast, applets are client-side programs; an applets Java
class is downloaded to the browser and is run by the browser. Therefore,
applets require Java support in the browser, but servlets do not.
Servlets for Domino must conform to the Java Servlet API Specification,
an open standard published by Sun Microsystems, Inc.
Running a servlet in Domino involves writing the servlet, enabling
servlet support in Domino, and, if necessary, setting servlet properties.

12-1

Extending Applications

A servlet is a Java program that is run by the Domino Web server in


response to a browser request. Servlets provide a convenient way to add
powerful functionality to your Web application. In some ways, servlets
act like CGI programs, but they are more tightly integrated with the
server and can take advantage of special Java classes. For example, a
servlet may connect to a relational database or enterprise system and get
data in response to a Web browser request.

Comparing agents, servlets, and CGI programs


Agents, servlets, and CGI programs all allow you to extend the
functionality of your Domino Web application. Agents can be tightly
integrated with a Web application through the form WebQueryOpen and
WebQuerySave events. Servlets have special features available through
the Servlet API classes, such as session and cookie management. Due to
the growing popularity of Java, the trend today is to use servlets rather
than CGI programs for new development. However, there is a large
selection of off-the-shelf CGI programs already available.
If you are writing your own application and need to program some
functionality on the server, you may have a choice of which type of
program to use. Each type of program has its advantages and will be the
best choice in particular situations. Here are some suggested uses for
each type of program:
Program type

Best uses

Agent

Programs that perform Domino actions when documents are


read or posted.
Programs that need to be run on a schedule or when database
actions occur, such as the arrival of new mail.

Servlet

Programs that use standard Java interfaces such as JDBC.


Programs that use HTTP session maintenance or cookies.
Complex or resource-intensive Java programs.

CGI program

Programs that need low-level access to system resources.


Programs that interface with another product through a
non-Java API.

Here are some useful comparisons of the properties of these programs.

What language can the program be written in?

Agent: Java, LotusScript, or Notes formula language. All are


inherently cross-platform.

Servlet: Java. Inherently cross-platform.

CGI program: Platform scripting languages; that is, any language


compiled into an executable file, or cross-platform languages such as
Java or Perl.

12-2 Application Development with Domino Designer

Where is the program stored?

Agent: Stored in a Domino database, which means that agents take


advantage of database replication and server clustering.

Servlet: Stored in the file system, usually in the domino\servlet


directory.

CGI program: Stored in the file system, usually in the domino\cgi-bin


directory.

How is the program invoked by a Web user?


Agent: Invoked automatically by a WebQueryOpen or
WebQuerySave event, or invoked directly by an OpenAgent URL
(for example, http://acme.com/sales.nsf/results?OpenAgent).
Agents can also be triggered by server events, such as the arrival of
new mail, or on a scheduled basis.

Servlet: Invoked directly by a URL. Domino recognizes two types of


servlet URLs. The first type specifies the servlet by its name (for
example,
http://acme.com/servlet/SQLDatabaseQuery?month=june). The
second type specifies a file extension that the Domino administrator
has mapped to a servlet (for example,
http://acme.com/sqlquery.esp?month=june).

CGI program: Invoked directly by a URL (for example,


http://acme.com/cgi-bin/filesearch?string=widget).

When is the program loaded and unloaded by the server?

Agent: Loaded every time it is invoked and unloaded when it has


finished.

Servlet: Loaded once; stays loaded until the HTTP server task is shut
down or restarted. This gives servlets a significant performance
advantage over agents or CGI programs. However, this also means
that the servlet classes can be accessed from many requests
simultaneously, so you must make sure that the servlet code is
thread-safe.

CGI program: Loaded every time it is invoked and unloaded when it


has finished.

How can the program interact with Domino?

Agent: LotusScript and Java agents can use the Domino object classes.
Formula agents can use most @functions.

Servlet: Can access Domino through the Common Object Request


Broker Architecture (CORBA) interface.
Including Java Servlets in Web Applications 12-3

Extending Applications

CGI program: Can access Domino through the CORBA interface, or


through the Domino C or C++ APIs.

What security is available for the program?

Agent: To invoke an agent, a Web user must have at least Depositor


access to the database containing the agent. An agent can run with
the identity of its creator or the user. The full range of Domino
security features applies to operations performed by the agent.

Servlet: Access to the servlet can be controlled by file-protection


documents in the Domino Directory. If the servlet accesses Domino
through the CORBA interface, it can specify a Domino user name
and Internet password. Domino security applies to all CORBA
operations.

CGI program: Access to the program can be controlled by


file-protection documents in the Domino Directory. If the program
accesses Domino through a C API, it takes the identity of the server
ID; if it uses the CORBA interface, it can specify a user name and
Internet password. In both cases, Domino security applies.

Running servlets in Domino


Writing the servlet
To write a servlet, you need a Java compiler and the servlet API. You can
obtain both from Sun Microsystems Web site at http://java.sun.com.
Download the Java Development Kit (JDK), which includes the compiler
and other basic tools, and the Java Servlet Development Kit (JSDK),
which includes the servlet API specification, the servlet .JAR file
(jsdk.jar), and example servlets. The Sun site also provides links to other
servlet resources on the Web.
You can also write servlets using any popular Java development
environment. As a convenience, a copy of jsdk.jar is included in the
Domino server and Designer installation kits. It is identical to the file
supplied in Suns JSDK.
Sun periodically updates the JDK and JSDK. Lotus Domino Designer
Release 6 supports JDK 1.3 and JSDK 2.0. Domino quarterly maintenance
releases (QMRs) often incorporate Suns upgrades, so you should check
the QMR Release Notes to verify the supported JDK and JSDK versions.

12-4 Application Development with Domino Designer

Enabling servlet support in Domino


Servlets are loaded and called by the Domino Java Servlet Manager, a
part of the HTTP server task. The runtime Java support for servlets is
provided by the Domino Java Virtual Machine (JVM). When the HTTP
task is started, it can automatically start the servlet manager and load the
JVM. The HTTP task will write status messages for these operations to
the server console and log file.
The servlet manager is controlled by settings in the Domino Directory
Server document. The settings are located on the Internet Protocols Domino Web Engine tab of the Server document. The settings are as
follows:
Options

Java servlet
support

None: (default) The HTTP task does not load the servlet
manager or the JVM.
Domino Servlet Manager: The HTTP task loads both the JVM
and the servlet manager.
Third Party Servlet Support: The HTTP task loads the JVM,
but not the Domino servlet manager. This allows the use of
third-party servlet managers such as the IBM WebSphere
Application Server.

Servlet URL
path

The path in a URL that signals Domino that the URL refers to
a servlet. The default is /servlet.

Class path

A list of one or more paths which the Servlet Manager class


loader will search to find servlets and their dependent classes.
This setting allows you to add additional paths. You may
specify directories, JAR files, and ZIP files. Paths may be
absolute or relative to the Domino data directory. The default
is domino\servlet.
Examples:
Relative directory path: domino\servlet
Absolute directory path: c:\apps\MyServlets
JAR file: c:\javamail\mail.jar
ZIP file: domino\servlet\sql.zip

Servlet file
extensions

A list of URL file extensions that signal Domino that a URL


refers to a servlet. Each extension in the list must be mapped
to a single servlet by a directive in the servlets.properties file.
The default is no extensions.

The following settings control the Domino Servlet Managers runtime


support of the Java Servlet API HttpSession interface. A servlet that does
not use this interface is not affected by these settings.

Including Java Servlets in Web Applications 12-5

Extending Applications

Setting

Note The HttpSession interface support is completely separate from the


HTTP session authentication feature in Domino.
Setting

Options

Session state tracking Enabled: (default) The servlet manager periodically


checks the user activity of all HttpSession instances.
Sessions that have been idle for a given period of time
are automatically terminated. The servlet manager calls
the instances HttpSession.invalidate() method to
inform the servlet that the session is being terminated.
Disabled: Sessions will not be checked for inactivity.
Idle session timeout

The number of minutes of user inactivity to wait before


terminating a session. The default is 30 minutes.

Maximum active
sessions

The number of simultaneous active sessions allowed.


The default is 1,000 sessions. When this limit is reached,
the sessions that have been idle the longest are
terminated.

Session persistence

Enabled: When the HTTP task exits, the servlet


manager saves session data to a disk file called
sessdata.ser in the Domino data directory. The session
data will be reloaded when the HTTP task is restarted.
Objects that the servlet has bound to sessions will also
be saved if the objects implement the
java.io.Serializable interface.
Disabled: (default) All session data is discarded when
the HTTP task exits.

Loading servlet classes with the JVM loader


The Servlet Manager class loader will not load classes that use native
code, create custom class loaders, or perform certain other restricted
operations. If your servlet requires a class that cant be loaded by the
Servlet Manager, you can try loading it with the Domino JVM class
loader. The JVM loader is normally responsible for loading classes from
the standard Java archives installed with Domino, in particular the java.*
and lotus.* packages. You can force a servlet to be loaded by the JVM
loader rather than by the Servlet Manager loader by moving the servlet
from the Servlet Manager classpath to the JVM classpath. The JVM
classpath is specified by the NOTES.INI variable JavaUserClasses.
Tip You can also load classes in the NOTES.INI file when a class your
servlet requires conflicts with classes in the Domino-supplied
LotusXSL.jar file. If you load and run a servlet and get a Verify Error
message, try moving the JAR files for the servlet from the Servlet
Manager classpath to the JavaUserClasses statement in the NOTES.INI
file.
12-6 Application Development with Domino Designer

Setting properties for servlets


Special properties for individual servlets can be specified in a text file
called servlets.properties located in the Domino data directory. The
following properties can be specified:

Alias

Initialization arguments

URL extension mapping

Load at Servlet Manager startup

These properties are specified by directives in the servlets.properties file.


The general syntax of a directive is:
servlet(s).<name>.<property>=<value(s)>

Servlet aliases
The alias directive has this syntax:
servlet.<alias-name>.code=<class-name>

For example:
servlet.SQLQuery.code=sql.database.query.Servlet

As a security measure, Domino does not allow servlet names containing


periods to be used in a servlet URL. This prevents malicious users from
trying to load arbitrary Java package classes through the Servlet
Manager. If your servlet has a package name, you must assign an alias to
it. The above example allows the servlet sql.database.query.Servlet to be
invoked by a URL such as
http://acme.com/servlet/SQLQuery?month=june. Aliases are also
useful for hiding the actual names of servlets from users.
You can assign more than one alias to a servlet. The servlet manager will
create a new instance of the servlet on receiving the first URL that refers
to each alias. The servlet manager will call the servlets init() method
when a new instance is created. Since the alias name can be used in other
directives in the properties file, the instances can be given different
properties. For example, you could specify a separate initialization
argument directive for each alias. Also, because the servlet classes are
only loaded once even if multiple instances are created, the instances of
the servlet can share data by using static class variables.
Including Java Servlets in Web Applications 12-7

Extending Applications

Directives are case-sensitive. The servlets.properties file can also contain


blank lines and comment lines starting with the # character. The
servlets.properties file is optional. The default properties for servlets are:
no alias, no initialization arguments, no extension mapping, and load
servlets on demand.

As a security feature, if you give a servlet an alias, the servlet cannot be


directly referenced in a URL by its class name. This allows you to hide
the actual name of a servlet.

Initialization arguments
You can specify initial data for a servlet in the properties file. The servlet
can access the data by using the method ServletConfig.getInitParameter.
The initialization directive has this syntax:
servlet.<alias or class
name>.initArgs=<name1=value1>,<name2=value2>,...

Multiple arguments can be specified, separated by commas. For example:


servlet.SQLQuery.initArgs=target=db2,user=Domino,cacheSize=3
0

URL extension mapping


The URL extension mapping directive has this syntax:
servlet.<alias or class name>.extension=<extension>
<extension> ...

You can assign more than one extension to a servlet, separating each
from the next by a space. All extensions must also be included in the
Servlet file extensions setting in the Server record. For example, to
cause Domino to call the SQLQuery servlet whenever a URL specifies the
extension sql or sq, add sql,sq to the server setting and add this
directive to the properties file:
servlet.SQLQuery.extension=sql sq

This allows a user to invoke the servlet with a URL like this:
http://acme.com/query.sql?month=june

Load on startup
By default, the servlet manager loads a servlets class files into memory
the first time a URL is received that refers to the servlet. However, you
can specify that one or more servlets should be loaded immediately
when the servlet manager is started. This prevents users from
experiencing delays when servlets are first requested from URLs.
The startup directive has this syntax:
servlets.startup=<alias or class> <alias or class> ...

Note that servlets is plural and that the servlet names must be
separated by spaces.
12-8 Application Development with Domino Designer

If you have given a servlet one or more aliases, you can include the
aliases in the startup directive. This will cause the servlet manager to
load the servlet classes and then create an instance for each alias.
After the servlet manager loads a servlets classes, they stay in memory
until the Domino HTTP task is stopped by the console command tell
http quit or restarted by the console command tell http restart. Before
unloading a servlet, the servlet manager calls the destroy() method for
each instance of the servlet, to give it a chance to clean up resources.
A class that has been loaded by the JVM class loader remains loaded
until the HTTP task is stopped. The tell http restart command will not
unload the class.
Example properties file
Here is an example of a servlets.properties file:

# Both servlets should be loaded at startup


servlets.startup=SQLQuery MailServlet
# end of file

Example: Java servlet


This example servlet returns an HTML page that displays all the HTTP
headers that the browser sent with the servlet request.
import
import
import
import

java.util.*;
java.io.*;
javax.servlet.*;
javax.servlet.http.*;

public class ExampleServlet extends HttpServlet {


public void doGet (HttpServletRequest request,
HttpServletResponse response) throws IOException
{
response.setContentType("text/html");
ServletOutputStream out = response.getOutputStream();
out.println("<HTML><B>Headers sent with the
request:</B><BR>");

Including Java Servlets in Web Applications 12-9

Extending Applications

# Properties for the sql servlet


servlet.SQLQuery.code=sql.database.query.Servlet
servlet.SQLQuery.initArgs=cache=30
servlet.SQLQuery.extension=sql
# Properties for the mail servlet
servlet.MailServlet.initArgs=mime=enabled,smime=disabled

for (Enumeration headers = request.getHeaderNames();


headers.hasMoreElements();)
{
String headerName = (String)
headers.nextElement();
out.println("<BR>" + headerName + ": " +
request.getHeader(headerName));
}
} // end of method
} // end of class

After you compile this code, copy the ExampleServlet.class file to your
server domino\servlet directory. It does not need any special properties,
so you do not need to create a servlets.properties file. Run the servlet
from a browser by entering this URL, using the name of your server:
http://www.yourserver.com/servlet/ExampleServlet

The information in the page returned by the servlet depends on the


browser. Here is the HTML page returned for a Netscape browser:
<HTML><B>Headers received with the request:</B><BR>
<BR>ACCEPT-LANGUAGE: en
<BR>CONNECTION: Keep-Alive
<BR>ACCEPT: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, image/png, */*
<BR>USER-AGENT: Mozilla/4.05 [en] (Win95; U ;Nav)
<BR>ACCEPT-CHARSET: iso-8859-1,*,utf-8
<BR>HOST: test1

12-10 Application Development with Domino Designer

Chapter 13
Connecting to Enterprise Data
This chapter describes tools and techniques for connecting a Designer
application to enterprise data.

Accessing data in enterprise applications

Using data integration tools and services, you can create applications that
contain connectors to relational databases (such as Oracle and DB2),
Enterprise Resource Planning systems (such as SAP, PeopleSoft, and J.D.
Edwards), and transaction systems (such as CICS, IBM MQSeries, and
IMS). You can accomplish this either programmatically or with visual
tools that work with native database drivers.
The following connection solutions are available either as part of Domino
Designer or as add-on tools:

Data Connection Resource (DCR)

@DB commands

Domino Enterprise Connection Services (DECS)

LotusScript and Java classes

Domino Connectors

Lotus Enterprise Integrator (LEI)

Data Connection Resource (DCR)


A Data Connection Resource is a design element you define within
Designer to establish a data exchange between a Domino application and
an external data source. Like other design resources, you can define a
DCR and then use it in many places within an application, or use it in
another application. For example, you might establish a connection to an
13-1

Extending Applications

Incorporating back-end data into everyday business processes maximizes


the value of a Designer application. Designer includes a range of
technologies for the security and control of business processes, forms
routing, and approvals management. With enterprise integration
technologies, you can incorporate traditionally difficult-to-reach data
into your business applications.

inventory catalog stored as a table in a Microsoft Access database. You


could then use that connection in a variety of forms in your application,
or in several related applications.
DCRs provide a convenient alternative to using the DECS Administrator
that ships with the Domino server.
@DB commands
As in previous releases, you can use @DB commands and the LotusScript
Data Object (LS:DO) to exchange data with relational databases using
ODBC.
For more information on @DB commands and LS:DO, see the
Programming Guide.
Domino Enterprise Connection Services (DECS)
Domino Enterprise Connection Services (DECS) is a visual tool and high
performance server environment you can use to create Web applications
that provide live, native access to enterprise data and applications. The
visual tool includes an application wizard and online Help to assist you
to define external data source connections for example, DB2, Oracle,
Sybase, File directory, EDA/SQL, or ODBC and fields within your
application that automatically contain external connector data.
For more information on connecting to legacy databases, see the Domino
Enterprise Connection Services Users Guide.
LotusScript and Java classes
LotusScript and Java include classes for enterprise data access. Use these
classes to customize applications to incorporate information from
relational databases, transaction systems, and enterprise resource
planning (ERP) applications according to your business needs. The
Domino Server includes the Lotus Domino Connector LotusScript
extension (LSX), permitting programmatic access to Domino Connectors
from LotusScript.
For more information about the Domino Connector LSX, see the
LotusScript Extension for Domino Connectors Reference Guide.
The Domino driver for JDBC, providing standard JDBC access to data in
Domino databases, is also available from the Lotus Web site at
http://www.lotus.com. Using this driver, you can write Java applets and
applications that use JDBC to access information in Domino databases.
JDBC classes now ship with Domino in the java.sql classes. These classes
may be used when writing Java agents to access relational data via
standard JDBC drivers.
For more information on LotusScript and Java classes, see the
Programming Guide.
13-2 Application Development with Domino Designer

Domino Connectors
Domino Connectors are modules that provide native connectivity to
external, relational databases. You can access these connectors through
the forms-based development tool in DECS, or through the Domino
object classes using LotusScript or Java languages.
Additionally, Lotus supplies connectors for ERP systems. These are sold
separately. For information about these connectors, visit the IBM Web
site, http://www.ibm.com.
For more information on Domino Connectors, see the Domino Connectors
Setup Guide.

For more information on Lotus Enterprise Integrator, see the Lotus Web
site at http://www.lotus.com.

Table of connectivity solutions


This table describes some of the connectivity solutions available to you.
Connectivity solutions

Description

Domino version

DCR - Database
Connection Resource

Design element within Designer that R6 or higher


lets you define a connection to a
database for use in a form or field.

DECS - IBM Lotus


Domino Enterprise
Connection Services

Forms-based development tool.


Provides live access to enterprise
data and applications, including
relational databases, transaction
systems, and Enterprise Resource
Planning (ERP) systems.

R4.6 or higher

LS:DO - LotusScript
Data Object

Provides LotusScript access to any


ODBC-compliant data sources.

R4.0 or higher
continued

Connecting to Enterprise Data 13-3

Extending Applications

Lotus Enterprise Integrator


Lotus Enterprise Integrator(TM), a module previously called Lotus
NotesPump, extends DECS functionality beyond real-time data sources
to include support for high volume data transfer and synchronization.
Lotus Enterprise Integrator provides visual tools to manage integration
between data sources without programming, including the capability to
initiate event-driven or scheduled high volume data transfers between
Domino applications and relational databases and other enterprise
applications. Lotus Enterprise Integrator also supports programmatic
data transfers using LotusScript and Java Classes.

Connectivity solutions

Description

JDBC - Java Database


Connectivity

Provides access from Java agents to R4.6 or higher


relational data via standard JDBC
classes. A JDBC to ODBC bridge also
ships as a part of Domino.

Lotus Domino
Connector LotusScript
Classes

Unified object model with a


R4.6.3 or higher
consistent interface to
programmatically access enterprise
data and applications. These classes
can be used with LotusScript or Java.

Lotus Domino
Connectors

Modules which provide native


R4.6.3 or higher
connectivity to enterprise data
sources. These connectors can be
accessed through Domino Enterprise
Connection Services or
programmatically through Domino
classes.
Connectors to DB2, Oracle, Sybase,
Text & File based systems,
EDA/SQL, and ODBC are provided
with the Domino server. Premium
connectors to ERP applications,
Transaction Monitors, and Directory
systems are available separately.
Note that the NotesSQL driver for
ODBC access to Domino data is
available for free from the Lotus Web
site at http://www.lotus.com.

LSX - LotusScript
extensions

Create custom objects that work


R4.0 or higher
natively with Domino applications as
well as Java and OLE. Some
examples of LSXs are MQSeries, SAP,
DB2, and rich text.
The DB2 LSX provides classes for
programming directly to the DB2
client access library.

IBM Lotus Enterprise


Integrator
(Lotus Notes Pump)

Data distribution server that


R4.0 or higher
provides support for event-driven or
scheduled high-volume transfer and
data source synchronization.

IBM Lotus Domino


Connector Toolkit

Provides developers with tools and


information to build additional
Domino Connectors and Java or
LotusScript classes.

13-4 Application Development with Domino Designer

Domino version

R4.0 or higher

Overview of Data Connection Resources


Data Connection Resources (DCRs) bring the technology of Domino
Enterprise Connector Services (DECS) into Designer so that you can
define a connection to an external data source, such as a relational
database, and use the connection to link the fields in a form to fields in
the external source. DCRs are reusable in an application and can be
shared across applications. You can use DCR technology to access data in
enterprise systems and then take advantage of the power of a Domino
application to replicate, share, secure, and manage the data.
To create an external connection, you first need to install the DECS server
software on your Domino server. The client software for the application
you are connecting to such as DB2 or ODBC must also be installed
on the Domino server. You can develop an application locally, but you
will be unable to browse the external metadata when designing your
application.

To establish a connection with an external resources, follow these steps,


described in detail in the topics that follow.
1. Create a data source resource on the server that maps to the external
database you plan to access.
2. Create the DCR by identifying the type of application you are
connecting to and specifying the existing data source.
3. (Optional) Customize the DCR settings.
4. Set a database property that allows for connection to external data
sources.
5. Create fields on a form that map to fields in the external data
application using one or more DCRs.
6. Import external records to bring the existing data from an external
database into a Notes application.

Connecting to Enterprise Data 13-5

Extending Applications

Overview of creating a DCR

Establishing a data source resource for use with a DCR


Before you can create and use a Data Connection Resource, you must
first create a data source server reference to the external application
using a data source that is defined on the server. For example, to create a
data source for a Microsoft Access database on a Windows NT server,
you would use the Windows System Tools utility to specify the Microsoft
Access table as a data source and ODBC as the data driver to use for data
exchange.
If you do not have access to the server on which the external database
resides, work with your system administrator or database manager to
make sure the data source is defined.

Creating a database connection resource


A data connection resource (DCR) is a reusable connection between a
Domino application and a non-Domino database. You must have a
defined data source on the server before you can create a DCR.
To create a DCR
1. Launch Domino Designer.
2. In the Design pane, select Shared Resources - Data Connections.
Any existing data connections display in the Work pane on the right.
3. Click the New Data Connection button at the top of the Work
pane. The Data connection Properties box appears.
4. Enter a name for the connection resource.
5. (Optional) Enter an alias to use in place of the name.
6. (Optional) Enter a comment describing the connection.
7. Select the class of application you are connecting to that is, the
type of database.
8. Select the type of connection. Certain databases, such as DB2 and
Oracle, have native drivers that are listed as an available type of
connection. If a specific driver is not available, choose a generic one,
such as ODBC or OLE DB. For example, to access an MS Access
database, choose OLE DB as the connection type.
9. Enter the username and password you use to access the system you
are connecting to.
10. Enter the name of the data source that maps to the external
application you plan to access. Depending on the type of database
you are connecting to, you may have to supply specific connectivity
information such as a server name, a host string, or a catalog.

13-6 Application Development with Domino Designer

11. Select the type of object to connect to: table, view, or procedure.
12. Enter the User ID for the owner of the table or view. The owner is the
creator of the database you are connecting to. The owner must
supply you with the correct owner ID, which is typically in the
format ownername.tablename. In the case of a procedure, you must
also enter the procedure name for any of the document events that
will trigger the procedure.
13. Enter the name of the table, view, or procedure. You can click the
Browse Metadata button to browse the external database for the
name of the table, view, or procedure.
14. (Optional) Click the Options tab to customize the settings for the
DCR.

Specifying options for the data connection resource

To open the Data Connection Resource properties box, choose Design Design Properties.
Maximum number of concurrent connections
Set the maximum number of concurrent connections for the data
connection. The default is one.
Block key field updates
This option is checked by default to prevent the value of a key field from
changing. Key fields are used in back-end lookups.
Only update changed fields
This option prevents any updates to fields in the external data source
unless the corresponding fields in the Notes document have been edited.
Use this option if you have triggers in the external system that monitor
updates to individual columns of a table.
Enable conflict detection
This option ensures that the external data has not changed since the
Notes document was opened. If it has changed, an update to the external
data source will fail.
If this option is enabled and if you make changes to data in a Notes
document and then save the document, you must exit the document
before making any more changes even though you have saved the
document.
Connecting to Enterprise Data 13-7

Extending Applications

Once you have defined the basics of the data connection resource, you
can customize the resource with some optional information. The
following options are available on the Options tab of the Data
Connection Resource Properties box and apply to all types of data
connections.

Note When using an HTTP Server to access documents, Conflict


Detection is not supported.
Space trimming
Specify whether to trim trailing spaces only on non-key fields or not at
all.
Action on data mismatch
Specify what should happen when an error occurs. You can choose to
return the error information, allow for a loss of precision, or allow for
data to be truncated. The option you choose depends on the type of data
being transmitted. For example, you might be willing to accept a loss of
precision on numeric data in cases where your source application
supports a higher degree of precision than the target Notes field. If you
are dealing with long text strings, you might choose to truncate data
where the two fields allow for different string lengths. Note that
choosing data truncation might result in a loss of precision for numeric
data. In cases where the complete integrity of the data is essential, you
would opt for returning the error information. Note that data truncation
is never an option for key fields, as that would prevent the application
from working successfully.
Action on missing record
When a record you request is missing, you can set this option to return
the error message, ignore the error and continue the data retrieval, or
create an external record. For example, if the external table somehow gets
out of synchronization and the DB2 row corresponding to a document is
missing, this option would create the external record in DB2, allowing
the document stub to still be used. Otherwise, an error message is
returned, and the stub document cannot be opened or used.

13-8 Application Development with Domino Designer

Custom settings for specific applications


In addition to the general options listed above, some applications have
additional custom settings.
Usage

DB2

Data
journaling

Select this option to enable SQL querying for a


non-journaled data source. When the data source
is non-journaled data for example, an IBM
eServer iSeries database without journaling SQL
queries are not supported unless this option is
selected. This option sets the access mode to read
only (transaction isolation level of uncommitted
read), which enables SQL queries. The default
access level is read-write (transaction isolation
level of committed read).

ODBC

Single
threading

Some ODBC drivers do not support multithreaded


execution. When using such drivers, setting the
Single Threaded option will protect the driver
from multithreaded execution. Intersolv ODBC
drivers release 3.01 and above are multithreaded.
If erratic or unexplained behavior occurs,
particularly at times of high application traffic, set
this option to single threading and restart the
activity.

OLE DB

Provider

The programmatic ID for the OLE DB provider to


use.

OLE DB

Provider string The required provider string values. This field


maps to the OLE DB
DBPROP_INIT_PROVIDERSTRING property.

OLE DB

Authentication The name of any authentication server used by the


provider. This field maps to the
service
OLEDBDBPROP_AUTH_INTEGRATED property.

Enabling connections to external databases


In order to establish a connection to an external data source, you must
first enable external connections for the database. Once that database
property is set, you can then use your data connection resource (DCR) in
a form to exchange data with an external database.
1. Open the database where you plan to use a data connection and
choose File - Database - Properties.
2. Click the Database Basics tab.

Connecting to Enterprise Data 13-9

Extending Applications

Application Setting

3. Select Allow connections to external databases using DCRs. This


property is disabled until you have created at least one DCR in the
database.
Note You may want to disable this while you are designing an
application, and enable it when you are ready to deploy your
application. You must also disable this option when you import
existing records from an external database into your application.
4. Close and reopen the database to enable the property.

Using a data connection resource on a form


In order to establish a connection to an external data source, you must
first enable external connections for the database. Then you define a data
connection resource (DCR). To use this resource to establish a link
between Notes and an external application, you use the DCR in a form.
You define fields on the form that map to the data you are retrieving
from the external application. When you define a field, you mark it as an
external data source and associate it with the DCR.
To specify a default data connection for a form
If you are planning to use a DCR in more than one field on a form, you
can specify a default data connection, and, optionally, a default metadata
object such as a table or view. When you create a field for use with an
external data source, the default information for the data connection is
supplied automatically. You can overwrite the default DCR with a
different DCR if you wish.
1. Create or open a form.
2. Choose Design - Form Properties to display the properties box.
3. Click the Defaults tab.
4. In the Data Source Options section, you can browse for a data
connection resource or enter the name in the Default Data
Connection field.
5. (Optional) Specify a Default metadata object, such as a table or
view name, from the external application.
To create fields for connecting with external data
1. Select the field you want to associate with an external data source.
2. Choose Design - Field Properties to display the Field Properties box.
3. Click the Info tab and select External data source.
If you have specified a default DCR for the form, the information is
applied to the field.

13-10 Application Development with Domino Designer

4. In the Data Source Options section, browse for or enter the name
for the metadata object name and the corresponding external field.
Note that if you are developing an application locally, you will not
be able to browse external metadata. The type of field in the
metadata for example text or integer is indicated by an icon.
5. Specify an existing data connection resource.
6. Check Key field if this field corresponds to a field in the external
application that you want to designate as the key field. Every data
connection requires a key field the key field is the link between the
form and the back-end database or application. Note that key fields
are always stored locally as well as on the back-end.

Importing data from an external database into an application


When you create a DCR and use it with fields that connect to an external
database, you can create new database records from within your
Designer application. In order to display existing records from the
external database in your Designer application, you must import the
records into your database. Before you begin you must already have at
least one DCR and at least one associated form with fields that connect to
an external database.
1. Follow the steps to create a database connection resource and
associate it with a form containing external fields.
2. Choose File - Database - Properties.
3. Click the Database Basics tab.
4. Make sure that Allow connections to external databases using
DCRs is NOT checked.
5. Close and reopen the database.
6. Select Data Connections in the Shared Resources list in the
Bookmarks pane.
7. Select the DCR that describes the records you want to import and
click the Export internal records button.
Designer displays a list of forms associated with the selected DCR.
Connecting to Enterprise Data 13-11

Extending Applications

7. (Optional) If you want data from fields other than the key field
stored locally, mark each of these fields as a Data field and select the
Store locally option. For these fields, data will be stored in the
Domino database as well as in the back end database. Changes you
make in the Domino database are pushed back to the back end
database. If the back end changes, you can manually refresh the
Domino database by pressing F9 with the document open or by
closing and opening the document.

8. Select the form that describes the records you want to import and
click OK.
A DECS Administrator dialog box asks you to confirm your request
to create documents based on that form using the specified key field.
9. Click Yes to create the documents.
A dialog confirms the number of documents imported into the
database. To view the documents, open the database in the Notes
client.
Note Before you add or edit records, you must enable the Allow
connections to external databases using DCRs database property.
For more information on creating a DCR, see Creating a database
connection resource and Using a data connection resource on a form.
Example: Using a data connection resource
In this example, a data connection resource allows users to view and edit
information stored in a Microsoft Access database from a Notes database.
A database named Show Dogs contains a collection of information
related to show dogs. A data source named Dogs on the server where
the Access database resides specifies ODBC as the data driver to use with
the Show Dogs database.
In the Notes database, showdogs.nsf, a DCR named Canines
establishes a connection to a table named Canines in the Access
database.
The following form shows the fields used to add records about the show
dogs to the Access database.

13-12 Application Development with Domino Designer

The ID field on the form is associated with the ID field in the Access
database. The Field properties box shows the settings that specify the
data connection resource, the table name, the field name, and the
designation of the field as a Key field.

Using ODBC to access relational databases


You can use the ODBC (Open Database Connectivity) Version 2.0
standard to access relational databases such as DB2 or Oracle. Using
formulas or scripts embedded in Domino objects, you can integrate the
data from many external databases into Domino applications. For
example, a customer call-tracking application accessed via the Notes
client or Web browser can access customer financial data from an
ODBC-compliant relational database management system. ODBC is
available on Windows, AIX, HP-UX, OS/2, and the Mac PowerPC.
For more information on ODBC, see the Programming Guide.
Connecting to Enterprise Data 13-13

Extending Applications

All of the values for ID will be stored locally in the NSF file. When users
create documents from this form, the values are pushed to the Access
database. A sample view of the documents looks like this:

Files required to use ODBC


When you install Designer, ODBC modules that support external data
access install automatically.
In addition to these modules, you need an ODBC library (or shared
object) and a driver for the type of database you want to access. You
purchase and install the library and driver separately. For Windows 95,
for example, you need these modules on your workstation:

The ODBC 2.0 interface, available from Microsoft.


The interface defines the library of ODBC functions that perform the
connection, query, and data-retrieval processes.

The Driver Manager, available from Microsoft and other vendors.


The manager loads the necessary drivers used to access the data and
acts as an interface between Domino and the drivers.

The ODBC drivers, available from vendors or available for no charge


to Notes and Domino users on the Lotus Web site,
http://www.lotus.com.
These handle communication between the Driver Manager and the
databases. Domino supports a variety of drivers. Each driver affects
the specific capabilities of your application and comes with its own
installation, configuration, and Help documentation.
Note Do not mix 32-bit and 16-bit versions of drivers, driver
managers and Domino. When using 32-bit Notes clients or servers,
use a 32-bit driver manager and 32-bit drivers. When using a 16-bit
Notes client or Domino server, use a 16-bit driver manager and 16-bit
drivers to use ODBC to make successful connections.
Some Lotus applications include ODBC drivers that are licensed
specifically for use with that application. Domino cannot use these
drivers. If you try to use these drivers, a message appears stating that
you must have a license. You may be given a phone number or other
information.

For more information about ODBC, see the Microsoft ODBC 2.0
Programmers Reference and SDK Guide published by Microsoft Press.

Registering data sources for ODBC


Before your Designer application can access data in a relational database,
you must register a data source that tells the ODBC driver manager how to
locate the data. Registering a data source ties a specific ODBC driver with
the data to be accessed. The registration information includes the data you
want to access, its associated server or directory, the back-end DBMS, and
the network platform. To register this information in a registration file
13-14 Application Development with Domino Designer

(ODBC.INI in Windows 95), you use the Windows Control Panel, a utility
such as the Windows ODBC Administrator Utility, or a script or formula.
To register a data source for ODBC in Windows
You can use the operating system to register a data source for ODBC.
Using the operating system allows you to register the data source
hardware, software, and database type.
Use the following steps to register a data source in Windows 2000. Other
operating systems may require slightly different steps.
1. From the Start menu, choose Settings - Control Panel Administrative Tools - Data Sources (ODBC).
2. Click Add.
3. Select the driver you want, and click OK.
4. Enter the data source name, description, and requested information.

6. Click Close.

Setting up a view for ODBC access


You may use a view to display records from a data source that you
access using ODBC. On the Advanced tab of the Views properties box,
you can enable the option For ODBC Access: Generate unique keys in
index. This option, in conjunction with a database command such as the
NotesSQL DISTINCT clause, suppresses the display of duplicate records
so that only unique records display in the view.
For example, suppose you request the following records from a relational
database:
Record 1
Record 2

Red
Yellow

Green
White

Blue
Black

Record 3

Red

Green

Blue

If the property to generate unique keys in index is enabled, the following


records will display in the view:
Column 1
Red

Column 2
Green

Column 3
Blue

Yellow

White

Black

Record 3 does not display because it does not contain unique data.

Connecting to Enterprise Data 13-15

Extending Applications

5. Some drivers require additional information; enter any other


information necessary and click OK.

For more information on using this option with the NotesSQL DISTINCT
clause, see the product documentation for Lotus NotesSQL on
http://www.lotus.com/ldd/doc

Writing formulas and scripts to access relational databases


The following @functions access an external database through ODBC and
return a value or list of values:

@DbColumn returns all the values in one column of a table, or all the
distinct values.

@DbLookup returns selected values in one column of a table by


matching keys.

@DbCommand passes a command to an external DBMS and returns


the result.

@DbColumn and @DbLookup can only retrieve data. They cant add,
delete, or modify data, or perform other operations. @DbCommand can
retrieve data or send other SQL statements that can change data.
LotusScript provides a wider range of capabilities including the ability to
update the external database.
For more information about accessing external databases through ODBC
and the ODBC versions of @DbColumn, @DbLookup, and
@DbCommand, see the Programming Guide.
The LotusScript Data Object (LS:DO)
This LSX-compliant module allows you to use LotusScript to write
applications that incorporate data from external non-Notes data sources.
Your script may perform the following steps:

Establish a connection with the data source.


Each connection requires the data source name. If the data source
name is not already registered, you must also provide additional
information.

Use SQL statements to send queries or other actions to the data


source.

Retrieve and use result sets.

Read, modify, or add information into relational databases.

Disconnect from the data source.

For more information on writing scripts to access external databases, see


the Programming Guide.

13-16 Application Development with Domino Designer

Chapter 14
Including OLE and ActiveX Objects in Applications
This chapter illustrates ways to design applications that use OLE and
ActiveX technology to integrate data from other applications.

Designing applications using OLE

For information on scripting OLE objects and using OLE custom controls,
see the Programming Guide.
Note Some of the OLE technologies available in Notes/Domino are
platform-dependent. Windows offers the greatest range of options for
sharing information and launching objects. Unless otherwise noted,
activities covered in this chapter apply only to Windows.
Using OLE and OLE-related tools in Designer, you can:

Link and embed objects in forms


Using object linking and embedding (OLE), you can design a form
that displays the same object in every document created from that
form. When you link an object, every document created from the
form refers to the source of the link. When you embed an object, the
object itself appears on every document created from the form.
Linking and embedding objects is supported for Notes applications
only.

Launch objects automatically


Using object linking and embedding, you can design a form that
automatically launches an embedded object or a new object created
using any OLE desktop application. The autolaunch can occur when
users create, edit, or read a document based on the form. Autolaunch
helps create a smooth workflow involving multiple applications. It
also allows users who are familiar with other products to work
within those applications without leaving the Notes application. This
autolaunch feature is not available for Web applications.
14-1

Extending Applications

Using Object Linking and Embedding (OLE) and OLE tools lets you
extend the capability of Designer. OLE technology lets you integrate data
from other applications, such as spreadsheets, graphics tools, and other
data sources, into your application.

Add custom controls to a form


If you use Notes with Windows and have OLE custom controls
installed, you can create custom control objects in documents or on
forms. An OLE custom control, also known as OCX or as ActiveX, is
a small, self-contained software module with its own data. Your
organization may create OLE custom controls from various
manufacturers and use the controls in Notes. Some OLE custom
controls may not provide online Help for their application.

Set up forms to exchange field information with other Notes


documents
You can create forms in Designer that automatically share
information with documents created in other OLE applications.
Then, when users modify the contents of a field in a Notes document,
the changes are automatically made to the corresponding fields in
the other applications document. Data exchange can occur in both
directions: users can edit fields in Notes or the other application, and
the modifications are automatically exchanged. OLE applications
must support NotesFX in order to use field exchange in Notes. Field
exchange is not available for Web applications.

Publish an action
This is the most powerful of the OLE-based tools because it is the
most flexible. You can automate complicated or repetitive tasks that
involve multiple operations across multiple applications. You design
an action using formulas or scripts, and then publish it. The action
appears on the Action menu in any Notes/FX 2.0-enabled
application. This feature is not available for Web applications.

Linking and embedding objects in forms


When you link or embed an object in a form, every document created
from the form displays the object. Whether you link or embed an object
depends on how the form will be used.
Linking maintains the object in the source application and displays the
object in the host application, which in this case is the Notes form. For
example, a form might contain a Lotus 1-2-3 spreadsheet that you
update frequently. The advantage to linking is that you can maintain
control over the source. When you update the object in the source
application, all links to the object automatically update. The
disadvantage to linking is that all users must have access to the file
containing the object, as well as the application used to create it. In this
example, the users need the spreadsheet file and 1-2-3.
14-2 Application Development with Domino Designer

Embedding an object allows you to place the object in a form. The object
lives in the form, and users can modify and update the object from the
form. For example, if you embed a graphic in a form, users need a
compatible version of the source application to view the graphic.
Designer access is required to modify the graphic.
OLE and LotusScript
To build on the power of OLE, use LotusScript to create or enhance
workflow applications. You can use LotusScript to create, manage, and
update objects within Notes documents.
For more information on using LotusScript with OLE objects, see the
Programming Guide.
To link an object in a form
To link to an object, it must already exist in the source application.

2. Copy the data in the application to the Clipboard.


3. Open the form in Designer, click where you want the object to
appear, and choose Edit - Paste Special. Then choose Paste Link to
Source and click OK.
4. Save and close the form.
To embed an object in a form
You can create an embedded object from within Designer.
1. Click where you want the object to appear on the form, and then
choose Create - Object. Designer lists the available applications that
support OLE under Object type.
2. Choose an application. Designer will launch the application
in-place by default if the application supports this; otherwise,
Designer will open the application.
3. Create data in the application.
4. If you are using in-place editing, click outside the OLE application
to return the focus to Designer.
If Designer originally opened the application, exit the application.
5. Save and close the form.
For more information on creating and editing objects, see Notes Client
Help.

Including OLE and ActiveX Objects in Applications 14-3

Extending Applications

1. Use a source application that supports object linking and embedding


(OLE) to create an object.

Adding OLE custom controls to a form


An OLE custom control, also known as OCX or as ActiveX, is a small,
self-contained software module with its own data. You can add a custom
control to a form to make the control available in documents created
from the form. After inserting the control, you can edit properties that
control its display.
To create an OLE custom control object
1. In a rich text field or on a form, choose Create - Object.
2. Do one of the following:
Select Create new Object. In the Object type list, choose a
custom control. The custom controls have starburst icons next to
them.
Select Create new Control. In the Object type list, choose a
custom control.
3. Click OK.
Notice after you embed a custom control that the properties for the
control appear below in the Programmers pane. By default these
properties are listed alphabetically. The number of properties
available depends on what the specific control supports. Some
controls will support dozens of properties, others just a few. You will
always see at least the standard eight Notes properties while in a
form.
Tip Use the Remove Control from List and Add Control to List
buttons to maintain the list of custom controls that display in the Object
type box.
Note Some custom controls do not display in the Create Object dialog
box. You cannot use this method to insert these controls. Instead, use
LotusScript to insert them because these types of controls do not support
a user interface and are only programmable.
To access an existing control, select it.
When a custom control is active, the Help menu is a combination of
Designer (File and Applet) and the custom control. The control may
include one menu item for itself for example, Spreadsheet for a
spreadsheet control and Help. The controls Help is substituted for
Designer Help.

14-4 Application Development with Domino Designer

Use the Applet menu choice to:

Copy and cut the entire object. (Use the Edit menu to copy and cut
selected text in the object.)

Access Notes properties for the control, including the name of the
control.

Access the controls own properties.

Set the controls mode.

Freeze and unfreeze the controls events.

If a control is active when you embed it in a form, a list of properties and


event appears in the Info List of the Programmers pane. You can attach
scripts to these events.
For information on attaching scripts to a custom control, see the
Programming Guide.

Sometimes when embedding an OLE object or ActiveX control you might


receive the following error:
An error has occurred while processing a request on an
object

This error message might mean one of the following:

You are trying to embed an ActiveX control which does not support
being inserted manually (the control can only be embedded
programmatically). Check the Windows registry to see if the control
supports being inserted (embedded); if the control is listed under the
\\HKey_classes_root, verify that the Insertable key appears under
the controls name.

You are trying to embed an OLE object or ActiveX control which has
not been installed correctly or the Windows registry contains
conflicting information about the OLE object or ActiveX control.
Reinstall the OLE object or ActiveX control to resolve the issue.

You may have multiple versions of Notes installed. For OLE to work
properly, the Windows registry must be accurate. Make sure you are
using the most recently installed version of Notes.

Your system is low on memory. Close your applications and restart


your computer.

Including OLE and ActiveX Objects in Applications 14-5

Extending Applications

Troubleshooting tips for OLE and ActiveX objects

Modifying a form to size an embedded object


If an objects server application supports OLE2 in-place editing,
Designer can expand the object when you edit it so that you can edit the
object directly from the form or page. You can edit the property for the
OLE object using either the Object Properties box, or using the property
sheet in the Programmers pane.
To edit the OLE object using the properties box
1. With the form in Edit mode, click the object.
2. Choose Edit - Properties or select the dynamic menu presented for
the OLE application. For example, clicking a Lotus 1-2-3 object adds
the menu choice Workbook. Select Workbook, then Object
Properties.
3. In the Properties box, choose Size object to fit window. The
following occurs:
When a user uses this form to create a document, the user must
double-click the object to display it in the full application window.
If the document contains information below the object, the user
will not be able to see that information.
4. Close the Properties box.
5. Save and close the form.
To edit the OLE object using the properties in the programmer's
pane
1. With the form in Edit mode, click the object.
Properties for the OLE application display in the Programmers
pane.
2. Highlight (SizeToWindow) and double-click the value to toggle it
from FALSE to TRUE. Click outside the Programmers pane to accept
the change.
3. Save and close the form.
Note When the SizeToWindow property is set to TRUE, an OLE object
will expand to fit the entire window after a user double-clicks it. Note
that if there is information on the form other than the OLE object, it will
not display when the OLE object is expanded to fit the window.

Modifying a form so that it sizes an OLE custom control


You can edit the size properties for an OLE custom control using the
properties box for the object or by setting property values in the
Programmers pane.

14-6 Application Development with Domino Designer

To edit the OLE custom control using the properties box


1. Open the form and click the custom control.
2. Choose Applet - Object Properties.
3. Choose one of the following in the properties box:
Size object to window.
Size object below field.
4. Close the properties box.
5. Save and close the form.
To edit the OLE custom control in the Programmer's pane
1. Open the form and click the OLE custom control. Properties for the
custom control OLE application display in the Programmers pane.
2. Select SizeToWindow and double-click the value to toggle it to
TRUE.
3. Click outside the properties sheet to accept the change.

Expansion properties of OLE custom controls


When you use the form to create a document, the control expands, based
on the property you chose. Note the following:

The property you chose takes effect after you save and close the form
or document.

If you chose Size object to window, the following occurs:


When a user creates a document or opens an existing document in
Edit mode, the custom control automatically expands to fill the
entire application window.
If the document contains information below the custom control,
the user cannot view that information while the custom control is
expanded.

If you chose Size object below field, the following occurs:


When a user creates a document or opens an existing document in
Edit mode, the custom control automatically expands to fill the
area of the Notes window below the layout region. If the
document does not contain a layout region, the custom control
expands to fill the entire application window.
If the document contains information below the layout region, the
user cannot see that information while the custom control is
expanded.

Including OLE and ActiveX Objects in Applications 14-7

Extending Applications

4. Save and close the form.

If the document contains two or more layout regions, the custom


control expands below the first layout region. The user cannot see
the other layout regions.

Modifying a form to run a custom control in Read mode


This option is available only for custom controls. Some custom controls
do not render anything for display in Read mode. With this setting, you
can force the custom control to display in Read mode.
1. Open the form and click the custom control.
2. Choose Edit - Properties or Applet - Object Properties.
3. Choose Run object when reading document in the properties box.
4. Close the properties box.
5. Save and close the form.
When a user opens a document, the object automatically launches in
Read mode. The user can change the object and print the changes, but
cannot save the changes without first putting the document into Edit
mode.

Updating objects by document


You can create an object or custom control in a form and let documents
created with the form update the object or custom control. A user can
change the OLE object or custom control and save those changes with the
document. The OLE object or custom control in the form does not
overwrite the revised OLE object or custom control in the document.

To modify properties using the properties box


1. Open the form and click the object or custom control.
2. Choose Edit - Properties.
3. In the properties box, choose Update object from document.
4. Close the properties box.
5. Save and close the form.

To modify properties using the properties sheet in the


Programmer's pane
1. Open the form and click the object or custom control. The properties
for the object or control display in the Programmers pane.
2. Select the property UpdateFromDocument and double-click to toggle
the value to TRUE.
3. Save and close the form.
14-8 Application Development with Domino Designer

Launching objects automatically


You can have a form automatically launch (autolaunch) an embedded
OLE object or a new OLE object when a user creates a document or opens
one for reading or editing. A new OLE object is one that is blank until
users add data.
Note Autolaunching is not supported with custom controls (ActiveX
controls) or for Web applications.
The user can change the embedded object and add data to a new object
directly in the application that created the object. The Notes document
automatically displays the changes.
When you design a form that autolaunches an embedded object, the
object must be the first OLE object in the form. To autolaunch other
objects embedded in the form, you must write a script. Users can launch
embedded objects manually, except in documents that open as modal
dialog boxes.

The following are ways to launch OLE objects:


Launch an object automatically
The object can be a spreadsheet, a word-processing document, a graphic
presentation, a database, or a multimedia object. You can autolaunch
objects created in any registered OLE application.
Launch a new object automatically
A new object is blank until users add data. You can autolaunch a new
object in any registered OLE application.
Launch an object in-place or out-of-place
The object launches in-place if it launches within the Notes document.
The object launches out-of-place if it launches in the application that
created it.
Define the conditions under which objects are launched
The object launches only when it is created or when it is opened in Read
or Edit mode.

Including OLE and ActiveX Objects in Applications 14-9

Extending Applications

If you create an object in a rich text field on a form, when users create a
document, the object launches. If you dont create the object in a rich text
field, when users create a document, Notes launches the first object that
appears in the form. When users subsequently open the document for
reading or editing, the first object in the document launches.

Use the form open in a modal dialog box to create documents


The object launches into a modal dialog box that the designer uses to
specify actions users can take with the object.
Hide the Notes document
You can hide the Notes document when the object is launched or when
the launched object is closed.
Hide the original embedded object in documents
You can hide the original embedded object and display only the most
recent, updated version of the object in a document.

Designing forms that launch objects automatically


You can create forms that automatically launch an embedded object
when a document is created. The object can be either:

An existing embedded object, that is stored and launched from a rich


text field

A new object that is created and then stored in a rich text field.

When an object is autolaunched, modified by the user, and saved, it is


displayed in the document in the field you specify in the Create object
in field box. You can specify First Rich Text Field to display the saved
object in the first rich text field in the document.
To display the current representation of an existing object in the
document, store the form with the document. This causes updates to the
object to replace the original embedded object in the document. Be
aware, however, that storing the form with the document uses a large
amount of disk space and processing time.
Objects and full text search
Full text searches can include embedded objects and attachments. When
a full text search finds a match in an embedded object or attachment, the
object or attachment opens, but the matching word or phrase does not
appear highlighted.
Nested objects
If the OLE server application is also a client application, an object in a
Notes document may have other objects within it. In this case, when an
object is updated, the object in the Notes document reflects the changes
even if they were made in an other application.
When an object that contains other objects is autolaunched, only the
application that created the object embedded in the Notes document is
launched.
14-10 Application Development with Domino Designer

To design a form that launches an existing object


1. Open the form containing the embedded object you want to launch
automatically.
2. Choose Design - Form Properties.
3. Click the Launch tab.
4. Select First OLE object in the Auto Launch box.
5. (Optional) To create the object in a rich text field, do the following:
Position the insertion point where you want to create a field to
display the object, and choose Create - Field.
Enter a name for the field.
Select Rich Text in the Type box.
Select Form in the Properties for drop-down list.
Click the Launch tab.

Select None if you do not want to display a current


representation of the object in documents.
6. (Optional) To store the form with the document choose Design Form Properties, then click the Defaults tab, and select Store form in
document.
7. Close and save the form.
Examples: Designing a form that launches an object automatically
You need a Spring product line database that sales representatives use to
create custom presentations from a standard set of slides. You plan to use
IBM Lotus Freelance Graphics . Create a Sales Presentation form and
embed a Freelance Presentation file containing the standard slide
presentation. Specify the Freelance Presentation object to autolaunch
only when a document containing it is created.
When you use the Sales Presentation form to create a document,
Freelance Graphics launches and you save the object without modifying
it. Then use the name Standard Presentation to save the Notes
document. You now have a document stored in the database and
accessible by sales representatives all over the world, containing
standard slides for a sales presentation.
Sales representatives who want to modify the presentation use the Sales
Presentation form to create a new document. The Freelance Graphics
object launches automatically, and the sales representatives can
customize the slide presentation. They then save the object, and specify a
Including OLE and ActiveX Objects in Applications 14-11

Extending Applications

Select the name of the rich text field in the Create object in field
box or choose First Rich Text Field.

new name when they save the Notes document containing it. Their
custom version of the slide presentation is now in the database, where
other sales representatives can access it.

Launching an object "in-place" or "out-of-place"


By default, objects are launched in-place, so that the object can be
edited right in Notes. If the object does not support in-place editing,
then the object will be launched out-of-place, so that focus shifts to the
application used to create the object and Notes goes into the background.
Only applications that support OLE2 can launch objects in-place.
Applications that support OLE1 always launch out-of-place, regardless
of the Launch in place property.
Objects that are embedded in the form as icons always launch
out-of-place.
Note

Autolaunching is not supported on the Macintosh.

1. Open the form containing the object.


2. Choose Design - Form Properties.
3. Click the Launch tab.
4. Select Launch in place, or deselect it to launch out-of-place.
5. Close and save the form.

Specifying the event that causes an object to autolaunch


You can design a form so that an object autolaunches when a user
creates, edits, and/or reads the document. A new object autolaunches
when a user creates a document. By default, existing objects autolaunch
each time a user reads or edits a document containing an object.
Autolaunching new objects
You can control whether the object in the first rich text field in a form
autolaunches when a document is created, edited, or opened. If the form
youre designing autolaunches a new object, make sure the Launch
when setting includes Creating, because this is the only event that
launches a new object. After the user creates the document, the new
object is saved with the document. Other Launch when settings, such
as Reading or Editing, take effect when a user subsequently opens
the document.

14-12 Application Development with Domino Designer

Making settings compatible


If you set the form to Automatically enable Edit mode (on the Form
Defaults tab of the Form Properties box), make sure the Launch when
settings are compatible. For example, if you design the form so that the
object launches only when users open the document in Read mode and
you set the document to enable Edit mode automatically, the document
always opens in Edit mode and the object never autolaunches.

To specify the event for autolaunching


1. Open the form containing the object.
2. Choose Design - Form Properties.
3. Click the Launch tab.
4. Select Creating, Editing, and/or Reading in the Launch when box.
5. Close and save the form.

When a user uses the form to create a document, the 1-2-3 object
autolaunches so the user enters the information in 1-2-3. The user closes
and saves the 1-2-3 object, and then closes and saves the new document.
When people read the document, the 1-2-3 object is visible in the rich text
field, but the object does not autolaunch. To edit the object, the user opens
the document in Edit mode and double-clicks the object to launch it.

Designing a form that launches an object from modal dialog boxes


You can design the form that launches an object to open as a dialog box.
When users create or open a document that opens in a dialog box, they
cannot access Notes menus. Instead, users can:

Enter or modify data.

Launch the first embedded OLE object by clicking a Launch button


on the dialog box.

Choose a command from the Action menu at the bottom of the


dialog box.

Including OLE and ActiveX Objects in Applications 14-13

Extending Applications

Examples of specifying the event for autolaunching


Design a form to distribute financial information contained in a 1-2-3
object. In the form, you embed a 1-2-3 object that is a template for
entering financial information. Create a rich text field in the form, and
specify that the field display the object. Also specify that the object
autolaunch only when a user uses the form to create a document.

To set objects to open as a dialog box


1. Open the form.
2. Choose Design - Form Properties.
3. Click the Launch tab.
4. Select First OLE object or a server application from the Auto
Launch drop-down list.
The list includes all registered OLE server applications on your hard
drive as well as First OLE object to launch the first OLE object on
your form. You cannot design the form to open as a dialog box if you
select the First Attachment, First URL or First Document Link
objects.
5. Select Present document as modal dialog.
6. Close and save the form.
Tip The Hide-When section allows you to decide when to show the
modal dialog. You have six options to hide the modal dialog: Opening
create, Opening edit, Opening read, Closing Create, Closing
edit, and Closing read.
For more information about showing form actions, see the chapter
Adding Automation to Applications.

Designing a form to hide the Notes document


To allow users to move seamlessly from the Notes view level to an
autolaunched application and back again, design a form to hide the
Notes document.

When you can hide the Notes document


You can design a form to hide the Notes document when users:

Create a document (Opening Create).

Open a document to edit it (Opening Edit).

Open a document to read it (Opening Read).

Close a document after creating it (Closing Create). This option is


available only if Opening Create is selected.

Close a document after editing it (Closing Edit). This option is


available only if Opening Edit is selected.

Close a document after reading it (Closing Read). This option is


available only if Opening Read is selected.

14-14 Application Development with Domino Designer

Mixing Hide/Show options


You can also design a form that hides the Notes document in some
circumstances and shows it in others. Use this type of form when
document creators, editors, and readers play different roles in
maintaining the information in the Notes database.
Hide Notes documents when:
The main focus of the document is the object, and users dont need to
fill in anything else.

The form contains only one object.

Users arent familiar with Notes and want to work in a familiar


application.

The Notes database is functioning solely as a container system for


other application files.

All users have access to and can launch the other application and
always work in that application.

Show Notes documents when:

Readers need to see more than the data object itself.

The form contains multiple objects.

Revising the data in the object is optional; therefore, you dont need
to launch the application every time the Notes document opens.

Users who create and edit documents need to fill in other fields on
the form.

Some users have operating systems, such as OS/2, that dont support
OLE objects, but they still need to read the information or edit other
fields in the Notes document.

To hide a Notes document


1. Open the form.
2. Choose Design - Form Properties.
3. Click the Launch tab.
4. In the Hide when list, select an option. (Click the option again to
deselect it.)
5. Close and save the form.

Including OLE and ActiveX Objects in Applications 14-15

Extending Applications

Example
You create a report-tracking database that allows users to use 1-2-3 to
create and update their own expense reports. When users create or
update expense reports, they dont need to see the Notes document;
instead, they want to autolaunch the expense report object in 1-2-3.
To design a form that mirrors your users workflow, create an Expense
Report form, embed a worksheet object in the form, and set the form
properties to automatically launch the worksheet. In the Hide when
box, select:

Opening Create

Closing Create

Opening Edit

Closing Edit.

When users choose Create - Expense Report, Notes automatically starts


1-2-3 and launches the embedded worksheet object. Users enter
information directly into the 1-2-3 worksheet object and never see the
Notes document. When users complete the expense reports and quit
1-2-3, the worksheet object embedded in the form updates, users are
returned to the view level in Notes. If users want to edit their expense
reports, they open the document in Edit mode, and 1-2-3 autolaunches.
When they close 1-2-3, users are returned to the view level of Notes.
Information from the expense report worksheet appears in the Notes
document or in the Notes view. The Notes database contains all of the
expense reports.

Hiding an embedded object in a document


You embed an object in a form for autolaunch so that users can make
modifications to the object. You then specify a rich text field to display
the latest representation of the object. If you want to display only the
latest version not the original version of the object, you must design
the form to hide the original embedded object. After the user makes
changes to the object and returns to the document, only the changed
version appears in the document.
1. Open the form containing the object.
2. Select the object you want to hide.
3. Open the objects properties box.
4. Click the Hide When tab.
5. Select one or more options for hiding the object.
6. Save and close the form.
14-16 Application Development with Domino Designer

Publishing actions
Actions allow you to integrate file creation and storage in other desktop
products with the document sharing, storage, security, and management
tools of Notes. When you publish an action, you make it available on the
Action menu in any open OLE server application. For example, you
might automate a document review process so that a Notes user opens a
document that autolaunches a Word Pro file. After editing the file, the
user clicks the Send to Next Reviewer menu choice in Word Pro, which
routes the document containing the Word Pro document to the next user.
By publishing actions, you seamlessly coordinate tasks between
applications.

For information on actions, see Overview of Automation.

When an action executes


On the Advanced (NotesFlow Publishing) tab of the Action Properties
box, you can specify what happens when an action runs. Select Close
OLE object and return to Notes to close the object, save any changes
made during the OLE session, and return to Notes. Select OLE object
remains open if you want the focus to remain with the OLE object. This
property is useful if users need to choose more than one action before
returning to Notes.
When designing actions, keep in mind the state of the application when
returning to Notes. For example, if you use the autolaunch feature with
an action, decide whether you want users to return to Notes, whether
you want the Notes window hidden, whether users are in a document or
a view, and whether the document has been saved or is new. Write
documentation or field help in the form to provide guidance to users.

Including OLE and ActiveX Objects in Applications 14-17

Extending Applications

From a designers point of view, publishing actions expands the scope of


what you can do with a flow of work and enhances your ability to
control that flow. Teamed with autolaunching, publishing actions allows
you to focus or limit user-access to commands, thereby controlling the
flow of work. By simplifying and automating multistep tasks, you
improve the security of your system and reduce the chance of user error.
Actions can incorporate functions, @commands, and LotusScript. Notes
also supplies a number of simple actions, such as Move to Folder, which
allow you to incorporate useful actions in your form design without
programming in LotusScript.

"Bring document window to front" property


On the Advanced (NotesFlow Publishing) tab of the Action Properties
box, choose the property Bring document window to front if you want
the focus to return to Notes without closing the OLE object. By shifting
the focus back to Notes, you provide the opportunity for user-input in
Notes. When you use this property, remember that the OLE object has
not been saved, unless you explicitly saved the object as part of the
action. Therefore, you may have to provide a way for users to return to
the object to save it.
Note The Bring document window to front property applies only
when the document window in Notes has not been hidden.

To publish an action
1. Open the form.
2. Choose View - Action pane to display the Action pane.
3. Double-click the action you want to publish.
4. Choose Design - Action Properties.
5. Click the Advanced tab.
6. Select Publish Action with OLE object.
7. Select a property that controls what happens after a user chooses an
action.
8. (Optional) Select Bring document window to front to change the
default setting.
9. Close and save the form.
For information about creating an action, see Adding Automation to
Applications.
Note If actions do not get published even after you select Publish
action with OLE object, make sure Notes/FX 2.0 is enabled. Choose
Design - Form Properties and click the Defaults tab. The Disable Field
Exchange check box should be deselected.
Examples
A Word Pro document needs to be routed for approval. The Notes form
you create has an embedded Word Pro document set to autolaunch when
edited and an action called Send to Next Reviewer. When a user opens
the Notes document in Edit mode, the Word Pro document automatically
launches. After reviewing the Word Pro document, the user selects the
Send to Next Reviewer action from the Action menu. This action sends
the Notes document to the next reviewer and closes the object.

14-18 Application Development with Domino Designer

To provide other routing options, you can add the actions Ready for
Next Reviewer, Return to Previous Reviewer, and Archive
Document to the Notes form.

Exchanging data using Notes/FX


Notes/FX is supported only for Notes applications. Using Notes/FX, you
can design forms so that field contents in an OLE server application file
automatically appear in corresponding fields in a Notes document, and
vice-versa. Depending on the type of field, you can update the contents
from Notes or from the other OLE application.
To exchange data, there must be a one-to-one correspondence between
the shared fields. Both the OLE server application file and the Notes form
must contain the same shared fields. A Notes/FX field can be:
One-way

Two-way

User-defined

One-way fields
One-way fields provide information for exchange in only one direction.
These fields supply information about a file for example, file size and
creation date. One-way fields exist by default in the OLE server
application; you must create the corresponding fields in your Notes form.
For example, Word Pro documents have a field called SizeInK, which
contains the size of the Word Pro document in kilobytes. To exchange the
data in this field with a field in a Notes form, create a field named
SizeInK in the Notes form. After you set up field exchange, changes to
the Word Pro field appear in the Notes field; however, changes made to
the Notes field do not affect the Word Pro field.
Two-way fields
Two-way fields provide information for exchange in two directions
that is, from Notes to the OLE application and from the OLE application
to Notes. When you change the contents of the field in either application,
both fields update. Fields defined as two-way exist by default in many
OLE server application files; therefore you must create corresponding
fields in your Notes form.
For example, the Document Description field in a Word Pro document
corresponds to the Subject field in a Notes document. After you set up
field exchange, changes to one field automatically appear in the other
field. The fields must have the same name.
Including OLE and ActiveX Objects in Applications 14-19

Extending Applications

User-defined fields
These fields exchange data in two directions, but you must create these
pairs of fields, since they do not exist by default in the OLE server
application file or in Notes. User-defined fields usually exchange
working data, such as text or numbers.
For more information about fields in OLE server applications that
exchange data with Notes, see the documentation for the OLE server
application.

Preparing a form to exchange data


Data is exchanged on a field-by-field basis. Every Notes/FX 2.0 field in a
Designer form must have a corresponding field with the same name in
the other application file.
Table of one-way and two-way field exchange
The following table lists one-way and two-way fields found in most
Lotus applications. For a complete list, see the documentation for the
application.
Field name

Data type

Contents

LastRevisionDate

Time

Date and time the file was last revised

NumberOfEdits

Number

Total number of revisions to a file

EditingTime

Number

Total time the file was open

SizeInPages

Number

Number of pages in the file

SizeInK

Number

Size of the embedded object in kilobytes

DocumentClass

Text

OLE class name of the application


embedded in Notes

Subject

Text

Description of the document

Categories

Text (allow
Keywords that Notes uses to categorize
multi-values) documents

Note If you are using a form copied from a Designer template, fields
may already be set up for field exchange.

To enable field exchange


1. Open the form and choose Design - Form Properties.
2. Click the Defaults tab.
3. Make sure Disable Field Exchange is deselected.
4. Close and save the form.
14-20 Application Development with Domino Designer

Note You can disable Notes/FX 2.0 field exchange without removing
the Notes/FX fields from the form by checking the Disable Field
Exchange property.

To set up field exchange


1. Open the application file.
2. Write down the name of each field you want to exchange and close
the application.
3. In Designer, open the form you want to prepare for Notes/FX field
exchange.
4. Embed the object containing the fields you want to exchange.
5. Choose Create - Field.
6. Give the field the same name as the corresponding field in the other
application.
7. Close and save the form.

You create a form to file and distribute trip reports. The reports contain
descriptions of the important business aspects of the trip, as well as the
total expenses. You record expenses in a Lotus 1-2-3 expense report
template. You want the total expenses of the trip to appear automatically
in the Notes document.
In the 1-2-3 template, create an expense report. In one cell enter
Total_Exp. Now create a range name for this cell and name it Total_Exp.
Because this is a custom Notes/FX field, you need to tell 1-2-3 to use this
range name for Notes/FX. Select File - Workbook Properties and then
select the Notes/FX Fields tab. Select the New Field button and then
select the range name Total_Exp. Click OK twice. The row below the cell
entitled Total_Exp will hold the actual data that is exchanged between
Notes and 1-2-3. Save and close this 1-2-3 Workbook.
In Designer, create a form called Trip Report and embed the recently
created 1-2-3 expense report. The Trip Report form contains text fields
for entering information about the trip. At the bottom of the form, use the
text The total expenses for the trip were: to label a field area and create
a numeric field named Total_Exp which corresponds with the field
name in the 1-2-3 expense report template.

Including OLE and ActiveX Objects in Applications 14-21

Extending Applications

Example of exchanging data for an expense form

When users use the form Trip Report to create reports and activate the
123 object to enter expenses, the total expenses are automatically inserted
back in the Trip report document.

14-22 Application Development with Domino Designer

Chapter 15
Including XML and Viewing DXL in Designer
Applications
This chapter describes using XML to tag data in a Designer application
and to exchange data between applications. It also describes how to
export design element as XML and how to transform design elements to
XML using an XML style sheet, or XSL. For additional information on
using XML in Domino applications, see the Programmers Guide.

Extensible Markup Language (XML) is a standard for creating markup


languages that describe the structure and meaning of data in a
document. XML separates the content of a document from its
presentation and provides a common format for transferring data across
the World Wide Web (WWW) or company intranet. The result is a
technology that makes data available regardless of the proprietary
systems involved.
How XML works
XML isnt a markup language itself, but a set of rules that enables you to
create tags as you need them. In XML, a document is broken into parts
and each part is separate. The way a document looks is determined by a
style sheet, the content of a document is contained in a separate file, and
the definitions of the tags are stored in another file called a Document
Type Definition (DTD). Using a common data format and separating
data from its formatting and its tag definitions makes the data readily
accessible and reusable. Data from one application can be used in
another application by changing the DTD or style sheet. The style sheets
currently being used for XML are Cascading Style Sheets (CSS) and
Extensible Stylesheet Language Transformation (XSLT). CSS styles data
directly on the client, while XSLT is used to transform XML data into
HTML, or another form of XML.
XML also breaks the contents of a document down into its basic
structural elements. For example, an online book catalog contains
information about each book including the title, author, publishers list
price, retail price, sale price and ISBN number. With XML you can create
15-1

Extending Applications

What is XML?

a tag for the book itself, but you can also create tags that describe each of
its sub elements so that its possible to differentiate between data such as
the publishers list price, retail price and sale price. The ability to make
this kind of distinction between elements in a document makes it
possible for computers to process information more accurately with less
human intervention.
Server-to-server applications where information is transferred from one
system to another is just one way in which XML is making information
processing more powerful. Using XML, applications can be developed
that are fully automated. For example, a company has an application that
employees use to update their own benefits information. Using a browser
or the Notes client, employees update their benefit selections at
designated times during the year. When they have completed their
changes, a server such as Domino passes the employees information in
XML format to another server for processing. The second server runs a
Java servlet to complete the transaction by interacting with a backend
human resources application such as PeopleSoft. When the update is
complete, the server notifies Domino that the employees benefits reflect
the new selections.
The advantages of XML
The excitement surrounding XML relates to the advantages of such a
robust and flexible tool. Some of the advantages of XML are that it is:

Easy to use because it resembles HTML

Extensible, that is, you can define tags that describe your data

Nonproprietary

Perfect for large, complex documents

XML technology represents a capacity for sharing information that didnt


exist before. Virtually any kind of data can be rendered in XML,
encapsulated, moved across a network and processed automatically
between servers. Domino provides a secure environment for developing
the applications that make this kind of information sharing possible.
For information about creating XML applications, visit the Lotus Web
site at http://www.lotus.com/xml.

15-2 Application Development with Domino Designer

What is DXL?
DXL is Domino XML that is, Domino data expressed as XML
according to the tag definitions in the Domino Document Type Definition
(Domino DTD). DXL allows you to see all or part of a Domino
application as XML, much as you might view the source HTML for a
Web page. This lets you apply the advantages of the flexible XML
environment to a Domino application.

Including XML and Viewing DXL in Designer Applications 15-3

Extending Applications

For example, you can use the DXL Viewer utility to display one or more
design elements as DXL or use the DXL Exporter utility to write that
same information to a file. Once exported in this way it would be
possible to integrate all or part of your application design into other
XML-aware applications. But what if the other application has a different
definition for elements like forms and views? Thats where the DXL
Transformer becomes useful. This utility can convert the DXL
representation of Domino design elements into other XML formats using
definitions in a stylesheet (XSL). Well-formed HTML qualifies as another
XML format so the DXL transformer can function as a type of report
writer by importing design elements as DXL documents, applying an
XSL stylesheet to the design elements and reformatting the output as
HTML. For instance, one of the sample stylesheets that ships with
Designer (REPORT-AllLSinForm.xsl) searches for all the LotusScript
code contained in a form and presents it in an easy to read outline. For
example, if you select the Memo form from the Lotus Notes 6 mail
template and apply the stylesheet REPORT-AllLSinForms.xsl your
output will appear as follows:

Thus, if you need a particular design analysis not available via the
standard Design Synopsis feature, you can design your own report by
creating a new XSL stylesheet. The DXL utilities give you full control
over both the content and format of the output document.
For more information on the Domino DTD, see the Programmers Guide.

Domino applications and XML


One of the clearest benefits of XML is that because this emerging
technology builds on the standards of HTML and SGML, it represents an
evolution of data sharing rather than a revolution that requires new
hardware and software. XML marries perfectly with Domino
applications. Where XML gives the power to describe data and share it
across a network, Domino provides all of the other tools you need to
make that data sharing secure, reliable, and efficient. In addition to
providing a medium for writing and serving XML data to an XML
parser, Domino Designer also provides:

A powerful development environment including a set of


programming tools for building your collaborative e-business
applications.

Layers of security you need to protect data from database access


control down to individual field encryption.

Search capabilities for users to efficiently locate data.

Messaging for workflow operations such as order confirmation,


e-mail notification, and document review.

In addition to the development tools provided with Domino Designer,


you get the connectivity services that allow you to connect your
application with major backend systems, including:

ERP systems, such as SAP, PeopleSoft, Oracle, and JD Edwards

Relational databases, such as DB2, Sybase, and Oracle

Transactional systems, such as IBM CICS, MQ Series, WebSphere,


and BEA Tuxedo

Applications enhanced with XML


To illustrate how to integrate XML in a Designer application, consider an
online site that sells books, among other things. The XML tags that
describe data about each book are standardized tags such as <bookTitle>
and <bookAuthor>. Any application that processes data about books can
use these standard tags to describe specific data about books. The
application can interact with book vendors as well as with purchasers
using this standard data format.
15-4 Application Development with Domino Designer

Just about any application can work with XML. For example, consider an
auto supply store that maintains an e-commerce site with an online
catalog of auto parts. With XML as the common language to describe
part information, the purchasing agent can pull information from various
vendors about part pricing and availability directly into a Domino
database. Users can access this database for up-to-date information about
parts they can order online. Domino then provides all of the necessary
tools to complete secure online transactions for ordering parts and
managing inventory.

Ways to include XML in a Designer application


There are several ways you can include XML in a Designer application
and serve the data to an XML parser.
You can enter XML tags that describe data on a form or a page. By
treating the contents of the form or page as XML, you can serve the XML
to an XML parser that can interpret the tags. XML describes the data
being presented. To format and style the data on the form or page, you
can use a stylesheet, created with the Extensible Stylesheet Language
(XSL) to transform the data into HTML, or you can use a Cascading Style
Sheet (CSS) to style the XML directly on the client.
You can also generate XML data with a view by including XML tags in
column formulas. To pass the view to the server, you must embed it on a
page or view in order to wrap the whole view in the correct XML
document definition tags.
You can use agents or servlets to dynamically generate or store XML.
Agents are useful for running a scheduled process in a Domino
application. Servlets run on the server based on a request from a Web
browser.
For information about the Domino DTD and how to generate XML using
Java methods, see the Programming Guide.
Including XML and Viewing DXL in Designer Applications 15-5

Extending Applications

Another example is a human resources self-service application that


employees can use to access and manage their own personal data. For
example, the company can publish benefits information on an intranet
site and allow employees to make their benefit selections online using a
Notes client or a Web browser. After making selections, an employee
submits the data in XML format to a server such as IBMs WebSphere
Application Server. The server uses a Java servlet to pass the data along
to the HR backend system for example, a PeopleSoft database and
notifies Domino when the transaction is complete. The XML tags
describe the data being passed so that the data means the same in the
Domino application as it does in the PeopleSoft database.

XML terminology
The following is a list of important XML-related terms and definitions.
attribute: A name and its value which are included inside an XML tag.
For example, in the tag <book isbn=0-395-73679-X>, isbn is the name
and its value is 0-395-73679-X (values are enclosed in single or double
quotes).
Cascading Style Sheet (CSS): A style sheet that defines the appearance
of an XML or HTML document directly on the client.
child: An XML element located inside another XML element.
content model: In XML, the expression specifying what elements and
data are allowed within an element.
Document Type Declaration: A declaration that contains, or points to, a
Document Type Definition (DTD).
Document Type Definition (DTD): A collection of markup declarations
contained in a single, or multiple XML files, that describes an XML
documents permissible elements and structure. A DTD ensures that a
uniform structure will be used across all documents.
DTDless: Refers to an XML file with no DTD. A browser processes the
XML document structure while its reading the document because it has
no DTD to define the structure in advance.
DXL: Domino Extension Language. DXL is the representation of Domino
design elements as XML using the Domino DTD.
element: A block of text in an XML document made up of a start and end
tag, and the content between the tags. Empty tags are also elements. For
example, <price>$12.60</price> and <price/> are both elements.
encoding attribute: An attribute inside the XML declaration that
indicates the level of encoding in the document. For example, <?xml
version=1.0 encoding=UTF-8> indicates that a compressed form of
unicode will be used that assigns one byte for ascii characters, two bytes
for other common characters, and three bytes for all other characters.
Hypertext Markup Language (HTML): A markup language consisting
of predefined tags used to describe a documents structure and
appearance.
parent: An XML element which contains another XML element. The
XML element contained by the parent is the child element.
root element: The element that contains all of the other elements in an
XML document.
15-6 Application Development with Domino Designer

schema: A technology-neutral term for the definition of the structure of


an XML document.
SGML: Standard General Markup Language. A markup language which
serves as the basis for XML.
standalone attribute: An optional attribute inside an XML declaration
that indicates whether the complete XML document is contained in the
current file, or if it needs to import other files. For example, <?xml
version=1.0 standalone=yes?>.
style: Defines the characteristics of an elements appearance such as font,
boldface, italics.
stylesheet: A document specifying the style information for another
document.
valid XML: XML that meets the constraints defined by its Document
Type Declaration.

well-formed XML: An XML document is well-formed if there is one root


element, and all its child elements are nested within each other. Start tags
must have end tags, and each empty tag must be designated as such with
a trailing slash (<emptyTag/>). Also all attributes must be quoted, and
all entities must be declared.
XML: Extensible Markup Language. A standard for building markup
languages.
XML application: A markup language created with XML.
XML declaration: The processing instruction that identifies a document
as an XML document and contains the version attribute and the optional
standalone and encoding attributes. An XML declaration is the first line
in an XML document.
XSLT: Extensible Stylesheet Language Transformations. An XML
application that defines how an XML document will be transformed from
one form of XML to another. XSLT is commonly used to transform XML
data to HTML for rendering on a client.

Including XML and Viewing DXL in Designer Applications 15-7

Extending Applications

version attribute: An attribute inside the XML declaration that indicates


the version number of the XML specification a document conforms to.
For example, <?xml version=1.0?>.

Putting XML in a form or page


A form is a perfect vehicle for XML. You can enter the XML tags, and
include fields within the tags for data. The result is an XML document
with data that is meaningful when delivered to an XML parser.
You can also put XML on a page. A page in Domino Designer is a
database design element that displays information. You can use a page for
traditional application content, such as a home page, or you can use XML
tags to describe the data on a page. As you will see in the section on using
XML in a view, a page is useful for embedding a view and adding the
required XML tags to process the view. A page is also useful for creating
an extensible stylesheet (XSL) or a cascading style sheet (CSS) to direct a
server or browser on how to format data described with XML tags.
Defining data on a form with XML elements
When you use XML elements on a form or page, you must follow the rules
for constructing valid XML and you must properly format the XML tags.
XML tags look very much like HTML tags. There are some different rules
for structuring the XML tags that you must adhere to when marking up
data. For example, requirements for nesting XML are more rigid than
those for nesting HTML tags. For information on marking data with XML
tags, visit the IBM XML Web site at http://www.ibm.com/xml.
As an example of using XML on a form, the entries for each book in an
online book catalog might look like this:
<?xml version="1.0" encoding="UTF-8"?>
<BOOK>
<bookTitle>Chess for the Master</bookTitle>
<bookCategory>Games</bookCategory>
<bookAuthor>Alice B. Charles</bookAuthor>
<bookPrice>10</bookPrice>
<bookListPrice>12</bookListPrice>
<bookISBN>0-980-38475-81</bookISBN>
<bookDatePublished>April 1997</bookDatePublished>
<bookAbstract>The authority on all the latest chess
moves, including the entire Big Blue arsenal.</bookAbstract>
</BOOK>

15-8 Application Development with Domino Designer

Note XML tags are case-sensitive. The tags <book>, <Book> and
<BOOK> are all different. Opening and closing tags must match case
exactly for the XML to be well-formed.
To create documents in XML format
1. Create a new form or page.
2. Enter the document type declaration that is:
<?xml version="1.0" ?>

You can optionally add an encoding reference such as:


<?xml version="1.0" encoding="UTF-8" ?>

3. Enter the XML elements, generally a root element with sub elements.
4. Enter the fields that will hold the data you are marking with XML.
5. Choose Design - Form Properties.
6. On the Form Info tab, choose Render pass through HTML in
Notes.

7. Save and close the form.


8. To view the documents created from the form, create a view that
uses a form formula that resolves to the name of the XML form.
Formatting XML data with stylesheets
One of the attributes of XML is that it only describes data, and says
nothing about the presentation of the data. The presentation is not
important on computer-to-computer transactions it only matters if you
are presenting the data to a user for example by posting it on a Web
site. XML documents typically rely on a stylesheet to determine the
layout and presentation of the data. Some browsers provide simple
default styles for popular elements such as <Para>, <List>, and <Item>,
but generally you must use a stylesheet to describe the data format.
There are two types of stylesheets you can use with XML:

An extensible stylesheet language (XSL) describes how to transform


XML into HTML or into another version of XML.

A cascading stylesheet (CSS) styles XML directly on Web browsers


that support CSS.

To use a stylesheet, insert the stylesheet reference tag immediately after


the document type declaration and before the root element. For example:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="bookdisplay.css"?>
<BOOK>
Including XML and Viewing DXL in Designer Applications 15-9

Extending Applications

This property tells Domino to pass all of the document text to the
HTTP requester without generating HTML tags.

If you create a stylesheet on a page, set the page property to Treat page
contents as HTML.
An XSL stylesheet that transforms information on books to HTML might
look something like this:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
>
<xsl:template pattern="BOOK">
<HTML>
<HEAD>
<TITLE><xsl:value-of select="BOOKTITLE" /></TITLE>
</HEAD>
<BODY bgcolor="F0FFF8">
<B><xsl:value-of select="BOOKAUTHOR"/></B>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
<?xml:stylesheet type="text/xsl"
href="/roibooks.nsf/bookform.xsl"?>

A cascading stylesheet (CSS), instead of transforming XML into HTML,


provides instructions directly to the server regarding how to format each
XML element. A CSS for books might look like this:
BOOK {
display: block;
border: 1px solid #cccccc;
}
BOOKTITLE {
display: block;
float: left;
margin-right: 10px;
padding: 5px;
}

15-10 Application Development with Domino Designer

BOOKAUTHOR {
display: block;
font-style: italic;
}

Using a view to generate XML


Views enable you to control which documents are rendered in XML and
to track information and convert it into XML for distribution across an
intranet or the World Wide Web. You can find the view described in this
section in the ROI Books application on the Lotus Web site at
http://www.lotus.com/xml.

Mapping XML tags to a view

Example
The ROI Books application assigns each element and field in a document
to a column in the XMLView using a column formula. The column
formula for the first child element also contains the open parent tag, and
column formula for the last child element contains the close parent tag.
For example, the column formula for the first column is:
"<BOOK><BOOKTITLE>"+bookTitle+"</BOOKTITLE>"

The parent element is <BOOK>, the child element is <BOOKTITLE>, and


bookTitle is the name of the field containing the content of the
<BOOKTITLE> tag. There are more child elements within <BOOK> that
are included in this view, so the <BOOK> element is not closed until the
last child element is added. In the ROI Books application, the last child
element is assigned to the last column of the view. The formula for the
last column is:
"<BOOKPUBLISHDATE>"+bookDatePublished+"</BOOKPUBLISHDATE>
</BOOK>"

The XML View is embedded into a page that contains the XML
declaration and the root element <BOOKCATALOG>.
Including XML and Viewing DXL in Designer Applications 15-11

Extending Applications

In order to produce XML using a view, you have to map the XML tags
from your DTD to the columns in the view. Once you have created a
view and mapped the XML tags to it, you embed the view into a page. A
view embedded into a page maintains the same functionality on the Web
as a view in a Notes client application and allows you to control the size
and appearance of the view display. For views displaying XML, the page
contains the XML declaration and root element.

To map XML to a view


1. Create a view and open it.
2. Select Edit - Properties to open the View Properties box.
3. Click the Advanced tab
4. In For Web Access, select Treat view contents as HTML. Domino
generates HTML for the contents of a view if this property is not
selected. In addition, the contents of a view that is embedded into a
page are not visible if this property is not selected.
5. Click View Selection on the Objects tab and add a selection
formula to define which documents will be included in the view. For
example, an application for an online bookstore contains a view for
approved orders. Documents are selected for the view using the
following formula:
SELECT status="Approved"

6. Click Form Formula on the Objects tab and enter a formula that
selects your template form.
7. Add columns to the view.
8. Click the first column of the view.
9. Enter a column formula in the Script area using the following syntax.
<PARENT><CHILD>+fieldname+<\CHILD>
If you have more than one element for any column, add a semicolon
(;) at the end of the first column formula and add the column formula
for the next element below it.
<PARENT><CHILD>+fieldname+<\CHILD>;
<CHILD>+fieldname+<\CHILD>;
<CHILD>+fieldname+<\CHILD>
Tip Use the following syntax to make a field an attribute of an element.
<CHILD attributeName=\+fieldname+\>+fieldname2+</CHILD>

15-12 Application Development with Domino Designer

Tip Click the second column and type a column formula into the Script
area using the syntax below.
<CHILD>+fieldname+<\CHILD>
10. Repeat Step 10 for each XML element except the last one.
Tip For the last child element, the use the syntax below.
<LASTCHILD>+fieldname+<\LASTCHILD></PARENT>"
Embedding a view in a page
1. Open or create a page.
2. Select Design - Page Properties.
3. Click the Page Info tab.
4. In Web Access, select "Treat page contents as HTML," and close the
Page properties box.
5. Type an XML declaration above the place where you want the
embedded view to display.
7. Select Create - Embedded Element - View.
8. (Optional) If you dont want to display the same view in all
circumstances, click "Choose a View based on a formula." When you
click OK to close the dialog box, write a formula in the Programmers
pane to display the appropriate view.
9. (Optional) Click the embedded view and select Element - View
Properties to change the alignment, or style, or to hide the element
under certain conditions.
10. Type a close root tag below the view.
To delete an embedded view, click the embedded view in the Work pane
and select Edit - Clear.

Using an agent to generate XML


One of the biggest advantages of using an agent to generate XML is
flexibility. Agents can be set to run on a schedule, based on an event, or in
response to a URL command. This kind of flexibility is necessary to create
automated XML applications. For example, the Web site for a bookstore
contains a database where customers contribute articles to the monthly
newsletter. There is an editing and approval workflow process that moves
the articles through the system until they have been approved. An agent
runs each hour to collect the articles that are ready for publication and
converts them into XML. The agent then places the articles into another
database as static XML documents where they are collected by subscribers.
Including XML and Viewing DXL in Designer Applications 15-13

Extending Applications

6. Place the cursor where you want the embedded view to display.

The ROI Books application contains an agent called createXML which


generates XML for each document in a view and sends it out based on a
request from a browser or a server. To see the output of this agent, open
the ROI Books application in Microsoft Internet Explorer 5 and click the
XML Agent link, or run the agent using the OpenAgent URL command:
http://host/roiBooks.nsf/createXML?OpenAgent

The agent could be written to not only print the output, but also to store
XML output in a string variable and write it to a static XML document or
to another database system using LS:DO or the DECS connector APIs.
Example: XML Agent
This example is a LotusScript agent that retrieves each document in a
view called XML, creates XML from the content, and prints the output.
Dim
Dim
Dim
Dim

s As New NotesSession
db As NotesDatabase
doc As NotesDocument
view As NotesView

Set db = s.currentDatabase
Set view = db.GetView( "XML" )
Set doc = view.GetFirstDocument
Print "Content-type: text/xml"
'Prevents Domino from sending default headers.
Print "<BOOKCATALOG>"
'BOOKCATALOG is the root element of the XML document.
While Not ( doc Is Nothing )
'Loop as long as there are document objects available.
Print

"<BOOK>"

15-14 Application Development with Domino Designer

'Send the parent element for each book document.


Print "<bookTitle>"+doc.bookTitle(0)+"</bookTitle>"
Print "<bookAuthor>"+doc.bookAuthor(0)+"</bookAuthor>"
Print
"<bookPrice>"+doc.bookDiscountPrice(0)+"</bookPrice>"
Print
"<bookCategory>"+doc.bookCategory(0)+"</bookCategory>"
Print "</BOOK>"
'Close the book element tag.
Set doc = view.GetNextDocument( doc )
'Get the next document in the view.
Wend
Print "</BOOKCATALOG>"
'Closes the root element.

Servlets are Java programs that run in response to a request from a Web
browser. Unlike agents, servlets load when the Web server starts up and
stay resident on a server. They are commonly used for generating and
updating Web pages dynamically and for exchanging data between
different applications. You can extend the power of servlets to bridge
applications by using XML as a common language between applications.
Not only can a Java servlet produce and deliver XML tags to the server
for processing, a servlet can also interact with the LotusXSL processor to
format the data described by the XML tags. XML in conjunction with XSL
provides you with a powerful tool for customizing the transfer of data.

Examples of XML servlet applications


As an example of how a servlet can leverage XML to deliver a
customized package of data, consider an organization where field sales
representatives download information from a Domino database using a
variety of devices, such as a Notes client, a browser, or a PDA. A sales
representative can request all of the information pertaining to a
particular client from the Domino application. A servlet assembles the
information from a variety of data sources, and packages the data with
the appropriate XML tags. The servlet can also use the LotusXSL
processor to apply styles to the XML-tagged data and deliver the data in
the format best suited to the connecting device. In this scenario, the sales
representative connecting with a PDA on a low-bandwidth phone line
will get less information than the sales representative connecting with a
Notes client running on a high-bandwidth network connection.
Including XML and Viewing DXL in Designer Applications 15-15

Extending Applications

Using a Java servlet to generate XML

The following graphic shows the relationship between the connecting


devices, the Domino application running the servlet, and the back-end
databases:
Client-Notes,
PDA, Browser

4. Client renders customized data

1. Client connects and requests data


3. Servlet applies XSL stylesheet
Domino with XML
Servlet and Lotus
XSL Processor
2. Domino with servlet
accesses network
resources

Support

Customer
Contacts

Orders

Internet

In another example of how a servlet can supply meaningful, customized


data, consider a real estate application with data on houses for sale
stored in a Domino database. A real estate agent or a potential buyer
uses a Web browser to request information about property for sale from
the Domino application. The user specifies search criteria, such as the
desired number of bedrooms. A servlet runs in the Domino application,
finding and assembling all of the documents that match the specified
criteria. The servlet dynamically wraps the data it finds in the correct
XML tags such as <HOUSE> and <HOUSETYPE>. It then uses the
LotusXSL processor to apply styles from an XSL stylesheet and
transforms the XML-tagged data to HTML, pushing the correctly
formatted data to the requesting browser.
Creating and using a servlet
You can either create a servlet from scratch, refer to an existing servlet by
its URL, or use a pre-built servlet. Each time you modify a servlet, you
must restart the server to see the changes. Running a servlet involves
writing the servlet, enabling servlet support in Domino, and, if necessary,
setting servlet properties.
For general information on Java servlets, visit the Sun Microsystems site
at http://www.java.sun.com

15-16 Application Development with Domino Designer

Including XML in a servlet


To include XML tags in a Java servlet, you need the LotusXSL Processor.
You can download the LotusXSL Processor from the IBM AlphaWorks
site, at http://alphaworks.ibm.com/formula/LotusXSL

Viewing the XML in an application with DXL utilities


In addition to including XML in a Designer application, you can view all
of the design elements represented in XML using Domino XML (DXL).
You can either view the XML in Designer, or you can export the XML to
a text file, where you can view it or edit it using your favorite editor.
For detailed information about DXL, refer to the Programming Guide.

In order to transform DXL, you must construct an XSL file which


processes the tags that make up a design element. For example, the
sample XSL file "ReportAllLSinForm.xsl" selects certain parts of the
DXL document and ignores others. The selected pieces (all relating to
LotusScript) are reformatted to make the output more readable.
Note This feature requires Internet Explorer version 5.01 or later.
To view the XML for a design element
1. Check that you are running Internet Explorer version 5.01 or later.
2. Check your location document to make sure your Internet Browser
field is set to "Notes with Internet Explorer" or "Internet Explorer."
3. Select one or more design element in the design pane.
4. Choose Tools - DXL Utilities - Viewer.
Designer displays the XML for the design elements in the Notes
client.
To export the XML for one or more design elements to a text file
1. Select one or more design elements in the design pane.
2. Choose Tools - DXL Utilities - Exporter.
3. Enter a file name and path for the XML file and click Save.
You can open the file in your favorite text editor and view or edit the
XML source.
Including XML and Viewing DXL in Designer Applications 15-17

Extending Applications

Accessing design elements in XML provides you with the means of


accessing the data in your application and comparing it to or integrating
it with other data sources that support XML. The DXL utilities can be a
very flexible alternative to generating reports on application elements
using the Design Synopsis. You can examine the DXL for a collection of
elements, or you can transform it using an XSL file to apply styles and
formats that make your data more meaningful to you.

To transform the XML for one or more design elements using an


XSL
1. Select one or more design element sin the design pane.
2. Choose Tools - DXL Utilities - Transformer.
3. Select the name of an XSL file to use for transforming the XML.
Designer ships with some sample XSL files that you can select or you
can browse the file system to select another XSL file.
4. Choose a type of output. Either select screen for a screen display, or
specify an output file name.

15-18 Application Development with Domino Designer

Chapter 16
Creating a Workflow Application
This chapter describes how to create a workflow application by using
automatic mailing features.

Workflow overview

Examples of workflow applications


The Document Library template (DOCLBW60.NTF) and the Teamroom
template (TEAMRM60.NTF) are examples of applications that include
workflow features. For both templates, the document you want reviewed
is kept in a central database and is not mailed to reviewers. Reviewers
receive mail notifying them of the need to review a document. A doclink
to the document is often included in the mail.
The Document Library template uses a review cycle so that you can route
a document link to a series of recipients. It allows serial and parallel
reviews. With parallel reviews, every reviewer receives e-mail
notification at the same time. With serial reviews, reviewers comment on
the document in a particular sequence and receive e-mail notification
only after the previous reviewer has completed the review.

16-1

Extending Applications

Workflow applications let you automate tasks. These tasks most often
involve automatically sending mail messages or automatically routing
documents, such as tracking orders and project plans to be reviewed. All
projects need one or more people to complete a series of tasks and can
benefit from workflow applications because they guide the project
through these tasks automatically. Workflow applications reduce
overhead and errors, speed processes, and track the status of a project. For
example, a workflow application might automatically send a document in
a publishing company from writer to editor to proofreader to production.
At each stage, an individual is responsible for specific tasks related to that
document. Once the task is complete, the workflow application ensures
that the individuals responsible for the next task are notified and receive
the data they need to execute their part of the project.

The Teamroom template contains the following workflow features:

Parallel review processing

Automatic mailing and archiving of newsletters and memos

Action item notifications, which send notices of new action items and
reminders of past due items

See the Domino Designer Templates Guide for additional information on


these templates.

Planning workflow
Before you select the type of mailing features that suit a workflow
application, you should carefully plan the actual workflow. One way to
implement a workflow application is to collect information in a central,
shared database and then distribute the information through e-mail to the
appropriate people. Another way to implement a workflow application is
to send documents automatically from one user to another for review.

Central shared databases


Users working in a shared database can create and edit documents
directly in the database. Remote users must dial into the server database
to contribute. Designers can implement automatic e-mail notifications to
alert users to documents needing their attention. The automatic e-mail
notifications can be built into forms or agents. To make it easier for users,
the notifications often include document links. For remote users,
however, you might include a copy of the document within the e-mail
notification instead of a link to the document. For Web users, include a
URL link in the e-mail notification.
Using central shared databases places the least burden on network
resources and conserves server disk space. Users also get to see each
others review comments (if the form is set up that way). The
disadvantage of using central shared databases is that users need
network access or remote access through a modem.

Individual mail databases


If users work in individual mail databases, they can create and respond
to documents and then route them to each other or to a central mail-in
database. Automated, easy-to-use forms that are stored in documents are
typical of such applications. Of course, if you are sending individual mail
messages, you are increasing disk space because the form is stored with
the document.
16-2 Application Development with Domino Designer

Using individual mail databases makes it easier for remote users because
they only need to access mail instead of accessing mail and a remote
database. The disadvantage of using individual mail databases is that
workflow process may take longer since work is done sequentially. Also,
replication times may be longer because of document size. Remote users
should consider using replication or Domino Off-Line Services (DOLS).

Setting up automatic mailing


To send automatic mail notices from a database, you can use forms or
use form and view actions, agents, and events.

Sending links to documents

The simple action Send Mail Message with Include link to


document selected.

The simple action Send Newsletter Summary.

The formula function @MailSend with the [IncludeDocLink] flag.

A LotusScript program that uses the Send method in either the


NotesDocument class or the NotesUIDocument class and the
FormatMsgWithDoclinks method in the NotesNewsletter class.

A Java program that uses the Send method in the


lotus.notes.Document class and FormatMsgWithDoclinks method in
the lotus.notes.Newsletter class.

Sending documents
Sometimes it makes sense to mail documents automatically, as in the
following situations:

You want users to work on documents sequentially

You want to send documents to a mail-in database for centralized


tracking

For these applications, you must create a form with a SendTo field field
that specifies the recipients, or use a formula or program that includes
the SendTo information.

Creating a Workflow Application 16-3

Extending Applications

In some workflow applications, you may want to mail notices of new or


modified documents or reminders of work that needs to be done.
Sending a link to a document instead of sending the document itself
saves time and space. To send a link automatically, create an agent,
event, form or view action, hotspot, or button that includes one of the
following:

Use any of these methods:

Add a MailOptions field with a value of 1 to force the document to


be mailed when it is saved.

At the Defaults tab of the Form Properties box, select On Close:


Present mail send dialog to let users decide if they want to mail the
document.

Create an agent, event, form or view action, hotspot, or button that


uses:
The simple action Send Document
The formula functions @Command([MailSend]) for optional
mailing or @MailSend for automatic mailing
A LotusScript program that uses the Send method of the
NotesDocument class or the NotesUIDocument class
A Java program that uses the Send method of the
lotus.notes.Document class

In addition, all forms and views contain the default action Send
Document that you can display in the Actions menu or the action bar.
For more information on reserved fields for mailing options, see the topic
Reserved fields that control mailing options in the chapter Designing
Fields.

Enabling users to view documents


To allow users to view workflow documents, do one of the following:

Copy the form into the master mail template on the server and
refresh the design of mail databases.

Select the Store form in document option for the form.

Forwarding documents in a mail memo


Use mail forwarding to mail documents that dont have a SendTo field.
Create an agent, event, form or view action, hotspot, or button that uses
one of the following:

The simple action Send Mail Message with the option Include
copy of document selected

The formula function @Command([MailForward])

A LotusScript program that uses the Forward method in the


NotesUIDocument class

In addition, all forms and views contain the default action Forward
that you can display in the Actions menu or the action bar.
16-4 Application Development with Domino Designer

Sending replies to a mail memo


To create an automatic reply to a mailed document, create an agent,
event, form or view action, hotspot, or button that uses the simple action
Reply to Sender.

Mailing features and Web applications


Web users whose mail databases reside on a Domino server can
participate in mailing processes. When you are designing forms or views,
include form or view actions as alternatives to menus for tasks Web users
need to do. For example, you can create a Send Document action so
that it appears on the action bar of a form both in Notes and on the Web.

Displaying the Mail Send dialog box

Select On Close: Present mail send dialog in the Form Properties


box on the Defaults tab.

Write a formula that includes @Command([MailSend]).

Make sure that you include a SendTo field on the form.

Creating a database that receives mailings


If a database is designed to receive mail, you must create a Mail-In
Database on a server that all users and servers can access. Then, you
must create an associated Mail-In Database document in the Domino
Directory. This document must exist in the Domino Directory of every
server that stores a replica of the database. The database cannot receive
mail until you create this document.
1. In the access control list (ACL) of the Mail-In Database, make sure
you have at least Author access with the Create Documents privilege
selected.
2. Open the Domino Directory and choose Create - Server - Mail-In
Database.

Creating a Workflow Application 16-5

Extending Applications

If you want the Mail Send dialog box to appear so that users have the
option of mailing, saving, signing, or encrypting a document, do one of
the following:

3. Complete the following fields of the mail-in database document.


Field

Description

Mail-in
name

A name that identifies the database in the SendTo fields or


in formulas on the form.

Description

A description of the database.

Domain

The domain name if your organization uses multiple


mailing domains.

Server

The hierarchical name of the server on which this database


resides.

Filename

The database directory name (if the database is in a


subdirectory of the Notes Data directory) and the file name.

For information on all the fields in the Mail-in database document,


see Lotus Domino Administrator 6 Help.
4. Optional) Click Administration. Next to Administrators, enter
additional names of people who can change this document.
5. Give the name of the database to appropriate users so they can enter
it in the To field of messages destined for the database.
6. Close and save the document.

Example of using an agent that sends automatic replies


For a mail-in Survey database, you can create an automatic response
agent so employees receive a confirmation that the survey arrived.
1. Select the Survey database and choose Create - Agent. The Agent
Properties box appears.
2. Give the agent the name Send Thank-You and select Shared
Agent.
3. Select On event as the trigger.
4. Select the runtime option After new mail has arrived.
5. Close the Agent Properties box.
6. In the Object list, make sure Action is selected.
7. Select Simple actions(s) from the drop-down list in the
Programmers pane and click Add Action.
8. Select Reply to Sender from the list and then click Reply to sender
only.

16-6 Application Development with Domino Designer

9. In the box for the body of the text, type:


Thank you for taking the time to respond to our survey.
We will distribute the results as soon as they are
ready.

10. Click OK.


11. Close and save the agent.

Example of using an agent that mails action item notices


Consider that every week, you want action items mailed from the
Meeting Tracking database to the people who are assigned to each task.
1. Select the Meeting Tracking database, and choose Create - Agent.
The Agent Properties box appears.
2. Give the agent the name Mail Action Items and then select Shared
Agent.
3. Select On schedule as the trigger.
5. Click the Schedule button.
6. Select Wednesday from the On day list and type the following in
select 05:00 PM from the At time list.
7. Click OK.
8. In the Target list, select All new & modified documents.
9. Close the Agent Properties box.
10. Highlight Document Selection in the Objects list and click the
Add Condition button.
11. In the Condition list, select By form and select Action Item. Click
Add.
12. Click Add Condition again.
13. In the Condition list, select By field. Select Status, contains, Open.
Click Add.
14. In the Object list, highlight Action and click Add Action.
15. Select Send Mail Message from the Action list and click More.
16. In the To box, click Formula and enter the formula:
AssignedTo

17. In the Subject box, click Formula, type the following formula and
click OK:
ActionItem + ", due " + @Text(DueDate)

Creating a Workflow Application 16-7

Extending Applications

4. Select Weekly from the list.

18. In the Body box, type:


This action item has been assigned to you.

19. Click OK.


20. Check Include copy of document and click OK.
21. Close and save the agent.

Example of using an agent that sends announcements


Consider that you are designing a Corporate Announcements database
to which managers want to send notices for important announcements.
To circulate particular announcements, managers select them from the
view and then select the agent that sends notices.
1. To prevent non-managers from running this agent, deselect Create
private agents in the database access control list for all users except
those with Manager access.
2. Select the Corporate Announcements database and choose Create Agent.
3. Give the agent the name Mail announcements and select Shared.
4. Select On event as the trigger.
5. Select Agent list selection from the list.
6. Select All selected documents as the Target.
7. Close the Agent Properties box.
8. Highlight Action in the Object list and click Add Action.
9. From the Action list, select Send Newsletter Summary.
10. In the To box, type:
All Personnel

(All Personnel is a group in the Domino Directory.)


11. In the Subject box, type:
Important Announcements

12. In the Body box, type:


Please note the following new announcements:

13. Check Include summary for each document in view and click OK.
14. Close and save the agent.

16-8 Application Development with Domino Designer

Chapter 17
Using Third-Party Tools and WebDAV to Extend an
Application
This chapter describes the various ways you can use third-party tools to
extend and enhance a Domino application. Not only can you use
third-party tools to develop pieces of an application, Domino lets you
launch the tools from within Designer for more flexible application
development.

Developing applications using third-party tools and WebDAV


As you are developing an application, you may want to supplement the
tools provided with Designer with tools of your own choosing. For
example, you may have a favorite graphics editor you use to design
images for your application, or you may have a favorite HTML editor
that you want to use to design pages. You launch and use third-party
tools from within Designer.
For information on adding third-party tools to the tools menu, see the
topic Customizing the Designer Tools menu in this chapter.
The Domino web server also supports Web-based Distributed Authoring
and Versioning (WebDAV) so that you or others on your team can edit
and manage parts of a database using WebDAV-enabled clients.
Designers with the proper access to a Domino database can open files
from a WebDAV client such Macromedia Dreamweaver edit the
files, and save them back to the database.
For information on using WebDAV, see Editing and managing database
resources using a WebDAV client.

17-1

Extending Applications

This chapter also describes using Web-based Distributed Authoring and


Versioning (WebDAV) for editing and managing parts of a database on
remote Web servers.

Customizing the Designer Tools menu


You can customize the Tools menu in Designer to include menu items
that launch other applications or your own custom formulas. For
example, you might want to include a menu item to launch your favorite
image editor while you are in the list of images, or you might want to
add a formula that you can launch at any time that automates your
design process. When you add a tool, you can specify when you want the
tool available. You might need some tools for every phase of your design
work, and other tools for use with very specific design activities, such as
designing a page or a frameset. In this way, you can personalize your
application development process throughout your Designer desktop.

To add a tool
1. Select Tools - Add Tool.
2. Enter the name of the tool.
Tip To make the tool accessible to users with physical disabilities,
specify a keyboard accelerator key for the tool name by putting an
underscore (_) before the letter you wish to use as the accelerator
key.
3. Do one of the following:
Select Run program to have a menu item launch a tool from
within Designer. Enter the path for the executable file or browse to
select the executable.
Select Run formula to launch a tool using an @commmand
formula.
4. In the Tool Location section, specify one or more contexts when the
tool should be available. That is, if you do not want the tool to be
always available, choose the design elements where you might use
the tool in your design work. For example, if you select Form Design,
the tool will be available during form design; if you select Form list,
the tool will be available from the tool menu when you are in the list
of forms.
5. Click OK.
The name of the tool appears on the Tools menu for the contexts.
That is, if you specified the tool should always be available, it will
always be on the Tools menu. If you specified the tool should only be
available for page design, it will only display when a page has focus
in the work pane.

17-2 Application Development with Domino Designer

Organizing tools on the Tools menu


After you have added tools to the Tools menu, you can edit the tool
names or their associated formulas, delete one or more tools, organize
tools into submenu groupings, or change the context for a tool.
To add a submenu for tools
1. Select Tools - Customize Tools.
2. Select a design context and click Add Submenu to add a submenu
for that context.
3. Enter a name for the submenu and click OK.
Tip To make the submenu accessible to users with physical
disabilities, specify a keyboard accelerator key for the submenu
name by putting an underscore (_) before the letter you wish to use
as the accelerator key.

To move a tool to another design context


1. Select Tools - Customize Tools. Click the arrow next to a design context
to display the tools associated with that context.
2. Select one or more tools.
3. Drag and drop the tools to a new context.
To copy, paste, or delete a tool:
1. Select Tools - Customize Tools. A dialog box displays the list of
design contexts.
2. Click the arrow next to a context name to display the tools associated
with a design context.
3. Select the tool name.
4. Click Copy to copy the tool to the clipboard.
5. Select the design context where you want to place the tool and click
Paste.
6. Select a tool and click Cut to remove the tool from its original
context.

Using Third-Party Tools and WebDAV to Extend an Application 17-3

Extending Applications

4. Use drag and drop or the Copy and Paste buttons to move tools to
the submenu.

To edit a tool
1. Select Tools - Customize Tools.
2. Click the arrow next to the name of a design context to display tools
associated with that design context.
3. Select the tool name and click Edit. You can edit the name of the tool
and/or the formula that it executes. Note that if you had chosen to
run an executable program from the menu, the action is represented
as an @command([Execute]) formula. You can change the name of
the executable file or customize the formula.
4. Click OK to confirm your changes.

Editing and managing database resources using a WebDAV client


The Domino Web server supports Web-based Distributed Authoring and
Versioning (WebDAV), a technology that allows users with Designer
access to a database to edit or move items in the design collection of a
database without using a Designer client. For example, you may build a
page using a favorite HTML editor. Using Windows Explorer, you can
drag that page into an NSF file for inclusion in a Domino application.
Similarly, an application designer collaborating on a project might open
an HTML page using the Internet Explorer 5.x, edit the page, and then
place the page back into the database. WebDAV technology gives you
much greater flexibility in the development process as you can use
third-party tools and contribute to application design from remote Web
clients.
The types of Domino database resources you can access with a WebDAV
client are:

File resources

Images

Cascading Style Sheets (CSS)

Setting up WebDAV
Before you use WebDAV, it must be enabled on the Domino server.
Check with your system administrator to make sure WebDAV is enabled
in the Web Site document (found under the Internet Sites view in the
Domino Directory).

17-4 Application Development with Domino Designer

You must also do the following:

Provide the user with either Designer or Manager access in the


database Access Control List (ACL). The user also must have both
Create documents and Delete documents privileges enabled in
the database ACL.

On the Advanced tab of the database ACL, set the The maximum
Internet name & password field to either Designer or Manager
access.

Ensure that you have the correct proxy settings configured for the
WebDAV client.

Check with your server administrator to make sure sessions


authentication is disabled in the Web Site document (found under
the Internet Sites view of the Domino Directory) that enables
WebDAV.

For more information on setting up the Domino server to use WebDAV,


see Administering the Domino System.
Enabling design locking
Design locking prevents the situation where one collaborator overwrites
the work of another when working on the same resource. Some
WebDAV clients (such as MS Word 2000, Excel 2000, and Dreamweaver
4.x) will lock the file when it is opened for edits or when the file is saved
to a WebDAV server. In order for these clients to work with WebDAV
databases on the Domino server, you must enable Design locking for
each of the WebDAV databases. To turn on design locking for use with
WebDAV, enable Design Locking on the Designer tab of the Database
Properties box.
For more information on design locking, see the chapter Completing an
Application and Managing Design Changes.

Using Third-Party Tools and WebDAV to Extend an Application 17-5

Extending Applications

Note If your WebDAV client uses a proxy server to access the


Domino server where the WebDAV database resides, you may
experience problems when you try to connect to the WebDAV
database. If so, disable the proxy for access to that server. You can
selectively disable the proxy, specifying that the proxy not be used
for access to that one particular server. If you are using Microsoft
Windows Explorer, Internet Explorer 5, or Internet Explorer 6 as the
WebDAV client, open the browser and go to Tools - Internet Options
- Connections tab. Choose LAN settings, then click the Advanced
button. In the Exceptions edit box, enter the hostname of the Domino
WebDAV server, such as develop1.acme.com.

In order for design locking to work, the Administration server for the
database must be accessible. The Administration server (also known as
the Master Lock server) is usually the server on which the database was
created, unless an alternate server is explicitly specified on the Advanced
page in the Access Control List for the database. Since many applications
that use locking do so without explicit action by the user, check that the
Administration server for the database is correct and that the server is
accessible, and ensure that design locking is enabled to prevent problems
with WebDAV.
Notes about working with WebDAV
The following are tips for using WebDAV with an NSF file.

If a database has the field Dont allow URL open enabled in the
Database Properties box, then you will not be able to access the
database using a WebDAV client.

Macromedia Dreamweaver 4.01 is required to use WebDAV to


access databases on a Domino server. This upgrade can be
downloaded from Macromedias web site at:
http://www.macromedia.com/support/dreamweaver/downloads/
dw4_updater.html

In order for Dreamweaver locks (Check In and Check Out) and


Designer client locks to interoperate correctly, the following must be
configured.
a. In Dreamweaver, under the Remote Sites configuration panel, the
user needs to supply a user name to authenticate for example,
James Smith/Acme and a valid password.
b. The user must also supply an e-mail address for example,
james_smith@acme.com. This e-mail address is what is used for
Check In/Out in Dreamweaver. The email address specified in
Dreamweaver must exactly match the e-mail address that is in
the Internet Address field in the Person document in the
Domino Directory (names.nsf) for the user James Smith/Acme.
Only then will both clients recognize the user to be the same
person.

Limitations
The following are WebDAV-enabled clients that should work
correctly with WebDAV on a Domino server: Microsoft Internet
Explorer 5.0x or greater, Windows Explorer on NT, Windows XP,
Windows 98, Windows 2000 Macromedias Dreamweaver 4.01,
Microsoft Word 2000 and Excel 2000.

17-6 Application Development with Domino Designer

Note Microsoft uses the term Web Folders to represent their


WebDAV client application. Please refer to Microsofts
documentation for how to use Web Folders.
Note With Macromedias Dreamweaver you configure a Remote
Site to use WebDAV in order to access Domino databases via
WebDAV. Please refer to Dreamweavers documentation for more
information on how to configure this.

Microsofts Front Page 2000 is not a supported WebDAV client for


use with Domino 6.

WebDAV-enabled clients on MAC PCs are not supported with the


Domino 6 Web Server.

Accessing database resources using a WebDAV client

Virtual collections
When a design element is inserted into a Domino database via WebDAV,
Domino creates collection elements to represent all of the collections in the
containment hierarchy of the files inserted. These collection elements hold
properties for the collection and represent collections that may be, or might
later become, empty (that is, have no contained elements). A collection can
exist, however, without a collection element to represent it. This can
happen when elements are created or renamed using the Designer client.
In this case, the collection is referred to as a virtual collection. A virtual
collection exists when a design element specifies the name of a collection in
its path name, but a collection element for the collection does not exist. For
example, if the design collection for a database contains an image resource
titled images/logo.gif, but does not contain a collection element named
images, then images is a virtual collection.

Using Third-Party Tools and WebDAV to Extend an Application 17-7

Extending Applications

WebDAV uses a containment hierarchy much like a file system


directory to organize files into groups called collections. A collection
can contain other collections and/or files. In Domino, this hierarchy is
represented using the name of each design element (the value stored in
the $TITLE field for each element) as the file name. For example, a graphic
resource named images/logo.gif would appear in a WebDAV collection
as a file named logo.gif in the root collection named images. In the
Designer client, collection elements appear in the Shared File Resources
design list with a trailing slash appended to the name in the $TITLE field
and an optional comment. Collection elements are file resource design
elements with the additional design flag / in the $Flags field.

Virtual collections behave much like non-virtual collections with the


following exceptions:

The properties of a virtual collection are a set of defaults based on


the properties of the database. For example, the creation date of a
virtual collection is the creation date of the database.

A virtual collection that no longer contains elements disappears.

If a WebDAV client attempts to set properties on a virtual collection,


the Domino server attempts to create a collection element for the
collection, transforming the virtual collection to an actual one.

Accessing database elements


When using a WebDAV client to access a database, you start by creating
a connection from the client to a database on a specified server. For
example, in Windows Explorer for windows 2000, you create a Network
Place. To identify the database, you enter a URL that specifies the
hostname of the Web site, the database name, and append the string
$files to the end of the path to indicate to the server that this is a
WebDAV request. For example, to open the database named sales.nsf as
a Web folder from Windows Explorer, you enter the path as follows:
http://servername/sales.nsf$files

Once you have mapped a database to a WebDAV client, you can use the
interface of the WebDAV client to browse the database and select
elements within the database to open.
To display the contents of a resource within a database from a Web
browser using a URL, you append the name of the resource (the value of
the associated $TITLE field) to the folder name. For example,
http://servername/sales.nsf$files/images/logo.gif

Note You cannot use Microsofts Internet Explorer to access a WebDAV


database that is located in a subdirectory of the Domino servers data
directory. Use Windows Explorer instead.
Once you have established a connection to a Domino database using a
WebDAV client, you can open a resource, edit it, and save it back to the
database. Or you can add an element that you have created using a
third-party editor to the database.
Caution WebDAV clients do not maintain operating system attributes,
such as a read-only state. For example, if you create a HTML page, and
flag it as being a read-only file in Windows, the page will not be flagged
as read-only if you add it to a database and view it from Designer.

17-8 Application Development with Domino Designer

Avoiding and resolving naming conflicts


WebDAV requires a unique name for each resource. Because a Domino
database can contain more than one element with the same value in the
$TITLE field, naming conflicts can sometimes occur. For example, a
naming conflict can happen if two authors are working on different
replicas of the same database and they both create a new element with
the same name. When the databases are replicated, each replica will
contain two different design elements with the same $TITLE value.
Note Design locking does not prevent naming conflicts because in
Domino locking is based on the noteID, not the name of a note.

When a name collision involves a collection element, the collection


element name is adorned as described above. However, if the collection
contains any elements, then an unadorned virtual collection will be used
to hold the contents of the collection. The result is that when viewed from
a WebDAV client, there will be both a name-adorned collection which
contains no elements, and an unadorned collection which contains all of
the elements in the collection. Collections with adorned names cannot be
the target of a move or copy operation and you cannot create elements in
collections with adorned names that is, they will always be empty.
You can, however, rename or delete a collection with an adorned name
in order to attempt to resolve the name collision. Deleting a collection
with an adorned name only deletes the collection element that is
involved in the name conflict. It does not delete any of the elements that
are contained in the virtual collection with the unadorned name.
Note The above discussion implies that names that match the adorned
name style (Name(NoteID).ext), where NoteID is the ASCII
representation of an eight-digit hexadecimal number, should be avoided
in design element names. While the Domino server will not allow you to
create or name a design element from a WebDAV client with a name that
could be confused with an adorned name, the Designer client will allow
you to do this.
Using Third-Party Tools and WebDAV to Extend an Application 17-9

Extending Applications

Domino deals with naming conflicts by dynamically adorning the names


of conflicting elements with the NoteID of the element using the form
Name(NoteID).ext. The server uses this form to uniquely identify each
element involved in a name collision, but does not actually rename the
elements in the database. If you see this naming convention using a
WebDAV client, try to resolve the conflict to avoid problems. You can
use Windows Explorer or any other WebDAV client to rename one or
more of the conflicting resources. When the name collision is resolved in
this way, the other affected resource name reverts back to the unadorned
form of the name in $TITLE. You may need to refresh the view of a
WebDAV client in order to see the changes. You can also change the
name of an element in the Designer client.

Using WebDAV in a replicated environment


When WebDAV is used to modify the design of a database in a
replicated environment, you should enable design note locking on the
replicated databases and use WebDAV-enabled applications that support
locking. Locking ensures that any changes are replicated to the master
lock database on the administration server whenever a design element is
locked or unlocked, and that other applications are not allowed to
modify a design element while it is locked. For WebDAV clients that do
not support locking (such as Windows Explorer), the Domino Web
Server will lock design elements on the clients behalf prior to making
any updates, then unlock the design element after the update is
complete. In addition, methods that return information about an
unlocked design element on a database that has design note locking
enabled (for example GET, HEAD, and PROPFIND) will replicate the
design note with the master lock database if necessary before returning
any data. This minimizes the chances of lost updates or replication
conflicts when using WebDAV clients that do not support locking.
The down side of the protection provided by locking this is:

The administration server (also known as the Master Lock server)


for the database must be available in order to do anything with
WebDAV if design note locking is enabled. The administration
server is specified on the Advanced panel of the database access
control list.

Performance is significantly impacted for replicas that are not on the


administration server. If you need to use a WebDAV client that does
not support locking to perform operations on a large number of files
(for example, using Windows Explorer to copy a collection of files
into a database), you may want to temporarily disable design note
locking, or set the administration server for the database to be the
server on which the database resides, prior to performing the
operation. When you have completed the operation, you can restore
the original settings and then replicate the database with the master
lock database and deal with any replication conflicts. Depending on
the number of elements involved, this can be much more efficient
than the multiple single note replications that the Domino server
would be required to do otherwise.

17-10 Application Development with Domino Designer

Chapter 18
Application Security
This chapter describes Designer features that limit access to applications
and to parts of applications. It does not provide a comprehensive
description of Domino security features.
For information on server and workstation security, see Administering the
Domino System.

Security in an application
Domino offers a multi-layered approach to security. Server
administrators can secure databases, servers, and domains. Database
designers and managers control the following:

Application Security

Design element security


Use the database access control list in conjunction with access control
fields to restrict access that specific users and servers have to an
application. You can also use access lists and special fields to restrict
access to specific design elements within an application.

Encryption and database signing


You can further ensure data privacy by encrypting a database with
an ID so unauthorized users cannot access a locally stored copy of
the database. You can also sign or encrypt mail messages users send
and receive, and you can sign the database or template to protect
design elements from manipulation from outside formulas.

18-1

Deploying Applications

Use the database access control list (ACL) to restrict access that
specific users and servers have to an application. You can also use
the Advanced section of the ACL to further restrict application access
for Web users.

The database access control list


Every database has an access control list (ACL) that specifies the level of
access that users and servers have to a database. Although the names of
access levels are the same for users and servers, those assigned to users
determine the tasks that users can perform in a database, while those
assigned to servers determine what information within the database the
servers can replicate.
You must have Manager access to create or modify an ACL. Then, for
each user name, server name, or group name in an ACL, you can specify:

An access level

Access level privileges

A user type

Roles

Note You can further restrict access to specific documents and fields
within those databases using the Extended ACL, which is used in the
Domino Directory, the Extended Directory Catalog, and the
Administration Requests database. Work with your server administrator
to apply these security measures.
For more information on server access levels and replication, see
Administering the Domino System.

Setting up a database ACL


Plan the database access for the application before you add users,
groups, or servers to a database ACL. After you set up a database ACL,
users can click the Effective Access button on the ACL dialog box in the
Notes client to view their level of access to a database.
Note You can make changes to multiple ACLs on a server through the
Multi-ACL Management dialog box in the Administrator Client. You can
also edit an ACL for a single database using the File - Database - ACL
dialog box in the Notes client.

To set up a database ACL


1. Make sure that you have:
Manager access in the database ACL
Created the roles and groups that you want to use in the ACL
2. Select the database icon from your Bookmark pane.
3. Choose File - Database - Access Control.
18-2 Application Development with Domino Designer

4. Add entries for Notes users, servers, groups, and authenticated


Internet users.
5. Set the access level for each entry.
For information on assigning anonymous access for Web users, see
Administering the Domino System.
6. (Optional) For additional security, select a user type for the each
entry.
7. (Optional) Refine the entries by restricting or allowing additional
access level privileges.
8. (Optional) Assign roles to ACL entries. The role displays a check
mark when selected. If no rolee exists in the database, the role option
is not displayed.
9. (Optional) Enforce a consistent ACL across all replicas of the
database.
10. Optional) Click Advanced and accept or change the Web access level
in the Maximum Internet name & password access list.
11. Click OK to save your changes.

Access levels in the ACL

Note If you are designing a template (an .NTF file) for others to use to
create applications, make sure the default access is at least Reader so that
users and/or servers) can successfully read from the template when
creating or refreshing .NSF files based on that template.
Access levels assigned to servers in a database ACL control what
information within a database the servers can replicate.
To access a database on a particular server, a Notes user must have both
the appropriate database access specified in the ACL as well as the
appropriate access specified in the Server document in the Domino
Directory.
For more information on server access levels, see Administering the
Domino System.

Application Security 18-3

Deploying Applications

Access levels assigned to users in a database ACL control which tasks


users can perform in the database. Access level privileges enhance or
restrict the access level assigned to each name in the ACL. For each user,
group, or server listed in the ACL, you select the basic access level and
user type. To further refine the access, you select a series of access
privileges.

For more information on database access for Internet users, see


Maximum Internet name-and-password access later in this chapter.
Caution Administrators who are listed in the Full Access
Administrators, Administrators, and Database Administrators fields in
the Server document are allowed to delete any database on the server,
even if they are not listed as managers in the database ACL.
This table shows the user access levels, listed from highest to lowest.
Access level Allows users to

Assign to

Manager

Modify the database ACL.


Encrypt the database.
Modify replication settings.
Delete the database.
Perform all tasks allowed by lower access
levels.

Two people who are


responsible for the
database.

Designer

Modify all database design elements.


Create a full-text search index.
Perform all tasks allowed by lower access
levels.

A database designer
and/or the person
responsible for design
updates.

Editor

Create documents.
Edit all documents, including those created
by others.
Read all documents unless there is a
Readers field in the form. If there is a
Readers field, the Editor must be listed to
be able to read or edit the document.

Any user allowed to


create and edit
documents in a
database.

Author

Create documents if the user or server also Users who contribute


documents to a
has the Create documents access level
privilege. When you assign Author access database.
to a user or server, you must also specify
the Create documents access level
privilege.
Edit the documents where there is an
Authors field in the document and the user
is specified in the Authors field.
Read all documents unless there is a
Readers field in the form. If there is a
Readers field, the Author must be listed to
be able to read documents.
continued

18-4 Application Development with Domino Designer

Access level Allows users to

Assign to

Read documents where there is a Readers


field in the form and the user name is
specified in the field.

Users who only need


to read documents in
a database but not
create or edit
documents.

Depositor

Create documents.

Users who contribute


documents but who
do not need to read or
edit their own or
other users
documents. For
example, use
Depositor access for a
ballot box application.

No Access

Have no access, with the exception of


options to Read public documents and
Write public documents. These are
privileges that designers may choose to
grant.

Terminated users,
users who do not
need access to the
database, or users
who have access on a
special basis.
You may want to
specifically assign No
Access to individuals
who should not have
access to a database,
but who may be
members of a group
that does.

To view ACL entries by access level


You can view ACL entries by access level to see which users, server, or
groups are assigned to a specific access level.
1. Make sure that you have Manager access in the database ACL.
2. Select the database icon from your Bookmarks pane.
3. Choose File - Database - Access Control.
4. Click the arrow next to People, Servers, Groups and select an
access level. The ACL displays only those names with the selected
access level.
5. Click OK.

Application Security 18-5

Deploying Applications

Reader

Access level privileges in the ACL


You can expand or restrict the access level for each user, group, and
server by adding optional privileges or removing default privileges
within an access level.
This table lists the user access level privileges from highest to lowest.
Access level

Default privileges

Optional privileges

Manager

Create documents
Create private agents
Create personal folders/views
Create shared folders/views
Create LotusScript/Java agents
Read public documents
Write public documents

Delete documents
Replicate or copy documents

Designer

Create documents
Create private agents
Create personal folders/views
Create shared folders/views
Read public documents
Write public documents

Delete documents
Create LotusScript/Java agents
Replicate or copy documents

Editor

Create documents
Read public documents
Write public document

Delete documents
Create private agents
Create personal folders/views
Create shared folders/views
Create LotusScript/Java agents
Replicate or copy documents

Author

Read public documents

Create documents
Delete documents
Create private agents
Create personal folders/views
Create LotusScript/Java agents
Write public documents
Replicate or copy documents

Reader

Read public documents

Create private agents


Create personal folders/views
Create LotusScript/Java agents
Write public documents
Replicate or copy documents
continued

18-6 Application Development with Domino Designer

Access level

Default privileges

Optional privileges

Depositor

Create documents

Read public documents


Write public documents

No Access

None

Read public documents


Write public documents

Create documents
Select this privilege for all users with Author access. If you deselect this
privilege to prevent Authors from adding any more documents, they can
continue to read and edit documents theyve already created.

Delete documents
Authors can delete only documents they create. If this privilege is
deselected, a user cant delete documents, no matter what the access
level. If a form contains an Authors field, Authors can delete documents
only if their name, a group that contains their name, or a role that
contains their name appears in the Authors field.

Create private agents


A user can run private agents that perform tasks allowed by the users
assigned access level in the ACL. Since private agents on server
databases take up disk space and processing time on the server, you may
want to deselect this privilege if performance is a concern.

Create personal folders/views


Personal folders and views created on a server are more secure than
those created locally, and they can be made available on multiple servers.
Also, administrative agents can operate only on folders and views stored
on a server. If server space is a concern, deselect the Create personal
folders/views option. Users will still be able to create personal folders
and views on their local workstation.

Application Security 18-7

Deploying Applications

A server administrator can further restrict a users right to run agents in


the Agent Restrictions section of the Server document in the Domino
Directory. Therefore, even if you grant a user the Create
LotusScript/Java agents access level in a database ACL, the Server
document controls whether or not the user can run an agent on a
particular server.

Create shared folders/views


Deselect this privilege to maintain tighter control over database design
and to prevent users from creating folders and views that are visible to
others.

Create LotusScript/Java agents


Since LotusScript and Java agents on server databases can take up
significant server processing time, you may want to restrict which users
can run them.
Whether or not a user can run agents depends on the access set by the
Domino administrator in the Agent Restrictions section of the Server
document in the Domino Directory. Even if you select Create
LotusScript/Java agents for a name in the ACL, the Server document
still controls whether or not the user can run the agent on the server.
Work with your server administrator to set access rights for users to run
agents on a server.

Read public documents


Select this privilege to allow users who have No Access or Depositor
access to read documents and to see views and folders with the property
Available to Public Access users. A form must contain a text field
named $PublicAccess with an assigned field value of one. Documents
created from that form are public document.

Write public documents


Select this privilege to allow users to create/edit specific documents that
are controlled by forms having the property Available to Public Access
users.

Replicate or copy documents


Select this privilege to allow users to create local replicas or local copies
of the database. Deselecting this option not only prevents a user from
being able to create a new local replica or local copy of a database; it also
prevents a user from copying or printing documents in the database.
Note that this is not a true security measure because users can still print
using Ctrl+Print Screen or they can open a document and copy data to
the clipboard. This setting applies only to Notes clients.

18-8 Application Development with Domino Designer

Roles in the ACL


A database designer can assign special access to database design
elements and database functions by creating roles. A role defines a set of
users and/or servers. Roles are similar to groups that you can set up in
the Domino Directory. However, unlike groups, roles are specific to the
database in which they are created.
Once you create a role, you can use it in database design elements or
functions to restrict access to those elements or functions. For example,
you may want to allow only a certain group of users to edit certain
documents in a database. You could create a role named "DocEditors".
That role would then be added to the Authors fields of those documents,
and assigned to those users who are allowed to edit those documents.
You must have Manager access to create roles in the database ACL. You
must create a role before you assign it to a name or group in the ACL.
Once you have created roles in an ACL , they are listed in the 'Roles' list
box on the Basics panel of the ACL dialog box. Role names appear in
brackets -- for example, [Sales]. When you add an entry to a database
ACL, you can assign them to a role by selecting a role from the Roles list
box.

This table describes the design elements to which the database designer
can restrict access by using roles.
To restrict who can

The designer uses

Edit specific documents

An Authors field

Edit specific portions of a document

Sections

Read specific documents

A Readers field or a Read access


list on the Security tab of the
Document Properties dialog box

View and read documents in a specific view

View properties

View and read documents in a specific folder Folder properties


Read documents created with a specific form Form properties
Create documents with a specific form

Form properties

Application Security 18-9

Deploying Applications

Caution If you create a role that restricts access to part of an application


and you do not assign it to yourself, you will be restricted from accessing
that part of the application in both the Notes client and in Designer.
Make sure you assign each role to yourself as you create it to avoid this
problem.

Caution Using roles to restrict access to database elements is not a


foolproof security measure. For example, if a designer restricts access to
certain documents in a database, the database manager or Domino
administrator must remember that documents inherit their Read access
list from the Read access option that is set in the Form Properties box for
the form used to create the document. Therefore, anyone with Editor
access or above in the database ACL can change a documents Read
access list.

To create or edit roles


You must create a role before you can assign it to a name in the ACL.
1. Make sure that you have Manager access in the database ACL.
2. Select the database icon from your bookmarks page.
3. Choose File - Database - Access Control.
4. Click Roles.
5. Do one of the following:
To create a role, click Add, and type a name for the role.
To rename a role, click Rename. In the Rename Role box, type a
new name for the role.
To delete a role, click Remove, and type the name of the role that
you want to delete.
6. Click OK twice.
Notes
You do not need to include any brackets in the role name when
adding or removing a role. However, when you rename a role, you
must type the role name exactly as it appears in the ACL, including
the brackets and case-sensitive characters.

To display a role assigned to a person, group, or server, select an


entry in the ACL. If a check mark appears next to a role in the Roles
box, the selected person, group, or server is assigned to the role.

18-10 Application Development with Domino Designer

Editing the database ACL


You can edit, delete, and rename entries in an ACL, as well as change the
access assigned to entries.

To edit entries in the ACL


1. Make sure that you have Manager access in the database ACL.
2. Select the database icon from your Bookmark pane.
3. Select File - Database - Access Control.
4. Select a name.
5. Do one of the following and then click OK:
Click Remove.
Click Rename, then type the new name.
Change the assigned user type, access level, access level privilege,
and roles, as necessary.
Tip To display entries by access level, click the arrow next to People,
Servers, and Groups, and then select a specific access level.

To add entries to the ACL by access level


1. Make sure that you have Manager access in the database ACL.
2. Select the database icon from your Bookmarks pane.
3. Select File - Database - Access Control.
5. Do one of the following to add a name to the ACL:
Select the person icon and continue to Step 6.
Type the name of a user, group, or server and continue to Step 8.
6. Click the arrow and select a Domino Directory or Personal Address
Book. Using the name picker in the dialog box, you can select from
the directories and address books available to you to find the name
you seek.
7. Click Add.
8. (Optional) Select a user type from the list in the User Type box.
9. Select an access level from the list in the Access box.
10. (Optional) Refine the access level by selecting or deselecting
additional access level privileges, if available.
11. (Optional) Select a role from the Roles box. The role displays a check
mark when selected.
12. Click OK to save your changes.
Application Security 18-11

Deploying Applications

4. Click Add.

Default ACL entries


A new database, by default, contains these entries in the ACL:

-Default-

Database creator user name

LocalDomainServers

OtherDomainServers

All of these entries, except for the database creators user name, are
group names. The -Default- group is the only group that is specific to a
database and not related to a group in the Domino Directory.
For more information on creating groups, see Administering the Domino
System.

-DefaultUsers and servers receive the access assigned to the -Default- group if
they have not specifically been assigned another access level, either
individually or as a member of a group, or from a wildcard entry. You
cannot delete the -Default- group from an ACL. The default access for
-Default- depends on the design of the database template and varies
among the different templates.
The access level you assign to the -Default- group depends on how
secure you want the database to be. Select No Access if you want a
database available to a limited number of users. Select Author or Reader
access to make a database available for general use. The User Type field
for -Default- should be set to unspecified.

Database creator user name


The database creator user name is the hierarchical user name of the
person who created the database. The default access for the user who
creates the database is Manager. Typically, this person retains Manager
access or is granted Designer access to the database.

LocalDomainServers
The LocalDomainServers group lists the servers in the same domain as the
server on which the database is stored. This group is created by default
with every Domino Directory. When you create a new database, the
default access for the LocalDomainServers group is Manager. The group
should have at least Designer access to allow replication of database design
changes across the domain. The LocalDomainServers group is typically
given higher access than the OtherDomainServers group.
18-12 Application Development with Domino Designer

OtherDomainServers
The OtherDomainServers group lists the servers outside the domain of
the server on which the database is stored. This group is created by
default with every Domino Directory. When you create a new database,
the default access for the OtherDomainServers group is No Access to
prevent a database from replicating outside the local domain.

Acceptable entries in the ACL


Acceptable entries in the ACL include:

Wildcard entries

User, server, and group names (including user and group names of
Internet clients)

Alternate names

LDAP users

Anonymous, which can be used for anonymous Internet user access


and anonymous Notes user access

Database replica IDs

Each entry can have a maximum of 255 characters.


Add names to the ACL in the hierarchical format assigned by the
Domino server administrator. For example:
For more information on creating hierarchical name schemes, see
Administering the Domino System.

Wildcard entries
To allow general access to a database, you can enter hierarchical names
with a wildcard character (*) in the ACL. You can use wildcards in the
common name and organizational unit components.
Users and/or servers who do not already have a specific user or group
name entry in the ACL, and whose hierarchical names include the
components that contain a wildcard, are given the highest level of access
specified by every one of the wildcard entries that match.
Here is an ACL entry in wildcard format:
*/Illustration/Production/Acme/US
This entry grants the chosen access level to:

Application Security 18-13

Deploying Applications

Sandra E Smith/West/Acme/US

Mary Tsen/Illustration/Production/Acme/US
Michael Bowling/Illustration/Production/Acme/US
This entry does not grant the chosen access level to:
Sandy Braun/Documentation/Production/Acme/US
Alan Nelson/Acme/US
You can use a wildcard only at the leftmost portion of the ACL entry.
When you use a wildcard ACL entry, set the user type in the ACL as
Unspecified, Mixed Group, or Person Group.

User names
You can add to an ACL the names of any individuals with certified Notes
user IDs or Internet users who authenticate using name-and-password or
SSL client authentication.

For Notes users, enter the full hierarchical name for each user for
example, John Smith/Sales/Acme regardless of whether the user
is in the same hierarchical organization as the server that stores the
database.

For Internet users, enter the name that appears as the first entry in
the User name field of the Person document. You can enter multiple
alias names in the User name field, but the first entry is used to
perform the security authorization check so it is the first entry that
should be used on all Domino ACLs that is, server file and
database ACLs.

For more information on database access for anonymous Internet users,


see the topic Anonymous access later in this chapter.
For more information on setting a maximum level of access for Internet
users, see the topic Maximum Internet name-and-password access
later in this chapter.

Server names
You can add server names to an ACL to control the changes a database
receives from a database replica. To ensure tighter security, use the full
hierarchical name of the server for example, Server1/Sales/Acme
regardless of whether the name of the server being added is in a different
hierarchical organization than that of the server that stores the database.

18-14 Application Development with Domino Designer

Group names
You can add a group name for example, Training to the ACL to
represent multiple users or servers that require the same access. Users
must be listed in groups with a primary hierarchical name or an alternate
name. Groups can also have wildcard entries as members. Before you can
use a group name in an ACL, you must create the group in the Domino
Directory or in an LDAP directory that has been configured for group
expansion in the Directory Assistance database.
Tip Use individual names rather than group names for the managers of
a database. Then when users choose Create - Other - Memo to Database
Manager, theyll know whom they are addressing.
Groups provide a convenient way to administer a database ACL. Using a
group in the ACL offers the following advantages:

You can add one group name instead of adding a long list of
individual names to an ACL,. If a group is listed in more than one
ACL, modify the group document in the Domino Directory or the
LDAP Directory, rather than add and delete individual names in
multiple databases.

You can change the access level for several users or servers at the
same time.

You can use group names to reflect the responsibilities of group


members or the organization of a department or company.

Terminations group
When employees leave an organization, the Domino administrator
should remove their names from all groups in the Domino Directory and
add them a terminations group, which is denied access to servers. Work
with your server administrator to make sure that the names of
terminated employees are removed from the ACLs of all databases in
your organization. Make sure that the terminations group is added to the
ACLs and that the group is assigned No Access.
You can also use the Deny Access group for this purpose. The Deny
Access group contains the names of Notes users who no longer have
access to Domino servers. When you delete a person from the Domino
Directory, you have the option to Add deleted user to deny access
Application Security 18-15

Deploying Applications

Tip You can also use groups to let certain users control access to the
database without giving them Manager or Designer access. For example,
you can create groups in the Domino Directory for each level of database
access needed, add the groups to the ACL, and allow specific users to
own the groups. These users can then modify the groups, but they cant
modify the database design.

group, if such a group has been created. (If no such group exists, the
dialog box displays No Deny Access group selected or available.)
For more information on the Deny Access group, see Administering the
Domino System.

Alternate names
An alternate name is an optional alias name that an administrator assigns
to a registered Notes user, often to publish a name in two different
character sets, such as English and Kanji. You can add alternate names to
an ACL. An alternate name provides the same level of security as the
users primary hierarchical name. An example of a user name in alternate
name format is Sandy Smith/ANWest/ANSales/ANAcme, where AN is
an alternate name.

LDAP users
You can use a secondary LDAP directory to authenticate Web users. You
can then add the names of these Internet users to database ACLs to
control user access to databases.
You can also create groups in the secondary LDAP directory that include
the Internet user names and then add the groups as entries in Notes
database ACLs. For example, an Internet user may try to access a
database on a Domino Web server. If the Web server authenticates the
user, and if the ACL contains a group named Web, the server can look
up the Web users name in the group Web located in the foreign LDAP
directory, in addition to searching for the entry in the primary Domino
Directory. Note that for this scenario to work, the Directory Assistance
database on the Web server must include an LDAP Directory Assistance
document for the LDAP directory with the Group Expansion option
enabled. You can also use this feature to look up the names of Notes
users stored in foreign LDAP directory groups for database ACL
checking.
When you add the name of an LDAP directory user or group to a
database ACL, use the LDAP format for the name, but use a forward
slash (/), rather than a comma (,), as a delimiter. For example, if the
name of a user in the LDAP directory is:
uid=Sandra Smith,o=Acme,c=US
enter the following in the database ACL:
uid=Sandra Smith/o=Acme/c=US

18-16 Application Development with Domino Designer

To enter the name of a non-hierarchical LDAP directory group in an


ACL, enter only the attribute value, not the attribute name. For example,
if the non-hierarchical name of the LDAP group is:
cn=managers
in the ACL enter only:
managers
To enter the name of a hierarchical group name, include LDAP attribute
names in ACL entries. For example, if the hierarchical name of the group
is:
cn=managers,o=acme
in the ACL enter:
cn=managers/o=acme
Note that if the attribute names you specify correspond exactly to those
used in Notes cn, ou, o, c the ACL wont display the attributes.
For example, if you enter this name in an ACL:
cn=Sandra Smith/ou=West/o=Acme/c=US
because the attributes correspond exactly to those used by Notes, the
name appears in the ACL as:
Sandra Smith/West/Acme/US

Application Security 18-17

Deploying Applications

Anonymous access
Anonymous database access is given to Internet users and to Notes users
who have not authenticated with the server. You can control the level of
database access granted to an anonymous user or server by entering the
name Anonymous in the access control list, and assigning an appropriate
level of access. Typically you assign Anonymous users Reader access to a
database.

The table below describes different ways that an anonymous user can
access a database:
Access specified

Anonymous access enabled


for Internet protocol

Anonymous access not


enabled for Internet protocol

Anonymous access
enabled in database
ACL

Users access the database


with the Anonymous
entrys access level. For
example, if Anonymous
access is set to Reader,
anonymous users who
access the database have
Reader access.

Users are prompted to


authenticate when they
attempt to access any
resource on the server. If
the user is not listed in the
database (through a group
entry, a wildcard entry, or
if the user name is
explicitly listed), then the
user accesses the database
with the -Default- entrys
access level.

Anonymous not listed Anonymous users access


the database with the
in database ACL
-Default- entrys access
level. For example, if
-Default- access is set to
Reader, and there is no
Anonymous entry in the
ACL, anonymous users
who access the database
have Reader access.
Anonymous assigned
No Access in
database ACL
Read and write public
documents privileges
should be disabled

Users will be prompted to


authenticate when they
attempt to access this
database. When
authenticated they will be
granted the appropriate
access level assigned in
the ACL.

Anonymous users (both those who are given access to a database


through the Anonymous entry and those who have access through the
-Default- entry) who try to do something that is not allowed for their
access level will be prompted to authenticate. For example, if
Anonymous is set to Reader, and an anonymous user tries to create a
new document, that user is prompted to authenticate with a name and
password.
Tip If you want all users to authenticate with a database, make sure that
Anonymous is in the database ACL with an access level of No Access,
and add the Internet users name to the ACL with the level of access you
want the user to have. You should also be sure that the Read Public
Documents and Write Public Documents privileges are not enabled in
the database ACL.
18-18 Application Development with Domino Designer

The Domino server uses the group name Anonymous solely for access
control checks. For example, if Anonymous has Author access in the
database ACL, the true name of the user appears in the Authors field of
documents the user creates in the database. The Domino server can
display only the true name of anonymous Notes users, but not of
anonymous Web users, in the Authors field of the document. Authors
fields are never a security feature, regardless if anonymous access is
used; if the validity of the authors name is needed for security, then the
document should be signed.

Replica IDs
To allow an agent in one database to use @DbColumn or @DbLookup to
retrieve data from another database, enter the replica ID of the database
containing the agent in the ACL of the database containing the data to be
retrieved. The database containing the agent must have at least Reader
access to the database containing the data to be retrieved. Both databases
must be on the same server. An example of a replica ID in a database
ACL is 85255B42:005A8fA4.
If you do not add the replica ID to the access control list, the other
database can still retrieve data if the -Default- access level of your
database is Reader or higher.
To determine the replica ID of a database, choose File - Database Properties, and click the Info (i) tab. Or choose File - Database - Design
Synopsis, and select Replication.

Order of evaluation for ACL entries


ACL entries are evaluated in a specific order to determine the access
level that will be granted to an authenticated Notes user trying to access
the database.

Application Security 18-19

Deploying Applications

To add a replica ID to the ACL


Type or copy and paste the replica ID from the Design Synopsis dialog
box into the ACL or type the replica ID you get from the info (i) tab of the
Database properties box. You can type the replica ID in uppercase or
lowercase characters, but do not enclose it in quotation marks.

The ACL first checks the user name to see if it matches any of the
ACL entries. The ACL checks all matching user names. For example,
Sandra E Smith/West/Acme would match the entries Sandra E
Smith/West/Acme/US and Sandra E Smith. In the event that two
different entries for an individual have different access levels (for
example, applied at different times by different administrators), the
user trying to access the database would be granted the highest
access level, as well as the union the access privileges of the two
entries for that user in the ACL.

If no match is made on the user name, the ACL then checks to see if
there is a group name entry that can be matched. If an individual
trying to access the database happens to match more than one group
entry for example, if the person is a member of Sales and the two
group entries for Sales are Sales/West/Acme and Sales/Acme
then the individual is granted the highest access level, as well as the
union of the access privileges of the two entries for that group in the
ACL.

If no match is made on the group name, the ACL then checks to see if
there is a wildcard entry that can be matched. If the individual trying
to access the database happens to match more than one wildcard
entry, the individual is granted the highest access level, as well as the
union of the access privileges of all the wildcard entries that match.

If no match can be made from among the database ACL entries, the
individual is granted the level of access defined for the -Defaultentry.

User types in the ACL


A user type identifies whether a name in the ACL is for a person, server,
or group. When you assign a user type to a name, you specify the type of
ID required for accessing the database with that name. The user types are
Person, Server, Mixed Group, Person Group, Server Group, and
Unspecified. The -Default- group in the ACL is always assigned
Unspecified as the user type.
User types provide additional security for a database. For example,
assigning the Person user type to a name other than unspecified
prevents an unauthorized user from creating a Group document with the
same person name, adding his or her name to the group, and then
accessing the database through the group name.
Designating a name as a Server or Server Group prevents a user from
using the server ID at a workstation to access a database on the server. Be
aware, though, that designating a name as a Server or Server Group is
18-20 Application Development with Domino Designer

not a foolproof security method. It is possible for a user to create an


add-in program that acts like a server and uses a server ID to access the
server database from a workstation.
Instead of manually assigning a user type to each name, you can
automatically assign a user type to all unassigned names in the ACL. The
user type assigned to each name is determined by the Domino Directory
entry for that name. Using this method, a group is always designated as
Mixed Group, and not as a Person Group or a Server Group. To assign a
Person Group or Server Group to a name, you must select the name and
manually assign that user type.
To manually assign a user type to a name
1. Make sure that you have Manager access in the database ACL.
2. Select the database icon from your Bookmarks pane.
3. Choose File - Database - Access Control.
4. Select a name to which you want to assign a user type.
5. Select a user type and click OK.

To automatically assign user types to unspecified users


1. Make sure that you have Manager access in the database ACL.
2. Select the database icon from your Bookmarks pane.
3. Choose File - Database - Access Control.
5. Click Look Up User Types for Unspecified Users.
6. Click OK.

Enforcing a consistent access control list


You can ensure that an ACL remains identical on all database replicas on
servers, as well as on all local replicas that users make on workstations or
laptops.
Select the Enforce a consistent Access Control List setting on a replica
whose server has Manager access to other replicas to keep the access
control list the same across all server replicas of a database. If you select a
replica whose server does not have Manager access to other replicas,
replication fails because the server has inadequate access to replicate the
ACL.

Application Security 18-21

Deploying Applications

4. Click the Advanced icon.

If a user replicates a database locally, the database ACL recognizes that


users access as it is known to the server. This happens automatically for
local replication, regardless of whether Enforce a consistent Access
Control List is enabled.
Note Local replicas with Enforce a consistent Access Control List
enabled attempt to honor the information in the ACL and determine who
can do what accordingly. However, they have some limitations. One
limitation is that group information is generated on the server, not at the
local replica. When a database is replicated locally, information about the
group membership of the person doing the replication is stored in the
database for use in ACL checking. If a person/identity other than the one
doing the replication accesses the local replica, there will be no group
membership information available for that person, and the ACL can use
only the persons identity, not group membership, to check access.
Additionally, enforcing a consistent access control list does not provide
security for local replicas. To keep data in local replicas secure, encrypt
the database on the Database Basics tab of the Database properties box.
Note If a user changes a local or remote server database replicas ACL
when the Enforce a consistent Access Control List option is selected,
the database stops replicating. The log (LOG.NSF) records a message
indicating that replication could not proceed because the program could
not maintain a uniform ACL on replicas.

To enforce or disable a consistent access control list


Use this method to enforce or disable a consistent ACL for a single
database.
1. Make sure that you have Manager access in the database ACL.
2. Select the database icon from your Bookmarks pane. If the database
has multiple replicas, select the database icon from a server that has
Manager access in the database ACL of the other replicas.
3. Choose File - Database - Access Control.
4. Click Advanced.
5. Do one of the following:
To enforce a consistent ACL, select Enforce a consistent Access
Control List across all replicas of this database.
To disable a consistent ACL, deselect Enforce a consistent Access
Control List across all replicas of this database.
6. Click OK.

18-22 Application Development with Domino Designer

Displaying the ACL history


You can display a chronological history of changes made to a database
ACL. Each entry in the list shows when the change occurred, who made
the change, and what changed. The history stores only 20 lines of
changes, not the complete history.
1. Select the database icon from your Bookmarks pane.
2. Choose File - Database - Access Control.
3. Click Log.
4. Select a line of log history. To see the complete text of the log history,
look in the field at the bottom of the dialog box.
5. (Optional) Click Copy to copy the ACL history to the clipboard so
that you can paste it in a document.

To display a name's effective access


The effective access a person, server, or a group has to documents in a
database is not always apparent. For example, if there are two groups
with different levels of access to documents, and someone is a member of
both groups, you may wonder what access the person actually has. You
can determine a persons effective access to the documents from the
ACL.
2. Click Effective Access.
3. From the Effective Access dialog box, select the name of the person,
server, or and press Enter or click Calculate Access.
Database Access is derived from in the top left of the dialog box
shows the selected names effective database access as determined by
the database ACL.
The checked boxes on the lower left of the dialog box indicate the
access rights for the selected name.
The Groups and Roles boxes on the right of the dialog box show
all the individual and group name entries and roles that could
potentially control the selected names access to the selected
document. If the person, server, or group is not in the ACL, the
Groups box displays the group used to determine the effective
access.
4. After you review the effective access for the selected name, click
Done.
Application Security 18-23

Deploying Applications

1. Select a database and choose File - Database - Access Control.

Its possible to assign users or servers more than one level of access to a
database. The following table describes the order of precedence for
competing access levels.
Access level conflict

Resolution

A name is listed in an ACL


individually and as a member of a
group

The access level assigned to the


individual name takes precedence over
the access level for the group, even if the
individual access level is lower than the
group level.

A name is included in two or more


groups

The name receives the access of the


group with the highest access.

A name appears in an ACL and in


access lists associated with forms,
views, or sections

The ACL controls database access;


design element access lists refine this
access to a lower level. For example, if a
user has Author access to a database but
is not listed in the access list for a form in
the database, the user cannot use the
form to create a document.

Security overview for Web applications


When you set up database access, you must make special provisions for
Internet users. See the following topics for information about setting up
and controlling the access that Internet users have to a database:
Application access for Web users
Enforcing encrypted Web transactions using SSL
Maximum Internet and password access
Examples of ACL setting for a Web database

Application access for Web users


The Advanced section of the ACL lets you specify a maximum access
setting for Internet users who are authenticated with Basic authentication
(that is, name and password, and also with Sessions-based authentication
for HTTP only). You can limit access to what you specify as the
Maximum Internet name & password access. The Maximum Internet
name & password access field does NOT apply to Internet users
authenticated using Secure Socket Layer (SSL) Client certificates. These
users have the full access granted to them in the ACL.
18-24 Application Development with Domino Designer

For information on setting up SSL, see Enforcing encrypted Web


transactions using SSL, later in this chapter.
Using Java technologies, you can share code with and link to WebSphere
applications. Single Sign-On (SSO) a shared authentication service
allows for further seamless integration between Domino and WebSphere
applications. For information on Single Sign-On, see Administering the
Domino System.

Default logout time period


You can specify a default logout time period to log the Web client off the
server after a specified period of inactivity. This forces the cookie that
Domino uses to track the user session to expire. Automatically logging a
user off the server prevents others from using the Web client to
impersonate a user if the user leaves the workstation before logging off.
If you enable session-based name-and-password authentication for a
server, users can also append ?logout at the end of a URL to log off a
session for example:
"http://acmeserver/sessions.nsf?logout."http://acmeserver/se
ssions.nsf?logout

You can also redirect the logout to a design element or URL. For
example:
"Http://acmeserver/sessions.nsf?logout&redirectto=/logoutDB.
nsf/logoutApp?Open"http://acmeserver/sessions.nsf?logout&red
irectto=/logoutDB.nsf/logoutApp?OpenPage

You can build this expression into an application for example, using it
in a button or type it in as a URL.

Enforcing encrypted Web transactions using SSL


The Secure Sockets Layer (SSL) is a security protocol that protects data
by encrypting it as it passes between servers and Web clients. SSL
provides communications privacy and authentication for Domino server
tasks that operate over TCP/IP. You can require users to access a
database using a secure SSL connection to a single database or to all
databases on a server. A common use for this type of added security
occurs in an e-commerce application in which Web users enter
confidential information such as credit card numbers.

Application Security 18-25

Deploying Applications

Http://acmeserver/sessions.nsf?logout&redirectto=http://www.
sales.com

If you do not require an SSL connection, clients can use either SSL or
TCP/IP to connect to the server.
The server administrator enables the SSL port in either the Internet Site
document or the Server document of the Domino Directory. Then, to
protect transactions in individual databases for example, in databases
used for commercial transactions the database designer assigns the
database property Web Access: Require SSL Connection.
For more information on SSL certificates, see Administering the Domino
System.
Note that the server administrator actually has three options in allowing
access over the SSL port:

With anonymous access over the SSL port Web users can connect
to the server using the SSL port, however, the server allows
anonymous users.

With name and password access Web users connect to the server
over the SSL port, and authenticate using name and password.

With access through client certificates Web users have been issued
an X.509 client certificate and connect to the server over the SSL port.
They are authenticated using this client certificate.

To require an SSL connection to a database


1. Make sure you have Manager access in the database ACL.
2. Select the database icon from the bookmarks page.
3. Choose File - Database - Properties.
4. On the Basics tab, choose Web access: Require SSL connection.
For more information, see Administering the Domino System.

Maximum Internet name-and-password access


Users who have Internet or intranet browser access to a database cannot
be identified by Notes in the same way Notes users are identified. Use
the Maximum Internet name & password access setting in the ACL to
control the maximum type of access that Internet or intranet browser
users have to a database. The list of available access levels mirrors the
standard access levels for Notes users.
This setting applies to users who use name-and-password authentication
or access the server anonymously over the Internet and connect to
servers using either the TCP/IP port or the SSL port. This setting does
not apply to users who have SSL client certificate IDs and who access the
18-26 Application Development with Domino Designer

database over the Internet on the SSL port. Users with SSL client access
receive the level of access specified in the database ACL.
Add an entry for the group Anonymous to the database ACL, if
appropriate for this database. Then select the maximum access level you
want to assign to all Internet and intranet users who use
name-and-password authentication for a particular database. Users who
access a Notes database over the Internet, either anonymously or by
using name-and-password authentication, never have an access level
higher than what is specified as the Maximum Internet name &
password access level.
Caution The Maximum access level overrides the access level that a
user may have been explicitly given in the database ACL.
For example, a user, Sandra Smith/West/Sales/Acme, can use a name
and password to access a server using a Web browser. If Sandra
Smith/West/Sales/Acme is assigned Editor access in the ACL and the
Maximum Internet name & password access setting is Reader, the
lower of the two access levels applies and Sandra is allowed only Reader
access. Similarly, if Sandra Smith/West/Sales/Acme is assigned Reader
access in the ACL and the Maximum access setting is Editor, Sandra is
allowed only Reader access. If Sandra Smith also uses a Notes client to
access the database, the Maximum access setting is ignored and Sandra
is allowed Editor access.
The default for this option is Editor access. Tasks such as creating folders,
views, and agents, do not apply to Internet users.

To select the maximum Internet name and password


Use this method to select the maximum Internet name-and-password
access for a single database.
1. Make sure that you have Manager access in the database ACL.
2. Select the database icon from your bookmarks page.
3. Select File - Database - Access Control.
4. Click Advanced.
5. Select the maximum access level from the list next to the field
Maximum Internet name & password.
6. Click OK.

Application Security 18-27

Deploying Applications

Tip You can use this setting to prevent Internet users from accessing the
database using name-and-password authentication. By setting it to No
Access, the database is accessible only to Notes users or Internet users
who authenticate using SSL client certificates.

Examples of ACL settings for a Web database


These are examples of ACL settings to use if you design an application
for Web users.

ACL for a high-security confidential database


Web user

Access level

-Default-

No Access
Do not select Read or Write
public documents privileges.

Anonymous

No Access
Do not select Read or Write
public documents privileges.

Authorized readers

Reader

Contributors

Author

Supervisors

Editor

Maximum Internet name & password access

Reader

ACL for a medium-security project database


Web user

Access level

-Default-

Reader

Anonymous

No Access
Do not select Read or Write
public documents privileges.

Authorized readers

Reader

Project team members

Editor

Maximum Internet name & password access

Editor

ACL for a low-security informational database


Web user

Access level

-Default-

Reader

Anonymous

Reader

Contributors

Author

Supervisors

Editor

Maximum Internet name & password access

Editor

18-28 Application Development with Domino Designer

ACL for a low-security discussion database


Web user

Access level

-Default-

Author

Anonymous

Author

Supervisors

Editor

Maximum Internet name & password access

Editor

Application design element security


An application developer can restrict access to design elements within an
application. Application design security takes effect when users gain
access to an application.
To

Read access lists for


views

Specify which Notes and Internet users can see a


view.

Read and Edit access


lists for folders

Specify which Notes and Internet users can see a


folder or update the contents of a folder.

Read and Edit access


lists for forms

Specify which Notes and Internet users can create,


modify, or read documents created with a form.

Readers and Authors


fields

Specify which Notes and Internet users can create,


modify, or read specified documents.

Signed fields

Verify that the Notes user who originated the data is


the author and that no one has tampered with the
data.

Encrypted fields

Control which Notes users can access a field in a form.


Encryption is not supported in Web applications.

Hidden fields

Control which Notes and Internet users can access a


field in a form.

Read and Edit access


lists for sections

Specify which Notes and Internet users can access a


section in a document.
Restrict who can create agents and where the agents
can run.
Secure the design of a database to prevent users from
changing design elements.

For information on restricting agents, see the chapter, Automation in


Applications.

Application Security 18-29

Deploying Applications

Create

Controlling access to a database during design


Every database has an access control list (ACL) that defines who has
access to the database and describes the activities they can perform.
While you are designing the database, strictly limit access so that only
you and other designers have access to the database. When the database
is ready to be released, you can adjust access control settings to provide
general access to the application.
When you create a database, you are assigned as the Manager of that
database by default. This gives you complete access rights. You can then
designate others as designers so they can contribute to the design.

To keep a database private during development


1. Select the database and choose File - Replication - Settings.
2. Click Other and select Temporarily disable replication.
3. Click OK.
4. Choose File - Database - Properties and click the Design tab.
5. Deselect List in Database Catalog.
6. Deselect Show in Open Database Dialog.
For more information on access control, see The database access control
list.

Restricting who can read or edit documents


To restrict who can read documents, add a Readers field to a form. To
restrict who can edit a document, add an create, add an Authors field to
a form, which allows only users who have Author access in the ACL to
edit the documents they create.
Note Readers and Authors fields take effect only when the database is
on a server. If you develop a database locally, you cant test this feature
until you copy the database to a server.

Using a Readers field to restrict access to specific documents


To limit access to specific documents created from a form, include a
Readers field on the form. A Readers field explicitly lists the users who
can read documents created from the form. Without Reader access to a
document, a user cannot see the document in a view. For example, to
limit access to an employees personnel file to members of the Human
Resources department, the employee, and the employees manager, list
those people in a Readers field.
18-30 Application Development with Domino Designer

If a form has a read access list, names from the Readers field are added to
the access list. Otherwise, the Readers field controls access to documents
created from the form.
Entries in a Readers field cannot give a user more access than what is
specified in the database access control list (ACL); they can only further
restrict access. Users who have been assigned No Access to a database
in the ACL can never read a document, even if you list them in a Readers
field. On the other hand, users with Editor access or above in the ACL
can be restricted from reading documents if they arent included in a
Readers field.
Any users who have Editor (or higher) access to the database can read
and edit a document if one of the following is true:

They are listed in the forms Read access list or Readers field.

The form has no Read access list restrictions or no Readers field.

For information on creating a Readers field, see To create Readers and


Authors fields later in this chapter.
For information on updating Readers fields, see Administering the Domino
System.

Using an Authors field to restrict who can edit specific documents

Entries in an Authors field cannot override the database ACL; they can
only refine it. Users who have been assigned No Access in an ACL can
never edit a document, even if you list them in an Authors field. Users
who already have Editor (or higher) access in the ACL are not affected by
an Authors field. Authors fields affect only users who have Author
access in the ACL.
You must enter the users full hierarchical name in the Authors field.

If you manually enter a name in the Authors field, Domino expands


and stores, for example, John Smith/ACME/West is stored as
(CN=John Smith/OU=ACME/O=West) in its hierarchical form. The
name displays in its abbreviated form.

If you programmatically enter a name, you must use the full


canonical form such as CN=John Smith/OU=ACME/O=West.

Application Security 18-31

Deploying Applications

An Authors field works in conjunction with Author access in the


database ACL. If you assign users Author access in the ACL, they can
read documents in the database but cannot edit their own documents. If
you list those users in an Authors field, they can edit documents in the
database.

For information on creating an Authors field, see To create Readers and


Authors fields later in this chapter
For information on updating Authors fields, see Administering the Domino
System.

To create Readers and Authors fields


Restrict Read access to documents by creating Readers and Authors
fields as follows.
1. Open the form in Designer.
2. Create a field, or click an existing field. Then choose Design - Field
Properties.
3. On the Field Info(i) tab, select Readers or Authors as the type, and
then:
Select Editable to allow authors and editors to modify the list. (Be
sure to include yourself in the default value formulas, which you
create in the Script area of the Programmers pane so there is at
least one value.)
Select Computed to write a formula that computes the reader or
author names.
Writing formulas for Readers and Authors fields
When you write a formula for a Readers or Authors field, enclose
user names and group names in quotation marks.
"Marketing"

Select Allow multi-values for a field that stores a text list with
multiple names. Concatenate the names in the formula with a
colon.
"Mary Sen":"Marketing":"Joyce O'Connor"

Place quotation marks and square brackets around role names that
qualify access levels.
"[Scheduling Committee]"

4. To create editable or computed field values, click the Programmers


pane, select a formula type, and write the formula; click the green
check mark to save the formula.
Note Include server names in the formula if the database will
replicate.
5. On the Control tab, choose one of the following options to generate a
list of readers or authors from which users can select.

18-32 Application Development with Domino Designer

Note Unless None is selected as the lookup option for a Readers


or Authors field, users press either CTRL+ENTER or, if specified for
the field, the entry helper button to see a list of possible entries. If the
Readers field is located inside a layout region, leave None selected;
other lookup options do not apply.
Use None to rely on a formula or on authors to create the list of
names. Select Look up names as each character is entered to
speed up typing in editable fields. Domino fills in the first name
that matches the characters the user types.
Use Address dialog box for choices to display the Names dialog
box so users can select names from a Personal Address Book or
from the Domino Directory. Select Look up names as each
character is entered to help users fill in a name quickly and
Designer looks up a match.
Use access control list for choices to display a list of people,
servers, groups, and roles in the ACL.
Use View dialog box for choices to display a dialog box containing
entries from a column in a Designer database view. Select the
database to look up, select a view, and select a column number.
6. (Optional) On the Field Info tab, select Allow multi-values to allow
more than one name to be stored in the field.

8. Save and close the form.


Note When you specify names for reader and author fields, use the full
hierarchical name for each user if there is a chance this database will be
copied or replicated to another domain. Within a domain, an
abbreviated, or common name, is sufficient for user authentication, but
between domains, you must supply the full hierarchical name or
authentication will fail.

Examples of restricting who can read or edit specific documents


The following examples illustrate how to use Readers fields and Authors
fields.
Adding a Readers field to a form
To ensure that employees can read only their own Employee Information
documents. Create a computed-when-composed Readers field named
AuthorizedReader that uses this formula:
@UserName

Application Security 18-33

Deploying Applications

7. (Optional) On the Control tab, select Allow values not in list to let
users enter additional names. This property is applicable only to
Address and Access Control List choices.

To add additional authorized readers, create a read access list in the


Document Properties box for individual documents.
Adding an Authors field to a form
To use an Authors field on a Slide Show form to let the Production group
edit documents, and to save and display the original authors name for
each, you create two fields.
To display the creators name, create a computed-when-composed field
called CreatedBy and use the formula:
@Name([CN];@UserName)

To allow the Production group to edit Slide Show documents, create a


computed Authors field and use the formula:
"Production"

Allowing authors to add other names


To let authors and editors customize the Authors list, create an editable
Authors field that uses View access control list dialog to present
choices, and select Allow multi-values for the field.

Tracking who edits a document


If a document contains an Authors field, Designer automatically stores
the names of the users who have edited that document in an internal
field called $UpdatedBy. Servers involved in replication are not
considered editors, so theyre not tracked in this list.
To display the contents of the $UpdatedBy field, users can click and hold
the cursor on the Authors field in a document theyre reading. Designer
displays a pop-up list of everyone who has modified the document,
including people who did so through agents. Adding pop-up text to the
field label helps users understand the list.
If a form is assigned the Anonymous form property, its documents do
not contain an $UpdatedBy field; instead, the documents contain an
$Anonymous field with a value of 1.

18-34 Application Development with Domino Designer

Updating Readers and Authors fields


By default, the Administration Process examines all documents in a
database to find and update Readers and Authors fields and to update
private views, folders, and agents. When the Administration Process
performs a Rename person or a Delete person request, it edits or
removes the name in all Readers and Authors fields and in private
folders, views, and agents. To update Readers and Authors fields in only
selected documents, you create a special view in the database and then
update that view.
You must select an administration server if you want to select the option
to modify Readers and Authors fields. The default is to not modify
Readers and Authors fields.

To update Readers and Authors fields in all documents


Use this method to modify Readers and Authors fields for a single
database.
1. Make sure that you have:
Manager access in the database ACL
already specified an administration server for the database.
2. Select the database icon from your Bookmark pane.
3. Choose File - Database - Access Control.
5. Below Administration Server, select Server.
6. Select an administration server, and then click OK.
7. Select Modify all Reader and Author fields from the list below
Administration Server.
8. Click OK.

To update Readers and Authors fields in selected documents


1. Create a new view in the database and name the view $Adminp.
2. Write a view selection formula that selects and displays only the
documents containing the fields to update.
3. Select the database icon from your Bookmark pane.
4. Choose File - Database - Access Control.
5. Click the Advanced icon.
6. Below Administration Server, select Server.
7. Select an administration server, and then click OK.
Application Security 18-35

Deploying Applications

4. Click the Advanced icon.

8. Select Modify all Reader and Author fields from the list below
Administration Server.
9. Click OK.
For more information on the Administration Process (adminp), see
Administering the Domino System.
For more information on creating views and writing view selection
formulas, see Creating a standard view.

Setting up the Administration Process for databases


To use the Administration Process (adminp) to update and manage
names in an ACL and in Readers and Authors fields, you must assign an
administration server to the database.
1. Make sure that you have Manager access in the database ACL.
2. Select the database icon from your Bookmark pane.
3. Choose File - Database - Access Control.
4. Click the Advanced icon.
5. Below Administration Server, select Server.
6. Select an administration server from the list, and click OK.
Note When Notes users create databases, they can specify the
administration server for their databases on the Advanced panel of the
database ACL. The database ACL list is automatically updated when the
adminp process is run on the specified administration server.
For more information on the Administration Process (adminp), see
Administering the Domino System.

Creating controlled-access sections of forms


You can control access to parts of documents by creating
access-controlled sections on forms that allow specified users to see
restricted parts of documents.
To create a controlled-access section
1. Highlight the text, fields, and other design elements on a form that
make up the section.
2. Choose Create - Section - Controlled Access.
3. (Optional) In the Section Properties box on the Section Title and
Border tab, edit the section title.
18-36 Application Development with Domino Designer

4. (Optional) Enter a Section Field Name.


5. (Optional) Choose a border style and border color for the section.
You can insert fields and other design elements into the section after
creating it. To append design elements to the bottom of the section, set
the border style as a box. When you have finished appending design
elements, set the border style to no border.
To name the editors for a controlled-access section
1. Click the section title.
2. Choose Section - Section Properties.
3. Click the Formula tab.
4. Select Editable as the section type to allow the document creator to
specify the section editors.
5. Select one of the Computed types to use a formula to define the
section editors.
6. (Optional for an editable field; Required for a computed field) In the
Properties box, write a formula to define who can edit the field, and
click the check mark.

To make a controlled-access section collapsible


1. Click the section marker and choose Section - Section Properties.
2. Click the Expand/Collapse tab and select options for showing the
section expanded or collapsed, depending on whether a document is
being previewed, printed, or opened.
3. On the same tab, click the For Editors list and select For
Non-editors. A list of options appears for displaying the section to
users who can read but not edit the section.
4. (Optional) Select Hide title when expanded if users who are
non-editors dont need to see the section title when the fields are
displayed.
5. Save and close the form.

Application Security 18-37

Deploying Applications

Note When you specify names for section editors, use the full
hierarchical name for each user if there is a chance this database will be
copied or replicated to another domain. Within a domain, an
abbreviated, or common name, is sufficient for user authentication, but
between domains, you must supply the full hierarchical name or
authentication will fail.

Examples of access-controlled sections


The following examples illustrate different uses for access-controlled
sections on forms.
Computing an editors list from the access control list
The status section of a Business Card Request form has a
controlled-access section whose formula allows only administrators (an
access role in the ACL) to change the status of a request. The formula for
the computed field is:
"[Business Card Administrators]"

Allowing the author to name section editors


An editable section of a Status Report form has a controlled-access
section whose default value formula always allows the author to edit the
status report. Users who have access to the document but are not the
author can read the section but cannot edit it.
"@Author"

The author can choose Section - Define Editors to name additional


editors for a particular status report.

Limiting Editor access to sections of forms


In workflow applications, use sections to restrict who can edit or sign
parts of a document. If a document requires more than one approval
signature, you create a section on the form for each signature or group.
For example, you might create a section specifically for the Purchasing
group.

Edit access lists and the access control list


To specify who can edit parts of a section, select the fields you want to
restrict and create a section containing the fields. Then specify who can
edit the fields in one of the following ways:

Let the author of the document choose who can edit the section.

Specify the users, groups, or roles who can edit the section.

For users who are not listed as editors of the section, the fields appear as
read-only. Editor access of the section does not override Editor access in
the database access control list (ACL); it only refines it. Privilege names
cannot be used in the Edit access list.
Tip If you use custom roles to refine standard access levels, consider
creating a section that corresponds to each access role. Then create a field
named RoleName at the top of the section.
18-38 Application Development with Domino Designer

Using a computed field to define section editors


To define a list of section editors, write a formula that populates the list
of allowed editors, by including the current users name, using
@DbColumn to retrieve a list of names, using the value of an approver
field, or using a group name or role from the ACL. Use a
computed-when-composed field to create a permanent list of editors
when a document is created.
You can use only formulas that result in a text list containing one or more
names; you can then append the names to the sections edit access list.
Enclose the names in quotation marks and concatenate them with a colon
( : ).
Mary Sen:Marketing Group
Access role names must include square brackets and be enclosed in
quotation marks:
[Scheduling Committee]
For information on using database lookups, see the Programming Guide.

Allowing the author to name section editors


To let authors decide who can edit fields in a section, make the section
editable.

An editable section allows the author of each document to create a


customized list of editors by double-clicking the section title when the
document is in Edit mode or choosing Section - Define Editors. Any users
already authorized to edit the fields within the section are displayed, and
the author can add other editors to the list.

Using a controlled-access section on multiple forms


To use a controlled-access section on more than one form, place the
section on a subform and include the subform in the forms.

Application Security 18-39

Deploying Applications

As a convenience to authors, write a default value formula to create an


initial list of editors for the section; anyone editing the section can then
update that list. If there are multiple authors, be sure to select Allow
multi-values for the field.

Creating read access lists to limit view and folder access


To allow some users and not others to see a view or folder, create a read
access list. Users who are excluded from the access list do not see the
view or folder on the View menu. A view or folder read access list is not
a true security measure. Unless the documents are otherwise protected,
users can create private views and folders that display the documents
shown in the restricted view. For greater security, use a read access list
for a form.
You can add users to the read access list for a view or folder as long as
they already have at least Reader access in the database access control
list.

To create a read access list


1. Open the view or folder.
2. Choose Design - View Properties or Design - Folder Properties.
3. Click the Security tab.
4. Deselect All readers and above.
5. Click each user, group, server, or access role you want to include. A
check mark appears next to each selected name.
6. Click the Person icon to add person or group names from a Personal
Address Book or from the Domino Directory.
7. To remove a name from the list, click the name again to remove the
check mark.
8. (Optional) Check Available to Public Access Users if you want this
view or folder available to users with public access read or write
privileges in the access control list for this database.
9. Save the view or folder.
Notes
Do not create a read access list for the default view of a database.

Servers that need to replicate a database need access to views that


are read-restricted so that view design changes can replicate.

Example of restricting access to a view


To improve the performance of the Technical Services, Rajeev Jain
designed a Tech Services Review form, which is included in the
companys custom Mail template. Each quarter, Rajeev sends a
company-wide memo asking people to complete a Tech Services Review
form and mail it to a Service Request Tracking database. In that database,
the reviews are displayed in the Tech Service Performance view.
18-40 Application Development with Domino Designer

Rajeev wants only his technicians and his own managers to have access
to this view. He defines a read access list for the Tech Service
Performance view. Then, because there is no group in the Domino
Directory for the people he wants to include in the access list, Rajeev
defines an access role called [TSMAnagers] in the database ACL, and
adds that role to the views read access list. The access role is stored
within the Service Request Tracking database; it is not added to the
Domino Directory.

Creating write access lists to limit folder access


To allow some users and not others to update the contents of a folder,
create a write access list for the folder. You can add users to a write
access list for a folder as long as the users already have at least Author
access in the database access control list. Users specified in the write
access list for the folder can move and copy documents into the folder
and can remove documents from the folder. With only Author access,
they cannot edit documents in the folder.
1. Select a database.
2. In the Design pane, click Folders.
3. Double-click the view or folder in the Work pane.
4. Choose Design - Folder Properties.
5. Click the Security tab.

7. Do any of the following:


Click each user, group, server, or access role you want to include.
A check mark appears next to each selected name.
Click the Person icon to add person or group names from a
Personal Address Book or from the Domino Directory.
To remove a name from the list, click the name again to remove
the check mark.
8. Save the folder.

Access-controlled forms and documents


To restrict access to all or part of a form, and to all documents created
from a form, you can create a form read access or a create access list.

Application Security 18-41

Deploying Applications

6. In the Contents can be updated by: section, deselect All Authors


and above.

Create access list


Use a create access list to limit who can access the form in order to create.
Limiting who can create documents from a form also shortens the create
menu by removing the restricted forms from the menu.

Read access list


Use a read access list to limit who can read documents created from a
form. For example, you might use a read access list to restrict access
containing personnel information.
The following people can read a document that has restricted Read
access:

Users assigned Read access in the form access list

Users listed in the forms Readers field


Readers field names are added to a documents read access list.

Users listed in the forms Authors field

Note When you use a form access list, you restrict access to all or part of
a form by setting security parameters that work with the database ACL.
The database ACL predominates only users with access to the
database have access to forms within a database. Form security provides
an additional measure of access control in conjunction with the database
access control list. However, note that using access-controlled forms is
not a true security measure because a user can create a copy of the form
and remove the restriction.

Replicating restricted documents


Adding names to a read access list or to a Readers field limits access to
the users, groups, and servers named in that list or field. Servers that
need to replicate this database must be included in the list or field to
have Read access. Otherwise, documents that are read-restricted wont
replicate.

To create access-controlled forms


1. Open the form.
2. Choose Design - Form Properties.
3. Click the Security tab.
4. Deselect All authors and above in the Who can create documents
with this form section.
5. Click each user, group, server, and access role you want to include.

18-42 Application Development with Domino Designer

6. Deselect All readers and above in the Default read access for
documents created with this form section.
7. Click each user, group, server, and access role you want to include.
8. (Optional) Check Available to Public Access users if you want
documents in this view or folder available to users with public access
read or write privileges in the access control list for this database.

To prevent printing, forwarding, and copying of documents


You can discourage users from printing, forwarding, or copying
documents created with a form. This feature helps to prevent accidental
distribution of confidential information, but it is not a true security
feature because users can circumvent it by using screen capture
programs.
1. Open the form.
2. Choose Design - Form Properties.
3. Click the Security tab.
4. Click Disable printing/forwarding/copying to clipboard.

To prevent editing of existing documents


You can prevent users with Author access in the database ACL from
editing a field in existing documents. This restriction doesnt apply to
new documents.
2. Create a field, or click an existing field.
3. In the Field Properties box, click the Advanced tab.
4. Select Security options: Must have at least Editor access to use and
click the check mark.

Creating public access pages, forms, subforms, outlines, views,


agents, and style sheets
The database ACL controls access to specific design elements, such as
pages, documents, forms, outlines, views, folders, and style sheets. Users
with No Access or Depositor access in the ACL cannot access the design
elements of a database. There are times, however, when you might want
to make design elements accessible to all users, regardless of access level.
To do so, you make the design elements available for Public Access.

Application Security 18-43

Deploying Applications

1. Open the form.

For example, public documents are necessary for calendar applications


where one user lets another user read or create appointments on his or
her behalf. To create the public documents for this application, you must
first create a public access form containing a public access field. Then you
create a public folder or view to display the document.
Note that you can also make manually run agents available for public
access.
To designate a page, form, or subform for public access
1. Open the page, form, or subform.
2. Choose Design - <design element> Properties.
3. Click the Security tab.
4. Select Available to Public Access Users.
5. On a form or subform, create a field.
6. In the Name field, enter $PublicAccess.
7. In the Type field, select Text and Computed when composed.
8. In the Programmers pane at the bottom of the form, enter 1 as the
default value for the field.
9. To hide this field from users, select the Field Hide When tab and
specify hide-when conditions.
To designate a view for public access
1. Open the view.
2. Choose Design - View Properties.
3. Click the Security tab.
4. Check Available to public access users if you want to make
documents in this view or folder available to users with public access
read or write privileges in the access control list for this database.
To designate an outline for public access
1. Open the outline
2. Choose Design - Outline Properties.
3. Check Available to public access users.
To create a style sheet for public access
1. Click Shared Resources - Style Sheets in the Design pane.
2. Highlight a style sheet and choose Resource - Resource Properties.
The Style Sheet Resource Properties box appears.
3. Select the Security tab and check Available to public access users.

18-44 Application Development with Domino Designer

To create an agent for public access


1. Open the agent in Designer.
2. Click Options.
3. Select Available to Public Access Users.

Notes and Domino encryption


Encryption is a digital security mechanism that protects data from
unauthorized access. Encryption protects data from unauthorized access.
Using Notes and Domino, you can encrypt:
Messages sent to other users. Then an unauthorized user cannot read
the message while it is in transit or in the recipients mail file. You
can also encrypt saved and incoming messages.

Network ports. Encrypting information sent between a Notes


workstation and a Domino server, or between two Domino servers,
prevents unauthorized users from reading the data while it is in
transit.

SSL transactions. Server administrators can use SSL to encrypt


information sent between an Internet client, such as a Notes client,
and an Internet server, to prevent unauthorized users from reading
the data while it is in transit.

Fields, documents, and databases. You can encrypt fields within a


document, an entire document, and local databases. Then only the
specified users can read the information.

For information on the first three items, see Administering the Domino
System.

Database encryption
Database encryption is designed to prevent unauthorized access to
locally stored databases and is not intended as a replacement for
field-level encryption. Database encryption provides an additional layer
of security because ACL settings do not protect locally stored databases.
Database encryption uses a public-key algorithm. Encryption generates a
random encryption key, encrypts this key with the public key associated
with a specific user ID, and appends the resulting key to the specified
database. A user can access an encrypted database only if the users
private key can decrypt the appended key. It is a good idea to encrypt

Application Security 18-45

Deploying Applications

local databases if they are stored on a portable computer, or if you share


your computer with other users.
You can also use local encryption to encrypt databases on a server with
the server ID. Then, only those Domino administrators with access to the
server ID can read the database.
Note When a user copies a database, the data remains encrypted
even if the database is copied at the operating system level. The
encrypted data is also safe from access by API programs.
Use the local encryption option from the Database Properties box to
encrypt databases on a workstation with a database owners user ID, and
to encrypt databases on a server with a server ID. To encrypt a local
database after the initial creation of the database or replica, you or the
server administrator must first compact the database.

Encryption levels
When you encrypt a database, you must select one of the following
encryption levels: simple, medium, or strong. The stronger the
encryption, the longer it takes to open a database.

Use simple encryption when security needs are not great. It is


enough to deter casual snooping.

Choose medium encryption (default) to balances security, strength,


and fast database access.

Use strong encryption when security requirements are paramount,


and the resulting database access performance is acceptable.

For more information on encryption, see Administering the Domino


System.

To encrypt a database
You must have Manager access in the database ACL to encrypt a
database.
1. Select the database icon from your Bookmark pane, and select File Database - Properties.
2. Click the Database Basics tab, and then click Encryption Settings.
3. Choose Locally encrypt this database using, and then choose an
encryption level:
Simple
Medium (default)
Strong
18-46 Application Development with Domino Designer

4. Click For and then choose a single ID to use to encrypt the


database. Remember to choose the ID of the person who needs access
to the database.
5. Compact the database
The encryption does not actually take place until you close and
reopen the database.
Note You can choose an encryption level when you create a new
database or database replica. By default in Notes 6, new replicas created
locally are encrypted with medium encryption. You can change the
default encryption settings in File - Preferences - User Preferences Replication.

Encrypting documents and fields


A document is considered to be encrypted if it is created from a form that
contains one or more encrypted fields. Each encrypted field is linked to a
key that encrypts the contents of the field. An encryption key can be
secret that is, a key that you must send to users in order for them to
decrypt a field or public that is, a key that is already in a users ID
file and in the users Person document where it is publicly available.

Public key and secret key encryption

Domino Designer also supports secret key encryption that you can use
for encrypting fields in documents. You can create and name secret keys
and then distribute the secret keys to users so that they can decrypt the
protected data. Secret keys, like public keys, are stored in a users ID.
Applications reference the keys by their names in a special field called
SecretEncryptionKeys. When a document is saved, the keys named in
this field are retrieved from the users ID file, and all fields marked with
a special property are encrypted with those keys.
Caution Both public and secret keys are stored in your user ID file.
Remember to securely back up your ID file each time you add a key.
Application Security 18-47

Deploying Applications

Notes uses public key encryption for electronic mail, and Domino
Designer also lets you use public key encryption for encrypting fields in
documents. Every user has a unique public key associated with their user
name and stored in their user ID. Applications reference the keys by the
users names in a special field called PublicEncryptionKeys. When a
document is saved, all the user names in this field are located in the
Domino Directory or the users personal address book, the
corresponding keys are retrieved, and all fields marked with a special
property are encrypted with those keys.

Note Web users cannot see encrypted fields with a browser. To see the
data, Web users must reopen a document with a Notes Client or ask the
sender for a copy that is not encrypted.

Document encryption
If you are planning to use secret encryption keys rather than encrypting
with a public key, create the secret key before you encrypt a document.
You can encrypt documents with keys in several ways:

Using public keys. You can encrypt documents with public keys on
IDs so that only users with those IDs can read the documents. To do
this, you enter one or more names in the Public Encryption keys field
on the Security tab in the Document Properties box.

Using a form property. Database designers can use a form property


to add one or more keys to a form. Every document created with the
form will be encrypted using the encryption keys.

Using the Database/Document Properties box. Users can use the


Database/Document Properties box to encrypt one or more
documents with their own encryption keys stored in their ID files. To
use the properties box to encrypt documents, the form must contain
a field that can be encrypted.

Using the SecretEncryptionKeys field. The SecretEncryptionKeys


field can contain either the name of a key, which is automatically
used to encrypt documents, or the field can be blank, allowing users
to assign the encryption key. To encrypt a field with a secret key
using either method, users must have it stored in their ID file.
You can set up forms with text or keyword fields that allow the user
to choose whether to encrypt a document. Designers can also hide
the SecretEncryptionKeys field so that users cannot see the names of
the encryption keys.

Field encryption
A database designer can encrypt fields with secret encryption keys. To
decrypt these fields, users must merge the secret encryption keys into
their ID files. If the user does not have the required encryption key, the
encrypted fields appear blank.

18-48 Application Development with Domino Designer

Procedural overview: encrypting documents


Before you can encrypt a document, you must create an encryption key
and then enable encryption for at least one field in the document with
that key.
A document can be encrypted when it is first saved, or it can be
encrypted when saved after an editing session.
1. (Optional) If you are using a secret encryption key for encryption,
start by creating the key. To do this, see the topic Creating a secret
encryption key.
2. Enable encryption for a field.
3. Do one of the following to assign the encryption key to a document:
Encrypt all documents automatically
Create a field that generates a list of secret encryption keys
Allow authors to encrypt documents with their own encryption
keys

Enabling encryption for a field


You can enable encryption for more than one field in a form. The field
can be any data type.
1. Open the form.

3. Click the Advanced tab.


4. Select Security options: Enable encryption for this field.
If field encryption is enabled in the Client, any field delimiters appear in
red. If field encryption is enabled in Designer, the outline of the field
appears in red.

Allowing the author to choose the encryption key


If you dont have access to the encryption key or you want authors to
choose from the encryption keys they possess, enable encryption for the
fields, but do not associate any encryption keys with the form.
Then when users save a document created with the form, they choose
whether to encrypt the document when saving it (in the Document
Properties box) and choose which encryption key to use.

Application Security 18-49

Deploying Applications

2. Create a field or click an existing field. Then choose Design - Field


Properties.

Examples of encrypting documents


The Salary History form in an Employee Information database has a
create access list that allows only members of the Financials group to
create Salary History documents. You want to apply security measures
so that only four people in the Financials group can see salary
information and can edit Salary History documents.
There are several ways to accomplish this goal. You can:

Create a secret encryption key, associate it with the data you want to
secure, and distribute it to the members of the Financials group.

Identify the four members of the Financials group and use each
members public key to encrypt the information.

Using secret key encryption, you create an encryption key called Salary
and send it to the four members of the Financials group. You then enable
encryption for the CurrentSalary field and associate the Salary
encryption key with the form. Then, the four people in the Financials
group who have the Salary encryption key can create, read, and edit
encrypted salary history documents, including the data in the
CurrentSalary field.
Using public key encryption, you specify the names of the four members
in the Public Encryption key list associated with the CurrentSalary field.
Then the people named in the list can create, read, and edit encrypted
Salary History documents, including the data in the CurrentSalary field.
Users who dont have the Salary encryption key and are not in the Public
Encryption key list can read everything in the Salary History documents,
except the data in the CurrentSalary field, but they cant edit and save
existing encrypted documents.

Creating secret encryption keys


You can create a secret encryption key and then use that key to encrypt
fields in a database. Then, only users who have the secret encryption key
can read the fields. Before you distribute the key, you must merge the
secret key into your user ID. Then you can distribute the key to other
users, who, in turn, must merge the secret key into their user IDs.

To create a secret encryption key


1.

Choose File - Security - User Security.

2. Click the Notes Data tab, then Documents.


3. Click New Secret Key.
18-50 Application Development with Domino Designer

4. Enter a name for the new key.


5. (Optional) Write a comment to explain the keys use for example,
the databases to use it with, the people who have copies of it, and so
on.
6. Click OK, then click Done.

To attach a secret encryption key to a document


1. Open the document you are encrypting.
2. Choose File - Document Properties.
3. Click the Security tab.
4. Choose one or more secret encryption keys that you created, or
choose the people who can use their public key to access the
document (click the person icon next to the Public Encryption key
field) under Encryption Keys.
5. Send or close the document.

Considerations
Before you distribute secret keys, consider the following:
Allow only users who have Manager access in the database ACL to
send a key to users. Distribute the key to other managers of the
database in an e-mail that allows them to send the key to other users.
Distribute the key to users in a separate e-mail that prevents them
from sending the key to others.

If you distribute an encryption key to users who have Author access


in the database ACL, they can remove encryption from any
documents they create.

If you distribute the key to users who have Editor or higher access in
the database ACL, they can remove encryption from documents that
other users create.

Distributing secret encryption keys


You have two options for distributing secret encryption keys: you can
electronically mail them to users, or you can save the key to a file and
give the users the file. The easier distribution method is mail. The Notes
client automatically uses public key encryption to protect your secret key
when it is mailed, and it gives the recipient the ability to add the key to
his ID file with a single click. Exporting the key creates a KEY file, which
you can put on a disk and hand to coworkers, who then have to use the

Application Security 18-51

Deploying Applications

Import Key button in the User ID dialog box on their own computer to
add the key to his user ID.
Consider exporting secret keys to files if you are distributing keys to
application users who do not use Notes mail, because only Notes mail
users can receive and merge a key via e-mail. Second, if you dont have
complete confidence that the recipients ID file and password are secure,
then you shouldnt trust that the mail system is secure enough for
something as potentially sensitive as a secret key.

To mail a secret encryption key


When you mail an encryption key, the mail message is, by default,
signed and encrypted.
1. Create one or more secret keys and be sure to merge the encryption
key with your user ID before distributing it.
2. From your Bookmark page, select File - Security - User Security.
3. Enter your Notes password.
4. Click Notes Data - Documents.
5. Select the secret encryption key to send under Secret Key Name.
6. Click Mail Secret Key.
7. Enter the names of the people you want to send the secret key to in
the To field (click Address to choose from your Personal Address
Book).
8. In the CC field, enter the names of the people who need to know you
sent a key, but arent getting one themselves.
9. Click Send.
10. (Optional) Check Allow all recipients to forward the key to others
by mail or export if you want users to have that capability.
11. Click OK.

To export an encryption key to a file


To export an encryption key to a file that you can distribute on disk:
1. Create one or more secret keys and be sure to merge the encryption
key with your user ID before distributing it.
2. From your Bookmark page, select File - Security - User Security.
3. Enter your Notes password.
4. Click Notes Data - Documents.
5. Select the key to export and click Other Actions - Export Secret Key.

18-52 Application Development with Domino Designer

6. (Optional) Do the following to restrict who can use the encryption


key:
a. Click Restrict Use to allow only one person to use this file.
b. Type the hierarchical name of the user.
c. Select Allow that person to export the key or forward it to
others to let the recipient export the key or mail the key to other
users, and then click OK
7. In the Password box, do one of the following:
Type a password to protect the file. In the confirmation box,
retype the password and click OK.
Click No Password.
8. Type a file name, select a directory in which to store the file, click OK
or Save, and then click Done.

Merging secret encryption keys


If a database has a secret encryption key, you must merge the key with
your user ID so that you can distribute the key to users. After users
receive the key from you, they merge the encryption key with their user
IDs so that they have access to encrypted fields.

To merge an encryption key received by e-mail


2. Choose Actions - Accept Encryption.
3. Enter your password, and then click OK.
4. (Optional) Type comments to describe the encryption key for
example, type the name of the database and field in which the
encryption key is used.
5. Click Accept.

To merge an encryption key received as a file


1. From your Bookmark page, select File - Security - User Security.
2. Enter your Notes password.
3. Click Notes Data - Documents, and then click Other Actions - Import
Secret Key.
4. Select the directory, specify the name of file containing the
encryption key, and then click OK or Open.

Application Security 18-53

Deploying Applications

1. Open the mail message containing the attached encryption key.

5. If prompted to do so, enter the password associated with the file, and
then click OK.
6. Click Accept.

To create a field that maintains a list of secret encryption keys


If you are using secret encryption keys rather than public encryption
keys to encrypt documents, maintain a list of the keys you create. To
provide a convenient list of frequently used encryption keys, create a
special SecretEncryptionKeys field. To create this field, the form must
already have fields enabled for encryption.
1. Open the form.
2. Create a field named SecretEncryptionKeys. Define it as a text or list
choice field that is editable or computed.
3. Do one of the following:
If youve created a list choice field, click the Control tab and select
Enter choices (one per line). Write each entry, using a keyword
and a synonym that describes the encryption key for example,
Encrypt | ConfidentialKey. Use a null value for the Dont
encrypt option.
If youve created a text field, go to Step 4.
4. Click the Programmers pane and choose Formula in the Script area.
5. Do one of the following:
For a computed field, add a formula that returns the name of the
encryption key to use.
For an editable field, add a default value formula.
6. (Optional) Click the Advanced tab. Select Security options: Enable
encryption for this field so unauthorized users cannot see the names
of encryption keys used in the formulas and keywords.
7. Save and close the form.
8. You or the database manager must distribute secret encryption keys
to all users who need them.
If the SecretEncryptionKeys field is empty (null), the document is not
encrypted.

18-54 Application Development with Domino Designer

Examples: Creating a field that maintains a list of encryption keys


The following scenarios describe ways you can manage secret encryption
keys.
Editable choice list field that lists one key
In this example, if the user selects Encrypt, the document is encrypted
with the ConfidentialKey encryption key. If the user selects Dont
encrypt (represented by a null value ), the document is not encrypted.
Encrypt | ConfidentialKey
Don't encrypt | ""

Editable choice list field that lists multiple keys


A choice list formula lets users choose the encryption key that is
appropriate for the document.
Encrypt for Financials group | FinancialsKey
Encrypt for Managers group | ManagersKey
Encrypt for Human Resources group | HRKey
Don't encrypt | ""

"ConfidentialKey"

Computed text field


This formula encrypts documents with the ConfidentialKey encryption
key if the Status field contains the word Confidential:
@If(Status="Confidential";"ConfidentialKey";"");

Application Security 18-55

Deploying Applications

Editable text field


You can create a SecretEncryptionKeys field that is an editable text field
with a default value formula that designates a commonly used key.
Users can remove the value to skip encryption or change the value to use
another key.

Managing encrypted information


As you consider what type of encryption you need in your application,
keep the following in mind:

Reading encrypted information


Users can read encrypted information if they have the correct secret
encryption key in their Notes User ID or, in the case of encrypted mail
messages, the private key in their Notes User ID. Users without the
correct encryption key can read unencrypted parts of a document, but
encrypted fields appear blank. The user will see a dialog box with the
message, Portions of this document have been encrypted and are not
intended for you.
When multiple keys are associated with a form or document, users need
only one of the specified keys to read encrypted information.

Editing and saving encrypted information


Users who dont have the correct encryption key in their Notes User ID
cant edit encrypted documents. They can create new documents but
must save them unencrypted by removing the encryption key from the
Document Properties box.
When multiple secret keys are associated with a form or document, users
need all of the specified keys to edit and save encrypted information with
the original keys. If they dont have all the necessary keys, they can still
encrypt documents with the keys they have by changing the encryption
key list in the Document Properties box.

Removing or changing encryption keys for a document


Authors can remove encryption or change the associated keys from their
own documents (if they are allowed to edit their documents and they
have all associated encryption keys). Editors can remove encryption from
and change the keys associated with any document.

Data security for encrypted information


If a user copies a database, the data remains encrypted even if the
database is copied at the operating system level. The encrypted data is
also safe from access by API programs.
When an encrypted database is full-text indexed and the option Index
encrypted fields is enabled, the encrypted fields are only indexed if
there is an encryption key in the ID file capable of decrypting the field
before indexing. One situation where you may want to index encrypted
18-56 Application Development with Domino Designer

fields is if you create a full-text index for a database on your own


workstation. You probably would not choose this option on a full-text
indexed database on a server.
Note Data in the full-text index is stored unencrypted.

Field encryption and views


As you plan your design, keep in mind that encrypted fields do not
display in views. This is a deliberate restriction to maintain security and
to avoid the performance degradation that would result from having to
decrypt data as the view sorts.

To encrypt all documents automatically


You can set up a form to encrypt all encryptable fields automatically.
Then, whenever someone saves a new document composed with that
form, all the encryptable fields in that document are encrypted using the
key(s) you assigned, unless the author or editor changes the encryption
keys associated with the document or disables encryption.
Documents created before you add the encryption keys remain
unencrypted; however, you can manually encrypt them. For the details
of manually encrypting data in a document, see Notes Client Help.
1. Open a form.
2. Enable encryption for one or more of the forms fields.
3. Choose Design - Form Properties.
5. The Default encryption keys list shows all secret encryption keys
in your ID. Click the ones you want to add to the form as defaults.
6. Save and close the form.
Note If you use secret rather than public encryption keys, you must
distribute the keys to all users who need them.

Using electronic signatures in Notes applications


For extra security in Notes applications, you can design forms that will
attach electronic signatures to documents. Electronic signatures assure a
reader that the writers identity is genuine and that information has not
changed since the writer mailed or saved the document.
Note Signatures are valid only in Notes applications; they are not
supported on the Web.

Application Security 18-57

Deploying Applications

4. Click the Security tab.

How designers create a form


To design a form whose documents can be signed, you create at least one
field to which you assign the property Sign if mailed or saved in
section. This feature is available only for forms that are mail-enabled
and for forms that contain controlled-access sections.
You can enable signing of one or more fields on a form. If the field is in a
controlled-access section, the signature applies only to the section and is
generated when the document is saved. If the field is not in a
controlled-access section, the signature is generated only when the
document is mailed.
To generate multiple signatures on a form, create multiple
signature-enabled fields in separate controlled-access sections.

How Designer stores and verifies electronic signatures


Designer combines the data in a signature-enabled field with the private
key from the senders User ID to create a unique electronic signature.
Designer stores the signature, along with the public key and the list of
certificates from the senders ID, in the document.
Storing signatures in documents
Designer stores signatures in mailed documents with the document.
If a user with Editor access in the database ACL changes a field in a
document, Notes replaces the existing signature with the signature of the
editor when the document is mailed. Notes cannot save more than one
mail-time signature for a document.
If the document contains several signature-enabled fields, Designer uses
data from each signature-enabled field to generate a signature. After
mailing, a change in any field causes verification to fail when the
recipient opens the document.
Storing signatures in sections
Instead of signing an entire document, you can sign a section within a
document and store an electronic signature with the section.

For documents with one sign-enabled, controlled-access section,


Designer stores the signature with the section.
If a user with Editor access in the database ACL changes a
sign-enabled section, Designer replaces the existing signature with
the editors signature when the document is resaved.

18-58 Application Development with Domino Designer

If there are several sign-enabled fields in the section, Designer uses


data from each sign-enabled field in the section to generate a
signature. After saving, a change to a field in the document causes
verification to fail when a reader opens the document.

For documents with several sign-enabled, controlled-access sections,


Designer stores signatures within each section, so it is possible to
maintain multiple signatures for a document.
If a user with editor access changes one or more sign-enabled
sections, Designer replaces all original section signatures with the
newer signature when resaving the document. Designer preserves
the existing signatures for sections for which the user has no access.
If there are several sign-enabled fields within a section, data from all
the sign-enabled fields in that section is used to generate a signature.
A change in any fields in the document after saving causes
verification to fail when a reader opens the document.

Example of signature verification


1. Mary mails or saves a sign-enabled document. Notes uses the private
key from Marys User ID and the sign-enabled field data to create a
unique signature. Designer also stores Marys public key and
certificates with the document.
2. David opens the signed document to read it.

4. Notes checks the certificates that came from Marys ID against


Davids ID to see if they share a common certifier or cross-certificate
in the ID.
5. One of the following occurs:
If the signature and data are verified, Notes displays a message
indicating who signed it.
If the data has been modified, Notes displays a message indicating
that the document has been changed or corrupted since Mary
saved it. David should not assume that the content of the
document is what Mary created.
If the signature cant be verified or David and Mary dont share a
common certificate, Notes displays a message that the signature
cant be verified. David should not assume that Mary created the
document.
For more information on certification, see Administering the Domino
System.
Application Security 18-59

Deploying Applications

3. Notes checks to see if the document was signed. If it was, Designer


checks the signature against the data to see if it matches.

Attaching signatures to documents


When you design a form for an electronic signature, you can design it so
that either the user is prompted to sign the document when mailing it or
the document is automatically signed.
To enable signing:
1. Create a form with a SendTo field or, alternatively, create a
LotusScript program that uses the Send method of the
NotesDocument class with a recipients argument.
2. Create at least one sign-enabled field. To sign-enable a field, assign
the property Sign if mailed or saved in section in the Advanced tab
of the Field Properties box.
3. Enable the form for mailing in one of the following ways:
Use a Send Document form action
Enable the form property On Close: Present mail send dialog
Create a MailOptions field with the value 1
Use an @MailSend formula, or a program created with IBM
LotusScript that uses the Send method of the NotesDocument or
NotesUIDocument class.
The signing occurs during mailing in one of the following ways: the
sender chooses Sign in the Mail Send dialog box, the form contains a
field named Sign with the value 1, the form uses @MailSend with the
[Sign] flag, or the form uses a LotusScript program with the SignOnSend
property set to TRUE.

To attach signatures to controlled-access sections


If you set up a controlled-access section for signing, Domino attaches an
electronic signature when the document containing the controlled-access
section is saved.
To attach a signature to a document when it is saved:
1. Create a form with a controlled-access section.
2. In the controlled-access section, create at least one sign-enabled field.
To sign-enable a form, assign the property Sign if mailed or saved
in section in the Advanced tab of the Field Properties box.
3. Save and close the form.

18-60 Application Development with Domino Designer

Chapter 19
Completing an Application and Managing Design
Changes
This chapter describes how to document an application and how to test it
before deployment. Because applications often require redesign, this
chapter also describes how to make, control, and distribute design
changes to applications that are already in use.

Completing an application
As you prepare to deploy an application, consider these finishing
touches:
Creating an icon for the application.

Creating database Help using the standard About this Database


and Using this Database pages, or with a designated home page
that describes the application or site.

Providing context-sensitive Help for an application

Customizing SmartIcons sets for a Notes application to give users


one-click buttons for frequent tasks

Deploying Applications

Then, before handing over the application to the database manager:

Test the design

Make a master design copy to manage future design changes

For more information on putting a database into production, see the


chapter Deploying an application.

19-1

Creating a database icon for a Notes application


A database icon helps users identify the database quickly on their
Bookmark pane. An icon visually represents the purpose of the database.
For example, a discussion database where users ask questions about new
products could include an icon with a question mark.
You can create a database icon by copying an icon from another database
and pasting it in, by pasting a bitmap from a graphics application, or by
creating an icon in Designer.

To paste an icon into a database


1. Copy an icon from another database or copy a graphic from a
graphics application to the Clipboard.
If you are copying a bitmap, reduce the bitmap size to a 1/2-inch
square (32 x 32 pixels). You cannot resize it in Designer, and
Designer truncates larger bitmaps.
2. If you have not already done so, copy the bitmap to the Clipboard.
3. In Designer, open the database in which you want to paste the icon.
4. In the Design pane, click Other - Database Resources.
5. Double-click Icon to start the Design Icon editor.
6. Click Paste.
7. Edit the icon in the Design Icon editor.

To create a new icon


You must have a mouse to create a new icon.
1. Open a database in Designer.
2. In the Design pane, click Other - Database Resources.
3. Double-click Icon to start the Design Icon editor.
4. Click a color and then click a square to fill it with the chosen color.
5. Continue filling in squares until the icon is complete.
6. Click OK to save the icon.
Note Icon changes replicate and can be affected by replace or refresh
design procedures. The icon design will refresh or replace if you disable
Prohibit design refresh or replace to modify on the Design tab of the
Design Document Properties box (To get this Properties box, select Icon
in the Work pane and then select File - Design Properties).

19-2 Application Development with Domino Designer

Providing online Help for an application


Including Help with your application improves the chances that users
will understand how to use it without asking for individual Help from
you or a coworker. Database Help can be integrated throughout the
application so that users have information as they need it.
Use these tools and techniques to document an application:
About This Database and Using This Database documents
describe the database purpose. You can also create a page that
provides this type of information.

The document preview pane lets users scan through documents


quickly to get a sense of whats in the database.

Database launch settings allow you to display the most useful


starting point for users. This might be the About This Database
page or it might be the home page for the application.

Context-sensitive Help in applications provides task-specific


information as users need it. They can access the information with a
Help button or the F1 key in a Notes application or with a Help
button in a Web application.

Field Help describes the purpose and use of individual fields.

A Help view organizes and displays Help documents.

A separate Help database can be set to stay on top of other windows


in your application while users work.

Creating "Using Database" and "About Database" documents


Every database should include a Using Database and an About
Database document to explain the database to users.
The "About Database" document
Use an About Database document to describe the purpose of a
database. You can specify that the About document opens automatically
when a user opens the database. To display this document, choose Help About This Database.
The About document should include:

The purpose of the database.

The intended audience.

The name and telephone number of the database manager.

The date the database was implemented.

Completing an Application and Managing Design Changes 19-3

Deploying Applications

Guidelines for its use.

Network requirements if users must be connected to the network to


perform certain tasks for example, if the application uses lookups
that require a network connection.

The About document can contain rich text, so you can also use
document, view, and database links, buttons, attachments, graphics, or
multimedia files.
The "Using Database" document
Create a Using Database document to provide users with instructions
on using various forms, views, and navigators in the database. To
display this document, users choose Help - Using This Database.
The Using document, like the About document, can contain rich text, so
you can also add document or database links, buttons, attachments,
graphics, or multimedia files.
A Using This Database document should include:

A brief overview of the application.

The purpose of each view and its organizations.

The purpose of each form and how to fill it out.

The purpose of each agent, when to run it, and the anticipated
results.

The overall work process being automated, if appropriate, including


what happens at each stage. When users fill out documents, they
should understand what happens after the documents are saved, and
what other users are expected to do.

To create a document
1. In Designer, open the database youre designing.
2. In the Design pane, click Other - Database Resources.
3. Double-click About Database Document or Using Database
Document.
4. Write or edit the information. You can also create links, buttons,
hotspots, and attachments. You can apply text styles, as you would
for any Notes form.
5. Save the document.

19-4 Application Development with Domino Designer

To automatically display the "About Database" document


1. Choose File - Database - Properties and click the Launch tab.
2. Do any of the following:
Select On Database Open: Open About database document so
that this document always opens first.
Select Show About database document if modified so that if you
edit the document, it opens to users again.
If you want each user to see the About document the first time
they open the database, select Show About database document
when database is opened for first time.
Select On Web Open: Open About database document.
You can use this document as a springboard to a file in another database
or another products file. To do so, use the Database Properties Launch
options for Launch first attachment in About database document or
Launch first doclink in About database document.

Creating context-sensitive Help for an application


You can make an applications Help documents or pages
context-sensitive so that users can open them by pressing a key, such as
F1, or by clicking a Help button. You can associate a Help document or
page with each page, form, subform, view, and folder in an application.

To create context-sensitive Help for a Notes application, you write a


formula for the HelpRequest event for a page, form, subform, view, or
folder. You can use the formula language command
@Command([OpenHelpDocument]) to specify which Help document to
open when a user requests Help while an element is active. You can also
use @helpCommand([OpenPage]) to open a page instead of a document.
The HelpRequest event is not available for applications over Web
servers; however, you can create a button for an element and program
the button using a formula with @Command([OpenHelpDocument]) or
@Command([OpenPage]). A user clicks the Help button to see the
associated Help document or page.
Because the HelpRequest event accepts a formula, you can use the
formula language in other ways to provide Help. For example, you can
use an @If formula with @IsDocBeingEdited to provide different Help for
a form depending on whether a document is being read or edited, or
Completing an Application and Managing Design Changes 19-5

Deploying Applications

When you provide Help for an element, your formula overrides


whatever context-sensitive Help already exists for that element. This
feature is not intended for context-sensitive Help on dialog boxes or
menu items.

depending on other conditions specific to your application. You can


present a dialog box to allow users to select among several Help
documents or pages. You can place Help text directly onto a form or
page, set the text with a hide-when formula, and use a formula on the
HelpRequest event to reveal the text (by changing the value of a
document field) when a user requests Help.
Note To open documents in response to Help requests, there must be a
view containing those documents sorted by a key field that you can use
as parameters for @Command([OpenHelpDocument]). You can use
@Command([OpenPage]) without requiring a specific view or key field.
For syntax and usage information on using
@Command([OpenHelpDocument]) or @Command([OpenPage]) in a
formula, see the Domino Designer Programming Guide.

Writing Help for fields


Field Help is optional, but it can Help users fill out documents without
assistance. A field label that appears next to the field describes the fields
general purpose. Write field Help to tell users what to enter in an
editable field or how to use the field. When a user selects a field that has
Help, a one-line text prompt appears at the bottom of the window.
If you cannot fit all the information into a Help description or if the field
isnt editable, but you want to explain its use, use pop-up text in the field
label to place Help information directly on the form. You can also write a
field hint, text that helps the user determine what to enter or select in the
field. The text disappears when the user moves the cursor into the field.
Tips for writing Help for fields
Start the Help description with Required: if the user must fill in the
field.
You can use 70 characters, including letters, numbers, spaces, and
punctuation. If your application will be translated to another language,
use no more than 55 characters to allow the translators a few extra
characters.
To write field Help
1. Open the form in Designer.
2. Double-click the field.
3. In the Field Properties box, click the Advanced tab.
4. Enter your help text in the Help Description setting.
5. Save and close the form.

19-6 Application Development with Domino Designer

To write pop-up text for a field


1. Open the form or subform in Designer.
2. Highlight the field label that is, static text that the user sees, not
the rectangular field definition.
3. Choose Create - Hotspot - Text Pop-up.
4. In the Hotspot Properties box, write the pop-up text and click the
green check mark.
5. Save and close the form or subform.
To write a field hint
A field hint lets you enter descriptive text that initially helps the user
know what to enter or select in the field. This text disappears when the
user moves the cursor into the field.
1. Open the form in Designer.
2. Double-click the field.
3. Click the Advanced tab.
4. In the Field Hint box, type the text you want to appear.
Examples
For a text field named Supervisor:
Enter the name of the person to whom you report.

For a keywords field that presents check boxes:


For a required Subject field:
Required: You must add a brief description.

Creating and displaying more detailed application Help


In a complex application, an About Database document and a Using
Database might not provide enough documentation. To provide
detailed documentation for an application, design a Help form as part of
the database and display documents created with that form in a Help
view. The following steps describe one way to achieve this.
To create a Help form
1. Create a new form called Help and create fields for Help content.
2. Choose Design - Form Properties.
In the Name box, type a name and alias for the form (for example,
Main Topic | Interview). For more information on naming a
form, press F1 on the Form Info tab.
Completing an Application and Managing Design Changes 19-7

Deploying Applications

Select as many options as apply.

3. Select Event: Window Title and enter Help as the window title
text in the formula window below.
4. Save and close the form.
5. Choose Create - Help for each Help document.
6. Click the form youre designing and choose Design - Form
Properties.
7. Deselect Include in Menu.
8. Click the form, and then save it.
9. Create a view that displays the Help documents.
Note You can also create a separate Help database and open its
documents from your application using @Command(OpenHelpDocument).
To open documents from a Help database in a window that users can set
to stay on top of other windows as they work, choose File - Database Properties - Design for your database. Then, turn on List in Database
Catalog and enter the category NotesHelp.

Specifying a home page in the Web site document


To make a design element the site home page, open the Web site
document. Specify a URL that includes the design element in the Home
URL field.
To open the Web site document from the Domino Administrator, click the
Configuration tab. In the Internet Sites view, open the Web Site document
for the Web Site you want to modify. Click Configuration and edit the
Home URL field. For more information, contact your server administrator.
If you set an About This Database document, a navigator, a page, or
another document to launch automatically when a user opens the
database, the Home URL need only open the database to launch the
design element. The syntax is:
/databasename.nsf
This URL opens the Our Home database and displays whatever is
selected in the On Web Open launch setting:
/ourhome.nsf

To open a view automatically, include the view name in the Home URL.
The syntax is:
/databasename.nsf/viewname
This URL launches the Contents view of the Our Home database:
/ourhome.nsf/Contents
19-8 Application Development with Domino Designer

Restricting design changes


Once an application is complete and available, you decide how to protect
the design from changes. An application can have a totally open design,
where users can update forms and views and pass along design changes.
Or an application can have a totally closed design, where users use the
application as is and have no access to design elements.
Designer lets you control the entire design of a database, as well as
individual design elements. You can restrict changes by not allowing
changes to overwrite one or all design elements, or you can hide one or
all design elements from users.
In almost every case, you start by making a master design copy of the
application.
For related information, see the topic Hiding the design of an
application later in this chapter.

Checking the application design before release


After you complete the design, test the application and correct problems
before you release it.
Check the design of forms, fields, views, outlines, pages, and all
other design elements

Check the ACL of the database

Check the database properties, including the launch option

Check the About and Using documents for accuracy and


completeness

Verify that agents and actions work as designed

If the application is Web accessible, check that the application runs


from a Web browser and all components display as expected

Save the design template

Distribute the application for a final review

Pilot-test the application

Make design changes before release

Request application sign-off

For more information on putting a database into production, see the


topic Deploying an application later in this chapter.

Completing an Application and Managing Design Changes 19-9

Deploying Applications

Checking form design


For each form you want to check, create two or three documents and
enter a variety of information into the fields. Then use this check list to
verify that the form is working as intended.

Is there a default form for the database?


If not, double-click the form that should be the default and choose
Design - Form Properties. Click the Defaults tab and select Default
database form.

Do all forms appear correctly on the Create menu? Are the


appropriate keyboard shortcuts used? Do the forms appear in the
correct order?
If not, check the names and the Include in Menu properties for the
forms.

Do the window titles for forms display appropriately under different


conditions?
If not, edit the window title formula. To display the window title
when a form is printed, click the Printing tab in the Form Properties
box and add &W to the formula for the header or footer.

Check cross-platform compatibility: Are all fonts used in this form


available (or approximated) on all platforms? Does all text display
legibly? Did you use platform-specific terms where appropriate?
Make your application layout as generic as possible to suit all
platforms.

Are related fields for example, Name and Address fields


grouped together on the form?
If not, move the fields and their related static text to a more suitable
position.

Do forms that are longer than one page have page numbers?
If not, click the Printing tab in the Form Properties box and add &P
to the formula for the header or footer.

Do the forms include Names fields where appropriate for tracking


document authors and editors?
If not, add a Names field to the form.

Has a read-access list been defined for the form?


If one is needed, define a read access list by assigning names to a
Read access control list on the Security tab of the Form Properties
box.

19-10 Application Development with Domino Designer

Has a create access list been defined for the form?


If one is needed, define a create access list by assigning names to a
Compose access control list on the Security tab in the Form
Properties box.

Checking field design

Are fields (including keywords fields) showing the correct


information when first displayed?
If not, check the default value formula.

Does every editable field have a Help description?


If not, add Help descriptions for those fields. Ensure that field
descriptions are consistently worded for example, all are full
sentences or all express commands. Check that ending punctuation is
consistent for each. Note that you can also add field hints for each
field.

Can users enter information in editable fields?


If not, check the field definition. You may have selected the
Computed option when defining the field.

Are editable fields formatted correctly once the document is saved?


If not, check the input translation formula and the format for the
field.
Are editable fields accepting invalid data or not accepting valid
data?
If so, check the input validation formula.

Are computed fields computing correctly? Are they returning values


of the appropriate data type?
If not, check the field formula. The formula may need to include
some data type conversion such as @TextToNumber.

Do inherited fields inherit their data correctly?


If not, check the fields default value formula.

Do required fields have input validation formulas that display an


appropriate message when the user tries to save the document
without filling in the fields?
If not, create the input validation formulas and include an
explanatory message for the user.

Completing an Application and Managing Design Changes 19-11

Deploying Applications

In time-date fields, is the time displaying correctly?


If not, make sure you selected the appropriate time zone option in
the Field Properties box.

Are fields aligned properly with a variety of window sizes and on


different monitors?
If not, check the tab settings for the form.

Are encrypted fields accessible to users who have the encryption key
and inaccessible to all other users?
Make sure that only authorized users have the encryption key. If
unauthorized users have the encryption key, change the encryption
key and redistribute it only to authorized users.

Do fields have field hints?


If not, you might want to consider adding them.

For information on writing field help and field hints, see the topic
Writing Help for fields earlier in this chapter.

Checking view design


Once the database is complete, make sure the design is working. For
testing purposes create a view that uses @SELECTALL to select all
documents. Follow these guidelines to check view design.

Is there a default view for the database?


If not, double-click the view that should be the default and choose
Design - View Properties. Click the Options tab and select Default
view when database is first opened.

Is there a view that is displayed by date?


If not, add a view that sorts documents by date, so users can view
documents in chronological order, or choose a sort value on the
Sorting tab of the Column Properties box, or create a date column in
an existing view that the user can sort in both ascending and
descending directions.

Do all views appear correctly on the View menu? Are the


appropriate keyboard shortcuts used? Do the views appear in the
correct order?
If not, check the names and the Show in View Menu selection in
the View Properties box.

19-12 Application Development with Domino Designer

Is the information in the view easy to read?


If the view appears cluttered or the columns are too close together,
reset the column width and justification.

Are all the documents that should be in the view displayed, or are
too many documents displayed?
If the view is not displaying the correct documents, check the view
selection formula.

Are response documents indented?


If not and you want to indent responses, select Show response
documents in a hierarchy on the Options tab of the View Properties
box and create a column for responses.

Do response documents correspond to the correct main documents?


If not, check the view selection formula; also be sure that the
responses-only column is placed directly to the left of the column
that displays the main document information.

If the view uses categories, do the categories appear correctly?


If not, create a sorted, categorized column and use the name of the
appropriate keywords field as its formula.

If the view uses a form formula, do selected documents use the


correct form?
If not, verify that the view uses a form formula.
Check cross-platform compatibility. Are all fonts used in this view
available (or approximated) on all platforms? Are column widths
sufficient for all platforms? Did you use platform-specific terms
where appropriate?
Make the application layout as generic as possible to suit all
platforms.

If needed, does the view have a read access list?


To create a read access list, select the Security tab in the View
Properties box.

Are columns displaying in the correct color and highlighting?

If documents can be expanded, are twisties displayed?

Completing an Application and Managing Design Changes 19-13

Deploying Applications

Checking columns

Is the information in each column correct?


If not, check the formulas in the column definitions.

Is the column returning values of the appropriate data type?


If not, check the field formula. Columns display only simple text;
therefore, you may need to use @TEXT in the formula to display
values from numbers or time fields.

Is each column displaying all the information that is contained in it?


If not, you may need to adjust the column width and/or the font
used to display the column.

If you are using a date format in a column, have you accommodated


4-digit years so that you avoid problems with the year 2000 and
beyond?

Are the contents of columns aligned properly?


For example, numbers should be right-justified; text should be
left-justified or centered. Check the justification for each column.

Are documents in the right order?


If not, make sure that you sort on the correct columns, and that you
chose the correct sort order (ascending or descending).

Are documents supposed to be numbered?


If so, create a new view that has a column in the left-most position
that sorts in ascending order and uses @DocNumber for its formula.

Are columns displaying the correct color and highlighting?


If not, select Use value as color on the Info tab of the Column
Properties box.

If documents can be expanded, are twisties displaying?


If not, select Show twistie when row is expandable in the Column
Properties box.

Making a design copy of a completed application


Before delivering the database to the database manager for general
release, make a local template copy. You can make future design changes
to the template and then transfer them to the server database.
1. Select the database and choose File - Database - New Copy.
2. Select Local.
3. Enter a title for the template.
19-14 Application Development with Domino Designer

4. Press TAB and change the file name to include the NTF extension
reserved for templates. If you specify a directory in addition to a file
name, the new database is placed in the directory you name as a
subdirectory of the Notes Data directory. You specify a location for
the Data directory during installation. If the directory doesnt exist,
Notes creates it for you.
5. Select Database design only in the Copy section of the dialog box.
6. Deselect Access Control List.
7. (Optional) Click Encryption to encrypt the database and protect its
contents from being accessed at the operating system level. Then
click OK.
8. Choose File - Database - Access Control to define an appropriate
access control list for the template.
The following access levels are recommended for the access control
list of a template used for design maintenance:
Reader

Local Domain Servers

Reader

Other Domain Servers

No Access

Your User Name

Manager

Database Manager

Manager

[Anonymous]

No Access or whatever the actual database


should have

[Default]

No Access or whatever the actual database


should have

[LocalDomainServers]

Manager or whatever the actual database


should have

[OtherDomainServers]

No Access or whatever the actual database


should have

Note The items within the square brackets are needed only if the
template is going to be used for creating new databases. The brackets
are required for these entries.
For more information on putting a database into production, see the
chapter Deploying an application.

Completing an Application and Managing Design Changes 19-15

Deploying Applications

Default

Pilot testing an application


Once your application has been reviewed, pilot test it with a few users.
Make sure that the application works correctly and that all instructions
are clear. Because the application users have a different point of view,
they often uncover problems missed during the review cycle.
Only the people specifically assigned to pilot test the application should
have access to it. The default access should be No Access. Then you
can assign specific access levels and privileges to make sure that certain
users can access only what they should. Make sure you retain Manager
access, so you can make changes to the access control list during the test
period and solicit comments from the testers.
To pilot test an application
1. Choose File - Database - New Copy to make a local backup copy of
your application. Use this backup copy if you need to backtrack from
changes made during the pilot test.
2. Create an About Database document to explain that the
application is in the testing phase. Give users your name, e-mail
address, and phone number, so they can contact you with questions,
comments, and suggestions.
3. Create a Comment form to make it easy for testers to give you
feedback. Include the comment form in at least one view. (Make sure
that the comment form is marked in the form design to be included
on the Create menu, or that a button or action is available to the user
to compose the form.)
4. Choose File - Database - Access Control to add testers to the access
control list. Be sure to retain Manager access for yourself.
5. Ask your Notes administrator for Write access to a server for the
pilot test. Also, tell the administrator which users need access to that
server during the pilot test.
6. Choose File - Database - New Copy to copy the application to the
server. Test the application on a single server. Do not create replicas
yet.
For more information on copying a new database to a server, see the
topic Copying a new database to a server in the chapter Deploying
an application.
7. If the database will use replication later on, either to mobile laptops
or between servers, confirm that the replication formulas are
working and that servers can handle the volume of replication. For
example, an annual review system places a demand on the server
during the review writing time, but not at other times.
19-16 Application Development with Domino Designer

If users will be replicating, then the pilot needs to confirm that


replication instructions are appropriate for the levels of user
expertise. While the initial part of the pilot test may be limited to a
single server, if the intended implementation involves multiple
servers, then the pilot test needs to address some of these issues as
well.
For more information on replication, see Administering the Domino
System.
8. Keep track of questions that people ask about the function or use of
the database. Their questions may include the Using Database
document or to the design of the database.

Renaming a database
If you want to change the title of a database, you can edit the title. The
database title is the name that appears as the default bookmark name
and the name that appears when you choose File - Database - Open. Note
that a database name or title is not the same as the database file name.
The file name associated with a database is permanent. The only way to
change the file name is to make a copy or a replica of the database and
give the new database a different file name.
1. Open the database.
2. Choose File - Database - Properties.

Renaming design elements


For most design elements, you can follow these steps to rename the
design element.
1. Open a database in Designer.
2. In the Design pane, click the type of design element youre working
on.
3. Select the name of the design element in the Work pane.
4. Do one of the following:
For a script library, choose Edit - Properties.
For many design elements, such as views, agents, or actions, you
can double-click the specific name of the design element to display
its properties box..

Completing an Application and Managing Design Changes 19-17

Deploying Applications

3. Enter a new database title.

For other design elements, such as forms or pages, you must


double-click the name of the form or page and then choose Design
- <design element> Properties.
5. Edit the name of the design element.
6. Save and close the design element.

Design synopsis
The Design Synopsis dialog box lets you generate a detailed report on a
particular database. The report lets you:

Gather information on a database

Select the design elements you want in your report

Filter the contents of the report so that you do not automatically get a
lengthy report

Display the report on the screen or have it written to a specified


database

To create a design synopsis


1. Open the database for which you want a report.
2. Choose File - Database - Design Synopsis or select Synopsis in the
Design pane. The Design Synopsis dialog box.
3. Click the Design Elements tab and do the following:
Select design elements one at a time from the list. If you want
every element of every design to appear, select All from the list.
Choose the specific elements that appear for each of the design
elements. For example, if you selected Forms in the list, all the
forms in the database are listed. Select the ones you want in your
report. For example, if you have created a hide-when formula on a
page and want to see the hide-when formula in the design
synopsis, select that page in the list.
The Add button lets you add specific elements one at a time to
your report. The Add All button adds all the elements of a
particular design element (for example, all the forms). Your
selections appear on the right. If you want to add every element of
every design element, choose All from the design list and then
click Add All.

19-18 Application Development with Domino Designer

4. Click the Database Information tab. Then, check the appropriate


boxes to include information in your report on the following topics:
General information gives information such as the database
title, location, and categories.
Space usage calculates information such as the file size, number
of documents, and space used by the database.
Replication gives information on the replication settings for the
database.
Access list generates a list of users, groups, and servers in the
ACL and specifies assigned access levels and access roles for each.
5. Click the Content tab. Then do the following:
Check the details you want on each design element. For example,
for Forms, you can check Alias and Last Modification. Those
details appear for each selected form in the database.
Check the appropriate boxes so that your report includes
information on subcomponents (such as formulas), LotusScript
code, Java code, HTML code, or JavaScript code.
To generate customized reports, use the DXL Transformer utility. It
applies XSL stylesheets to the DXL representation of one or more
design elements. This means that raw XML-based data which
describes a form can be converted into a rich HTML document,
allowing full control over content and format.
Choose blank lines or page breaks as report separators.
(Optional) Check the Write Output to Database box if you want to
write the report to a database. If you check this box, a new dialog
box appears letting you specify the database where you want the
output written.
7. Click OK to generate the report.
Unless you chose to have the report written to a database, the generated
report is displayed in a new window. You can print it or save it in a file.

Completing an Application and Managing Design Changes 19-19

Deploying Applications

6. Click the Output tab. Then do the following:

Updating documents after redesigning a form


When you redesign a form, be aware of the effect on existing documents.
Some form changes, such as formatting changes, automatically display
when users open an existing document. Other changes, such as adding a
new field, do not display in existing documents until you update the
documents manually or by running an agent. If the database replicates,
redesign the form on only one database and let the changes replicate to
other replicas.

Form changes that don't require updates to existing documents


As long as the form doesnt have the Store form in documents property
set, changes in the following form elements display automatically in
existing documents. When users open a document, they see the changed
format.

Computed field formulas

Static text on the forms

Pop-ups

Text properties and formats

Form actions and buttons

Graphics

Form names if you leave the original name as a synonym to the right
of the vertical bar (|) symbol.

Form changes that require updates to existing documents

New fields

Field data types

Field names

Deleted fields

Form names if you dont leave the original name as a synonym.

Form types for example, from Main to Response

Forms with the property Store form in document

19-20 Application Development with Domino Designer

Checking field values in a document


Open the Document Properties box to see if a document contains a
particular field or field value, or to troubleshoot a field that is not
calculating its value correctly. A null value () indicates that the field is
empty.
A document always contains fields you design as well as fields Domino
automatically generates. Most fields generated by Domino start with a
dollar sign ($). Some Domino-generated fields include:
$File shows an entry for each attachment in the document.

$Links shows an entry for each link in the document.

$Readers lists authorized readers if the document contains a read


access list.

$Revisions lists the date and time of each editing session since the
first time the document was saved.

$Title, $Info, $WindowTitle, $Body, and $Actions are associated


with a form that is stored in the document.

$UpdatedBy lists the document authors and editors. Anonymous


forms dont have this field.

Form indicates the name of the form used to create the document
or the name of the form most recently used to save the document.
Use the form in views to select documents created with the form.

PostedDate indicates that a document has been mailed and shows


the time and date it was mailed.

To check field values in a document:


1. Select the document in a view.
2. Choose File - Document Properties.
3. Click the Fields tab.
4. Click a field name in the left column to display the field.

Completing an Application and Managing Design Changes 19-21

Deploying Applications

Using agents to update documents affected by form changes


To update multiple documents affected by form changes, use an agent.
To do so, it is best to create private agents and run them manually.

To edit and resave documents


To save the step of editing and resaving documents manually, create an
agent that uses the formula:
@Command([ToolsRefreshAllDocs])

To add a field
If you create a new field, create an agent that inserts the new field into
existing documents using the formula:
FIELD New field name := value;

where New field name is the name of the field and value is the value you
want the field in these documents to have. The value can be the field
default value; a formula that calculates the value; or a null value () that
inserts the field into the documents, but doesnt give them any initial
value.

To remove field data from all documents


If you delete a field, existing documents continue to store the obsolete
field and its values. This unnecessary storage can affect disk space. To
remove the obsolete field, create an agent that uses the formula:
FIELD Field name := @DeleteField;

After you run the agent, compact the database to reduce the actual file
size of the database.

To rename a field
If you rename a field, existing documents continue to refer to the old
field name. To update documents to refer to the new name, create an
agent that uses the formula:
FIELD New field name := Old field name;
FIELD Old field name := @DeleteField;

where New field name is the new name for the field, and Old field name is
the original name for the field.

19-22 Application Development with Domino Designer

To reassign documents to another form


If users attempt to open documents created with a deleted form, they see
a message indicating that the form cannot be found. To prevent users
from seeing this message, use these agent options to reassign existing
documents to another form.
1. Click on Agents in the Design pane and then double-click an agent
listed in the Work pane. The Agent Properties box appears.
2. Next to Trigger, check On schedule.
3. Next to Target, select All documents in database and click Add
Search.
4. In the Programmers pane, click Formula and enter:
FIELD Form := Reassigned form name;
where Reassigned form name is the name of the form that the
documents should use.

To remove the stored form from documents


In designing mail-enabled applications in which users need to see a
document and dont have the original form stored in their mail
databases, select the form property Store form in documents. This form
property is permanently attached to all documents created with the form.
To remove the stored form, remove all internal fields connected with the
form by creating an agent that uses the formula:
FIELD $TITLE:=@DeleteField;
FIELD $INFO:=@DeleteField;
FIELD $WINDOWTITLE:=@DeleteField;
FIELD $BODY:=@DeleteField;
FIELD $ACTIONS:=@DeleteField;

This formula removes all internal fields attached to the documents where
Old form name is the name of the form used to create the documents.
To specify a form to display documents
You can display a document with a form that you specify rather than a
stored form. To do so, create an agent that uses the following formula:
FIELD FORM:="New Form name";

This line creates a FORM field where New Form name is the form that will
display the documents.

Completing an Application and Managing Design Changes 19-23

Deploying Applications

SELECT $TITLE="Old form name";

To recover additional space


You can delete items with the suffix _StoredForm and
_StoredSubFormN where N is the number of subforms used by the
form. (If the form does not use subforms, then _StoredSubFormN does
not exist.) Determine the number of subforms and then delete each of
them by running a LotusScript or Java agent. You can recover additional
space by deleting the following items: $StoredFormCRC, $FormRepID,
and $Subform_RepIDS.
After you run the agent, compact the database to reduce the actual file
size of the database.

Changing database and design properties


The Properties boxes for a database and its design elements include
styles, options, and other settings that affect how the database looks to
users. To change these properties, you need Designer access or higher in
the database access control list.

To change a database's properties


1. Open or select the database.
2. Choose File - Database Properties.
3. Change the properties on any of the tabbed pages.

To change a design element's properties


1. Open the database.
2. In the Design pane, click the type of design element youre working
on.
3. Select the name of the design element in the Work pane.
4. Do one of the following to open the Properties box for the selected
design element.
For a script library, choose Edit - Properties.
For many design elements, such as views, agents, or actions, you
can double-click the specific name of the design element to display
its properties box..
For other design elements, such as forms or pages, you must
double-click the name of the form or page and then choose Design
- <design element> Properties.
5. Change the properties on any of the tabbed pages.

19-24 Application Development with Domino Designer

Setting database launch properties


You can set database properties that control what a user sees when the
database opens. For example, you might want all users to start from an
application home page or a registration page. Or you might display a
main navigator that leads users to different pieces of the application. You
can specify one option for an application when it runs on a Notes client
and another option for the application when it runs on the Web.
When the database opens on the Notes client, you can display:
A frameset you specify

A navigator you specify

A navigator in its own window

The About Database document for the database

The first attachment in the About Database document

The first doclink in the About Database document - Adding a link


here gives users access to information in another application from a
Designer application. For example, to collect spreadsheet data for use
in the application, launch a link to a spreadsheet application so users
immediately see the spreadsheet when they open the database. Data
entered in the spreadsheet can be used to populate fields in the
application. If you choose to launch a page, you will need to specify
the page in the Properties box. Designer gives you a drop-down list
of the pages that are available to choose from. they open the
database. Data entered in the spreadsheet can be used to populate
fields in the application.

When the database opens on a Web browser, you can display:

Using the Notes launch option

The About Database document

A frameset you specify

A page you specify - in the Database Properties box, Designer gives


you a list of the pages that are available to choose from.

A navigator in its own window

The first doclink in the About Database document

A doclink you specify

The first document in a view

Completing an Application and Managing Design Changes 19-25

Deploying Applications

To set the database launch property


1. Select or open the database and choose File - Database - Properties.
2. Click the Launch tab.
3. Choose what to display for a Notes client and for a Web client
4. (Optional) Choose whether to restore the database as the last user
viewed it
5. (Optional) Choose whether to display the About This Database
document when the database opens for the first time and/or when
the About This Database document is modified.
If you choose to launch a doclink
1. Copy the doclink on to the clipboard.
2. Open the Database Properties box.
3. On the Launch tab, choose - On Web open launch designated
doclink.
4. Click Paste doclink.
To launch a Page from the Notes client
1. On the Launch tab of the Database Properties box, choose On
Database Open - Open designated Navigator.
2. Select Type of Navigator: Page.
3. Enter or select the name of the Page.
Displaying a document preview automatically
You can automatically display a preview pane that shows the contents of
the highlighted document in a database view before the user opens the
document. This gives users a sense of what is in a database without
having to open and close each document. If you do not display the
preview pane automatically, users choose View - Document Preview to
access it.
1. Select or open the database you are designing and choose File Database - Properties.
2. Click the Launch tab.
3. Click Preview Pane Default. Note that this option is not available if
you launch a frameset from the Notes client.
4. Choose a location for the document preview pane to display.
5. Check Maximize document preview on database open to display
the preview pane automatically. Note that this option is not available
when setting launch properties from the Notes client.

19-26 Application Development with Domino Designer

Templates
A template is a skeleton that contains design elements, but no
documents. When you use a template to create a database, the templates
design elements are copied to the database created from that template.
You can use the Designer templates as is or customize them. Or, you can
create a template by creating a database with the NTF file extension and
the Database is a template property. This property enables the master
template to distribute design changes automatically to databases created
from it. Databases that inherit their designs from master templates
receive the latest changes through a nightly server task.
Note If, for some reason, you do not want a database to inherit designs
automatically via the nightly server task, you have two options: Do not
put the template on a server that runs the nightly update task or do not
set the Database is a template property. You can then distribute
changes to the database design by using the Replace Design command,
specifying the server where the template is located and selecting the
template. Make sure to set the database properties so that the database
does not automatically inherit the design via the nightly server task.

To convert a database to a template


1. Open the database you want to be a template and choose File Database - Properties.
2. Click the Design tab.
4. Enter a template name and click the green check mark to confirm it.
5. (Optional) Select List as advanced template in New Database
dialog to hide the template. Users who select Show all templates
in the New Database dialog box can still view the template.
6. (Optional) Select Copy profile documents with design to
propagate to databases created from the template any profile
documents within the template.

Naming conventions

You can use letters, numbers, and underscores in the name. Choose a
name that indicates the application type or design elements
represented in the template. For example, StdR6Disc represents a
standard Notes template containing the design for a Lotus Domino
Designer 6 Discussion database.

The master template name, the title, and the categories assigned to
the database cannot add up to more than 99 characters.
Completing an Application and Managing Design Changes 19-27

Deploying Applications

3. Select Database is a template.

Creating templates
Using a template, you can establish design standards for use throughout
your company. In large companies, a central development group usually
designs and manages templates to provide consistent designs and speed
up distribution of new databases. Use a template to standardize similar
types of applications for example, all discussion databases or to
store individual design elements, such as fields, forms, views, folders,
navigators, and agents that you can use in a variety of applications.
To customize a Designer template, choose File - Database - New Copy to
copy the original template and inherit the original design. Give it a
different file name in the Copy Database dialog box to prevent future
releases from writing over your customized template.
Heres a list of changes you might make when you customize a Designer
template:

Leave the original Designer template properties alone so that existing


databases that inherit their design will continue to be synchronized
with the template.

Change the newly copied template file name in the Copy Database
dialog box (change File - Database - New Copy) to a name that
indicates its intended use.

Change the newly copied template name (choose File - Database Properties) to a name that indicates the new templates purpose.

If existing databases that inherited the original Designer template


design need to inherit the design from the newly created template,
edit the database properties of those databases to reflect the name of
the newly copied template.

Advantages of standardizing with templates

Anyone can quickly and easily create a new database


Users need to know only one menu selection: choose File - Database New. They never have to modify the design and dont need to know
anything about database design.

Developers and experienced users can save design time


Forms, views, and agents copied from a template require no
additional design work or updates. Using a pre-designed form or
view that contains complex formulas or a large keywords list reduces
the chance of design errors and requires less testing time before a
database is rolled out.

19-28 Application Development with Domino Designer

Databases appear consistent to users


View, forms, and fields associated with a template use the same
names in all databases. This allows users to apply their knowledge of
one database to many databases.

Design considerations
The template usually does not control the database icon, the About
This Database document, and the Using This Database document. If
you want an icon, About document, or Using document to inherit all
design changes, go into Designer, choose Other - Database
Resources, select the icon or document, and make change in the
Properties box so that changes are inherited from the template. The
default is not inherited. You can also change these design elements
by manually copying and pasting the redesigned elements into
databases linked to the template.

Do not create private agents or folders in templates; their changes


cant be distributed automatically. If a private agent or folder exists
in a template, you receive error messages when the design is
refreshed/replaced. In the case of a shared/private-on-first-use
folder: if the folder in the template has been opened or tested, a
private folder exists and that folder generates errors when you try to
refresh a design.

Databases that inherit their design from a template you create do not
contain the ACL entries LocalDomainServers and
OtherDomainServers. You must add these entries to the template
with brackets as follows: [LocalDomainServers] and
[OtherDomainServers].

Examples: Creating templates


A customized discussion template
Suppose you need to add a Confidentiality field to all discussion
databases, so that authors can mark specific documents as Confidential
For internal use only. All databases that base their design on the
Discussion template will inherit this field.
Add the field directly to the Designer Discussion template. Every
database associated with the template inherits the new Confidential field.
DISCSW6.NTF (StdR6Disc)
|- SALES.NSF Sales discussion inherits from StdR6Disc
|-TRAVEL.NSF Travel discussion inherits from
StdR6Disc

Completing an Application and Managing Design Changes 19-29

Deploying Applications

A spinoff template
Most users mail databases inherit their design from the standard Notes
mail template, but the Eastern region employees need a Reply to
Customer form in their mail databases. Make a copy of the Notes mail
template to use as a base for the Eastern mail template. You inherit the
design from the Notes mail template, but after creating the Reply to
Customer form, you click Prohibit design refresh or replace to modify
in the Design Document Properties box so the form wont be deleted
when the server re-synchronizes the design of mail databases.
The Eastern regions template inherits its design from the Domino mail
template and also serves as a template itself.
MAIL6.NTF (StdR6Mail)
|-SLEE.NSF Sam Lees mail inherits from StdR6Mail
|-EASTMAIL.NTF (StdEastMail) Eastern mail template inherits
from StdR6Mail
|- SBRAUN.NSF Sandy Brauns mail inherits
from StdEastMail
A designer's notebook
You create a new template called DesignNotebook to store centralized
information, such as employee names and product numbers, as well as
generic design elements, such as Main Document forms and All by
Category views. Developers and experienced users browse through the
Design Notebook when they create a new database and copy and inherit
elements to speed up their design work.
DESIGN.NTF (DesignNotebook)
|- Suggestion Box: Inherit the All by Category view from
DesignNotebook
|- Employees Directory: Inherit the Employee Information
form and EmployeeID field
from DesignNotebook
|- Product Catalog: Inherit the Product ID Update agent
from DesignNotebook

Creating a design library template


If you have several design elements that you want to copy to different
databases, you can create a library of design elements. You do this by
creating a template that contains all of these design elements. That way,
if you want to copy a design element to a new database, you maintain a
connection to a source template. This allows you to have a design library
19-30 Application Development with Domino Designer

template that is maintained and updated centrally and have the changes
automatically propagate to all databases that you choose to inherit from
that template. This is especially useful if you have forms or images that
will be common to a number of different databases that need occasional
updating, such as company logos or order forms.
Copy from template

Paste into application

source.nft
Form

Modify the form in source.ntf,


changes propagate to target.nsf

Allow design replace/refresh to modify

target.nsf

To create a design library template


1. Create a new blank database with the file extension NSF.
2. Copy the individual design elements into the template.
3. Choose File - Database - Properties to open the Database Properties
box.

5. Open the Database Properties boxes of the design elements, click the
Design tab, select Inherit from the design template, and type the
template name.

Linking a database to a template


You can link a new or existing database to a template.
To link a new database to a master template
When you create a database from a template, select Inherit future
design changes in the New Database dialog box to create the link.
When you create a replica (choose File - Replication - New Replica) or a
copy (choose File - Database - New Copy), the new database
automatically links to the same template that the original database uses.

Completing an Application and Managing Design Changes 19-31

Deploying Applications

4. Click the Design tab, select Database is a template, and enter a


template name.

To link an existing database to a template


If you link an existing database to a template, the database design is
replaced when the servers Designer task runs, or when you manually
refresh the design. Thereafter, the design remains synchronized with the
template.
1. Select the template and choose File - Database - Properties.
2. Click the Design tab.
3. Highlight the name in the Database is a template box, and press
CTRL+C to copy it.
4. Close the properties box for the template.
5. Select the database to link to the template.
6. Choose File - Database - Properties to open the Database Properties
box.
7. Click the Design tab and select Inherit design from template.
8. Click the Template Name box, and press CTRL+V to paste the name.

Linking individual design elements to a template


To link individual forms, views, navigators, pages, and other design
elements to a template, copy the design element from a template or from
a database that inherits its design from a template. Then paste the
element into another database. You can also set up the link for existing
design elements in a database to a template.
To link a copied design element to a template
When you copy a design element from a template or from a database
linked to a template, the copied element automatically links to the
template if you answer Yes when prompted about inheriting future
design changes.
To link an existing design element to a template
If you link an existing design element to a template, the design is
replaced when the servers Designer task runs or when you manually
refresh the design. Thereafter, the design element remains synchronized
with the template.
1. Select the master template and choose File - Database - Properties.
2. Click the Design tab.
3. Highlight the name in the Database is a template box and press
CTRL+C to copy it.
4. Open the database containing a design element you want to link.
5. In the Design pane, select the type of design element youre creating.
19-32 Application Development with Domino Designer

6. Select the name of the design element in the Work pane.


7. Do one of the following:
For an agent, choose Agent - Agent Properties.
For other design elements, choose Design - Design Properties.
8. Click the Design tab of the Design or Agent Properties box.
9. Click Inherit from the design template and press CTRL+V to paste
the name.

Synchronizing databases with master templates


To use a consistent design for multiple databases, database designers can
associate databases or elements within databases with a master template.
Designers can manually synchronize databases with a master template,
but more often they rely on the Designer task to do this. When a master
template design changes, the Designer task updates all databases that
inherit their designs from the master template. The Designer task runs
daily by default at 1 AM. The Updall task, which runs by default at 2
AM, updates the view indexes of databases changed by Designer.
For a servers Designer task to update databases, you must create a
replica of the master template on each server that stores databases that
inherit from the master template.

After updating database designs, the Designer task also reloads the
LDAP schema on a Domino server that runs the LDAP service. You can
run the Designer task manually.
For more information on master templates, see the topic Creating a
database from a template in the chapter Creating an Application.
For more information on the LDAP service, see Administering the Domino
System.

Completing an Application and Managing Design Changes 19-33

Deploying Applications

Caution To avoid inconsistencies during database updates, ensure that


replicating servers do not update simultaneously.

To run the Designer task using the Task - Start tool


1. From the Domino Administrator, in the server pane on the left, select
the server on which to run Designer. To expand the pane, click the
servers icon.
2. Click the Server - Status tab.
3. In the task panel on the right, click Task - Start.
4. Select Designer and then click Start Task.

To run the Designer task using a console command


1. From the Domino Administrator, select the server on which to run
Designer in the server pane on the left. To expand the pane, click the
servers icon.
2. Click the Server - Status tab.
3. Click Console.
4. Enter the following command in the command line at the bottom of
the console, and then press ENTER:
Load design

Running the Designer task for a single database


If you want to refresh a single database, you can supply arguments to the
design server command using the following syntax:
design [source-server [dest-server]] [-f
single-db-to-refresh] [-d [single-dir-to-refresh]]

1. From the Domino Administrator, select the server on which to run


Designer in the server pane on the left. To expand the pane, click the
servers icon.
2. Click the Server - Status tab.
3. Click Console.
4. Enter the Load design command in the command line at the bottom of
the console along with optional arguments to refresh a single database
or all of the databases in a single directory, and then press ENTER.
Examples
To refresh all databases in the mail directory:
design -d mail

To refresh only the NAMES.NSF file:


design -f names.nsf

To refresh only the USER.NSF in the mail directory:


design -f mail\user.nsf

19-34 Application Development with Domino Designer

Making and distributing design changes


When you need to redesign an application, make and distribute the
changes in one of these ways:

Make design changes directly in an independent database on the


server.
This technique combines making and distributing design changes in
one step. Use this technique only if a small group of people uses the
database and it exists on only one server.

Make design changes in a template and then use Replace Design to


distribute the template design to the database.

Make design changes in a master template (sometimes called a


design template). Use the Designer server task or Refresh Design
to distribute the master template design to databases that inherit
their design from the master template.
Using a master template to manage design changes is best in larger
organizations where you need to control, track, maintain, and
synchronize design changes in a structured way. For small
organizations, using a template or a master template is a matter of
preference.

This figure below summarizes the steps you take to make and distribute
design changes to different types of databases.

Completing an Application and Managing Design Changes 19-35

Deploying Applications

Note that replication is the process by which database replicas on


multiple servers synchronize their data and their designs automatically.
Its important to understand which design changes replicate and which
dont and how the database access control list and other replication
settings affect the distribution of design changes.

Refreshing a design
Refreshing a design updates a database whose design is linked to a
template. Design elements that prohibit design replace or refresh are not
included in the updates.
If you use a template to refresh or replace the database design, to ensure
that the option Prohibit design refresh or replace to modify takes
effect, select this option as well as the option Propagate this prohibition
of design change in the design properties of the template.

Automatically refreshing a design


The Designer server task automatically synchronizes all server databases
that are linked to a template. This server task runs by default at 1:00 AM.
For the update to work, a template must reside on the same server as the
databases linked to it. Replicas synchronize with the templates stored on
their servers.

Manually refreshing a design


Use the Refresh Design command to distribute design changes manually
from a template to any databases linked to it. Manually refresh the
design of a database when:

The database is stored locally; therefore, the nightly Designer server


task doesnt update the design.

19-36 Application Development with Domino Designer

You want to receive design updates before the scheduled update.

You dont have Designer access to the database.

Components that are not refreshed


The following are not changed during an automatic or manual refresh
procedure:

The database icon (unless you have disabled the Prohibit design
refresh or replace to modify box in the Design Properties box)

The database title and category

The database ACL and encrypt database settings


Note that the ACL roles are updated (File - Database - Access
Control - Roles).

The Using Database and About Database documents (unless you


have disabled the Prohibit design refresh or replace to modify box
in the Design Properties box)

Individual elements whose design is protected from updates (that is,


if Prohibit design refresh or replace to modify is selected in the
Design Properties box for the element)

A component whose template, specified in the Inherit from the


design template box in the Design Properties box, is unavailable

The List as advanced template in New Database dialog option on


the Design tab of the File - Database Properties box

All options on the Advanced tab of the File - Database Properties


box, except Document table bitmap optimization and Dont
support specialized response hierarchy

Components that are refreshed


The following components are changed during an automatic or manual
refresh procedure if the design element changes in the template:

Forms, fields, form actions, and event scripts

Views, folders, and view actions

Agents

Pages

Framesets

Navigators
Completing an Application and Managing Design Changes 19-37

Deploying Applications

Caution An element with inheritance set is not replaced even if its


design is not protected from updates (that is, if Prohibit design refresh
or replace to modify is not selected).

Shared fields

All Database Properties box options, except List as advanced


template in New Database dialog on the Design tab

The options Document table bitmap optimization and Dont


support specialized response hierarchy on the Advanced tab of the
File - Database Properties box

Refreshing a design manually


1. Select the database to be updated, and choose File - Database Refresh Design.
2. Select the Domino server that stores the template(s) or select Local if
the templates are on your workstation, and then click OK.
3. Click Yes to confirm.
4. Repeat Steps 2 and 3 if other templates associated with the database
are stored on other servers.

Replacing a design
The Replace Design command makes a database identical to a template
and is the only way to distribute design changes if the database doesnt
inherit its changes from a template. If you have at least Designer access
in the database ACL, you can replace the design of a database with the
design from a template.
If you use a template to refresh or replace the database design, to ensure
that the option Prohibit design refresh or replace to modify takes
effect, select this option as well as the option Propagate this prohibition
of design change in the design properties of the template.

Components that are not replaced during Replace Design


The following components are not changed during a Replace Design
procedure:

The database icon (unless you have disabled the Prohibit design
refresh or replace to modify box in the Design Properties box)

The database title and category

The database ACL and encrypt database settings


Note that the ACL roles are updated (File - Database - Access
Control - Roles).

19-38 Application Development with Domino Designer

The Using Database and About Database documents (unless you


have disabled the Prohibit design refresh or replace to modify box
in the Design Properties box)

Individual elements whose design is protected from updates (that is,


if Prohibit design refresh or replace to modify is selected in the
Design Properties box for the element)

Individual elements whose template is inherited (that is, if Inherit


from the design template is selected in the Design Properties box for
the element)

Caution An element with inheritance set is not replaced even if its


design is not protected from updates (that is, if Prohibit design refresh
or replace to modify is not selected).

The List as advanced template in New Database dialog option on


the Design tab of the File - Database Properties box

All options on the Advanced tab of the File - Database Properties


box, except Document table bitmap optimization and Dont
support specialized response hierarchy

Components that are replaced during Replace Design


The following components are replaced during a Replace Design
procedure:
Forms, fields, form actions, and event scripts

Pages

Views, folders, and view actions

Agents

Navigators

Framesets

Shared fields

Database Properties selections, except the advanced template


option

All options on the Design tab of the File - Database Properties box,
except List as advanced template in New Database dialog

The options Document table bitmap optimization and Dont


support specialized response hierarchy on the Advanced tab of the
File - Database Properties box

Completing an Application and Managing Design Changes 19-39

Deploying Applications

To replace the design of a database


If a database replicates to other servers, replace the design of only one
database and let the changes replicate to other replica databases.
1. Select the database on the server and choose File - Database - Replace
Design.
2. Select the template.
3. Click Replace and Yes to confirm.

Design changes and replication


Unless you distribute design changes through templates, design changes
and any document updates made in one database replicate directly to
replicas, as long as servers have Designer access or greater in the
database ACL. To avoid replication conflicts and unexpected changes,
only one person the database designer or manager should make
design changes to only one database and maintain its design. Then let
replication distribute the design changes to other replicas.
Replication occurs at the times specified by the servers replication
schedule. Replicating design changes can take several hours or even a
full day if replicas are in different locations and arent replicated
frequently.

Templates and replication


When you use a template to distribute design changes, you must place a
replica of the template on each server that has databases that inherit their
design from the template. Give servers Designer access or greater in the
database ACL of each replica. To avoid replication conflicts, make
changes to one template on a source server. Then let replication
distribute the design changes to template replicas. The updated template
replicas then refresh the design of linked databases on the server. To
distribute design changes efficiently, the source server should replicate
the template replicas before the Designer task runs on each server at 1:00
AM. Any updates youve made to documents replicate directly with
other database replicas.
For more information on replication, see Administering the Domino System.

19-40 Application Development with Domino Designer

Preventing design changes


Use these methods to protect a customized design from accidental
changes.
Note None of these choices prevents someone with Designer or higher
access in the database ACL from changing the design. To prevent all
design changes, hide the design of the database and remove Designer
and Manager access from users who can change the design.

To protect individual design elements from being replaced or


refreshed
Use this procedure to protect customized design elements from being
overwritten in a Replace Design procedure and to protect a customized
design element in a database that is linked to a template.
1. Open a database in Designer.
2. In the Design pane, click a design element. The names of all the
design elements of that type appear in the Work pane.
3. In the Work pane, select the name of the design element you want to
protect.
4. Do one of the following:
For an agent, choose Agent - Agent Properties.
For a script library, choose Edit - Properties.
5. Click the Design tab.
6. Select Prohibit design refresh or replace to modify.
If you use a template to refresh or replace the database design, to ensure
that the option Prohibit design refresh or replace to modify takes
effect, select this option as well as the option Propagate this prohibition
of design change in the design properties of the template.

To unlink individual design elements from a template


This procedure breaks the link between a design element and a template
and is useful when you want to customize a design element that you
copied from a template. Future changes to the design element in the
template wont affect the design element in your database.
1. Open a database in Designer.
2. In the Design pane, select a design element. The names of all the
design elements of that type appear in the Work pane.

Completing an Application and Managing Design Changes 19-41

Deploying Applications

For other design elements, choose Design - Design Properties.

3. In the Work pane, select the name of the design element you want to
unlink.
4. Do one of the following:
For an agent, choose Agent - Agent Properties.
For a script library, choose Edit - Properties.
For other design elements, choose Design - Design Properties.
5. Click the Design tab.
6. Remove the name of the template in the Inherit from the design
template box.

To unlink a database from a template


This procedure breaks the link between a database and a template and is
useful when you want to customize the design of an entire database.
Future changes to the template wont affect the database.
1. Open the database and choose File - Database - Properties.
2. Click the Design tab.
3. Deselect Inherit design from template.

Modifying multiple design elements


To save time, you can select multiple design elements and set their
common design properties. For example, you might want to prevent all
of the forms in your application from inheriting changes from a template
or hide a collection of views from Web users or Mobile users.
1. Open a database in Designer.
2. In the Design pane, click the name of a design element (for example,
Forms). The names of all the design elements of the specified type
appear in the Work pane.
3. In the Work pane, select the name of a design element that you want
to modify, then hold down SHIFT and select the other contiguous
elements you want to modify, or hold down CTRL and select the
elements you want to modify.
4. Choose Design - Design Properties. The Design Properties box shows
only the properties that you can set for the selected elements. The
properties box displays initial values that are the same for all
selected design elements. Properties that are set differently for
different design elements display with a gray check.

19-42 Application Development with Domino Designer

5. Set properties for the selected elements. For example:


Enter a template name to have the selected elements inherit from
one template.
Check Prohibit design refresh or replace to modify to prevent
the selected elements from being modified during a refresh or
replace.
If you use a template to refresh or replace the database design, to
ensure that the option Prohibit design refresh or replace to
modify takes effect, select this option as well as the option
Propagate this prohibition of design change in the design
properties of the template.
Check Propagate this prohibition of design change so that if a
database inherits the selected design elements, the Prohibit
design refresh or replace to modify option will be inherited also,
and it will apply to the same elements in replicas of the database.
Hide the design elements from Web browsers, Notes clients, or
Mobile users.

Hiding the design of a database


To prevent users from making any design change to a database, hide the
database design. Hiding the design disables all design operations and
hides all formulas and scripts.

This feature is useful for hiding the design of databases that are based on
a template you own. When design changes are required, you redesign
the template, whose design is not hidden, and then refresh the design of
the linked databases. To maintain maximum design security, do not give
the template to anyone except authorized designers, and do not
distribute documentation for the formulas and LotusScript programs.
When you hide a database design, users cannot:

View the settings for design elements (View - Design disappears


from the View menu)

Modify, add, or delete fields, forms, navigators, pages, or subforms

Modify or delete existing views

View, delete, or modify existing agents or add shared agents


Completing an Application and Managing Design Changes 19-43

Deploying Applications

Caution Users who have Designer or Manager access to the database


can replace the database design, thereby changing it. To fully protect
database design, remove Designer and Manager access from users who
can change the database design.

View or change formulas, LotusScript programs, or formulas


associated with simple actions

Change the Database Open properties

Display a synopsis of the design

Reveal the design of the database by making a copy or replica of it

To hide the design of a database


This procedure assumes youre hiding the design of a database that
inherits from a template. Thoroughly review, debug, and test the
template before proceeding.
1. Create a new database based on the template.
2. After the database is created, select the new database and choose File
- Database - Replace Design.
3. From the list of templates displayed in the dialog box, choose the
template from which the selected database inherits its design.
4. Check both Inherit future design changes and Hide formulas and
LotusScript.
5. Click Replace and Yes to confirm.

Building in access to agents before hiding the design


If an agent in the application requires user input, such as specifying a
database on which to run or changing schedule options, you must select
the schedule option Choose when agent is enabled (On the Basics tab
of the Agents Properties box, select On Trigger and then click
Schedule). Create a button or form or view action that includes a formula
using @Command[AgentEnableDisable] to enable the agent
automatically.

Hiding design elements


You can hide most design elements so that users cant see them on menus
or lists. You do this in the Design tab of the Properties box for the design
element or agent.
Choose from these options at the Design tab:

"Hide design element from"


Choose Web browsers to hide a Notes- or Mobile-only design element
from Web users.

19-44 Application Development with Domino Designer

Choose Notes R4.6 or later to hide a Web- or Mobile-only design


element from Notes users.
Choose Mobile clients to hide a Notes- or Web-only design element
from Mobile users.
Choose all options to hide the design element from all users. This is
useful when a design element launches only from a button or a formula,
or if you designed the element for purposes that users dont need to
know about.
"Do not show this design element in menus of Notes R4 or later
clients"
Use this to hide older design elements from Notes Release 4 or later
users.
Hidden design elements are hidden from the server too; you cant use
Domino URL commands to access documents in hidden views or forms.
Tip To hide a design element that isnt needed by users but is used for
background processes, such as lookup formulas, enclose the design
element name in parentheses for example, (Lookup View) instead
of using Hide When tab options.

To hide design elements


1. Open a database in Designer.
2. In the Design pane, select a design element.

4. Do one of the following:


For an agent, choose Agent - Agent Properties.
For a script library, choose Edit - Properties.
For other design elements, choose Design - Design Properties.
5. Click the Design tab.
6. Choose the appropriate Hide When options.

Completing an Application and Managing Design Changes 19-45

Deploying Applications

3. In the Work pane, select the name of the design element you want to
hide.

Locking a design element


If you work on a team and want to ensure that other designers cannot
modify design elements that you are working with, you can explicitly
lock them. When you have finished working with the design elements
and want to release them so that others can modify them, you can unlock
them. (A design element that is not explicitly locked is always
temporarily locked while it is being edited. After the designer has
finished editing the design element, the temporary lock is released.)
Shared Actions are contained in one design note. Therefore, when you
lock a Shared Action, you lock all Shared Actions. Likewise, when you
unlock a Shared Action, you unlock all Shared Actions.

To enable design element locking


Enable design element locking when you want to give designers the
ability to lock and unlock any of the design elements in a database.
1. Open the database.
2. Choose File - Database - Properties and click the Design tab.
3. Select Allow design locking.
Now designers can explicitly lock design elements in the database. A
newly created column next to the design element name indicates the
lock status of the design element.

To lock a design element


Lock a design element when you want to ensure that you have exclusive
ownership of it and to prevent others from modifying it.
Caution If you work locally or offline and attempt to lock a design
element, Designer displays a message stating that the Master lock
database cannot be reached and asks if you want to proceed with
locking the design element. If you click Yes to proceed, the database
applies a provisional lock to the design element. When you connect again
and replicate, the database attempts to convert the provisional lock to a
true lock. If it is successful, the database saves the edits that you made to
the design element. If it is unsuccessful, the database sends you mail
containing the edits that the database could not save; you must apply
them manually to the design element.
1. Highlight the design element in the Work pane.
2. Right-click the design element and select Lock.
If the design element was unlocked, a padlock icon appears in the
Work pane indicating that you have successfully locked the design
19-46 Application Development with Domino Designer

element, and a message appears on the status bar. You now have
exclusive access to the design element; other designers cannot
modify it.
If someone else has locked the design element, a lock-and-key icon
appears in the Work pane.

To unlock a design element


Unlock a design element when you have finished making changes to it
and want to allow others to be able to modify it. You can unlock only
design elements that you have locked. Designers with Manager access to
the database can unlock any design element.
1. Highlight the design element in the Work pane.
2.

Right-click the design element and select Unlock.


If you had locked the design element, the padlock icon disappears in
the Work pane indicating that you have successfully unlocked the
design element, and a message appears on the status bar. You no
longer have exclusive access to the design element; other designers
can now modify it.

To disable design element locking


Disable design element locking when you want to prevent designers
from explicitly locking design elements in a database.
1. Choose File - Database - Properties and click the Design tab.
Now designers cannot explicitly lock design elements in the
database.

Completing an Application and Managing Design Changes 19-47

Deploying Applications

2. Deselect Allow design locking.

Chapter 20
Deploying an Application
This chapter describes how to distribute, copy, organize, and replicate
databases once you have completed your design work.

Database design, management, and administration


The tasks involved with application design, database design, database
management, and Lotus DominoTMsystem administration may overlap,
depending on the size of your organization and the structure of job
responsibilities. In some organizations, an application developer may be
responsible for both application and database design, while in others, a
database manager may handle all database design and management
tasks. In addition, database management overlaps with Domino system
administration.

Work with the Domino administrators to implement and coordinate


design changes

Consult with Domino administrators when putting databases on


servers, because administrators are aware of server resources and the
connections between servers

For more information on designing or redesigning databases, see Lotus


Notes and Domino Release Notes. For more information on rolling out a
database, as well as information on Domino administration, see
Administering the Domino System.

20-1

Deploying Applications

Therefore, depending on your organization, make sure you work closely


with the people who are responsible for design, management, and
administration tasks. For example, controlling user access is primarily a
Domino system administrators responsibility, yet the application
developer may determine user access levels because they are often
integral to the database design. If you need to make design changes after
a database is in production, be sure to:

Rolling out a database


As you roll out your application, you need to work closely with your
Domino server administrator to organize your application on a server
and perform a set of administrative tasks. The following tables list the
mandatory and optional tasks that the Domino administrator performs to
put a database into production. You must have Manager access in a
database access control list (ACL) to perform these tasks.

Mandatory tasks
Perform these tasks before you copy a new database or database replica
to a production server.
For more information on the following tasks, as well as information
about replication, see Administering the Domino System.
Task

Considerations

Set up the database


ACL for users and
servers that require
access

If you plan to make replicas of a database, make sure


that the database ACL lists the name of each server
containing a replica. If the database uses roles, assign
all roles to each server.
If you assign ACL settings on the original database
before copying it to a server, assign yourself Manager
access on the original. Otherwise, you wont have
Manager access to the new copy.

Verify that server


ACLs are set up
correctly

Without proper access in a server ACL, users and


servers wont have access to databases on the server.

Verify that the


Domino Directory
contains the necessary
Group documents

Create a Group document in the Domino Directory


before adding a Group name in a database ACL. Make
sure that the Group document replicates before you
copy the database to a server.

Copy the new


database to a server

Consider server disk space, topology, and network


protocols. Placing a database on a cluster requires that
you consider cluster resources.

Verify that the


database appears in
the Open Database
dialog box

While designing a database, the database designer


often removes the database title from the list that
appears in the Open Database dialog box. This deters
the user from opening the database. After the database
is completed, make sure that the database title appears
in the Open Database dialog box.
continued

20-2 Application Development with Domino Designer

Task

Considerations

Decide which servers


require replicas of the
database and then
create the replicas

To make this decision, consider the purpose and size of


database, the number and location of users who need
access to the database, and the existing replication
schedules between servers.

Verify that Server


Server documents are, by default, enabled for
documents in the
replication, but to avoid any problems, verify this
Domino Directory are setting.
enabled for replication
Create or edit
Connection
documents

If several servers have a replica of the database, make


sure that any necessary Connection documents are set
up so that replication can occur.

Set up a replication
schedule

Consider the location and time zones of users and the


frequency of database updates needed.

Optional tasks
The following tasks are not required, but you may want to perform them
after your database is in production. Whether or not you need to do these
tasks depends on the type of database you are rolling out to the
production server and the roles assigned to an application developer,
database manager, or Domino administrator in your organization.
For more information on the following tasks, as well as information
about replication, see Administering the Domino System.
Considerations

Create About this database


and Using this database
documents

Provide the name, phone number, and e-mail


address of database managers in the About
this database document. Provide
information about the application in the
Using this database document.

Create an index for the database Create a full-text index for the database if
users need to search the database for
For information, see
Administering the Domino System. information. If you create the index before
you copy a new copy of the database or a
replica to a server, the index settings carry
over to the new copy or replica.
Distribute encryption keys.

If the database design includes encrypted


fields, distribute encryption keys to users.

Create a Mail-In Database


document.

If the database design includes encrypted


fields, distribute encryption keys to users.
continued

Deploying an Application 20-3

Deploying Applications

Task

Task

Considerations

List the database in the database


catalog.
For information, see
Administering the Domino System.

By default, all databases are listed in the


database catalog. If you wish, add categories
to control how the database appears in the
catalog views.

Publish the database in a


Create a library of selected databases on one
database library.
server or several servers for your users.
For information, see
Administering the Domino System.
Notify users that the database is Provide the database title, file name, and
available.
server location.

Copying a new database to a server


Plan the deployment of new databases before you copy them to a server.
Tasks to plan with your server administrator include:

Set up Server documents in the Domino Directory, including a


Mail-In Database document if the database is designed to receive
mail.

Make sure that users and other servers are listed in the servers
access control list.

Group related databases in subdirectories rather than copy them to


the root directory so that users can find related databases more
easily. This grouping also helps administrators to replicate like
databases, because Connection documents let you replicate
according to directory.

For more information on replication and server documents, see


Administering the Domino System.

To copy a new database to a server


1. Make sure that you have Manager access in the database ACL or the
Create new databases privilege in the Server Access section of the
Server Document in the Domino Directory.
2. Select the database icon from your bookmarks page. Choose File Database - Properties, click the Design tab, and make sure that
Show in Open Database dialog is selected.
3. Choose File - Database - New Copy.
4. Next to Server, click the arrow to display a list of servers. Then select
the server on which you want to place the copy.
20-4 Application Development with Domino Designer

5. Next to Title, enter a title for the database. The database icon and the
Open Database dialog box display this title.
6. Next to File Name, enter the path and file name of the database.
Limit the file name to eight characters plus the NSF extension.
7. Choose one:
Database design and documents to copy the database design
and all documents.
Database design only if you do not want to copy any
pre-existing documents.
8. Optional steps:
Choose Access Control List to copy the ACL.
You can assign ACL settings (including roles) before or after you
copy a local database to a server. Before you copy the database,
assign yourself Manager access to the ACL so that you will have
Manager access to the new copy. If you do not copy the ACL
when you copy the database to a server, the ACL in the new copy
automatically lists you with Manager access.
Select Create Full Text index to create a full-text index on the
new copy.
You can also create a full-text index at a later date.
Choose Encryption to encrypt the new copy of the database.

To allow a database to grow beyond the default 1GB limit, click


Size Limit, select a size, and click OK. This option applies only
to Release 4 format databases.
Note The maximum size for a Release 4 database is 4GB. The
maximum size for Release 5 and later databases is 64GB on Windows
and UNIX and 32GB on OS/2.
For more information on encryption, see the chapter Application
Security.

Deploying an Application 20-5

Deploying Applications

This option is intended to prevent unauthorized users from


accessing a database from a workstation, laptop computer, or
server. If you use this option, Notes encrypts the database using a
specified ID and only a user with that ID can gain access to the
database. You can choose one of three encryption levels. This
encryption setting also carries over to copies of the database made
at the operating system level.

Setting up replication for an application


As you prepare to deploy an application, you must work with your
Domino server administrator to create a replication plan. Replication
allows replica copies of databases to exchange updates. You can replicate
both design elements and database content between replica copies.
Replication can be unidirectional for example you can push out design
changes but not receive any, or it can be directional, in which cases
changes are both sent and received. Generally you perform design work
on one copy of a database for example, you might keep a copy on
your local hard drive then you replicate design changes to database
replicas on servers.
The following topics describe the tasks involved with creating and
maintaining replicas. If you have full access rights to post a database on a
Domino server you can perform these tasks yourself; if not, you need to
work with a server administrator to create and maintain replicas.

Creating one replica manually


Follow these steps to create one replica of a database if you dont have
access to the Domino Administrator or if you want to customize settings
for the replica as you create it.
1. Make sure that you:
Have Create Replica access in the Server document of the
destination server.
Have at least Reader access in the ACL of the databases on the
source server.
2. Make sure that the source server:
Has Create Replica access in the Server document of the
destination server.
Is cross-certified with the destination server if the two servers are
in different Domino domains and dont share a common certifier.
3. Make sure that the destination server:
Has at least Reader access in the ACL of the source replica.
Is cross-certified with the source server if the two servers are in
different Domino domains and dont share a common certifier.
4. Open the database.

20-6 Application Development with Domino Designer

5. Choose File - Replication - New Replica.


Note Do not choose File - Database - New Copy to create a replica.
If you use this command, the replica ID of the copy is different from
the original, and the two databases cant replicate.
6. Next to Server, click the arrow and select the destination server on
which you want to place the new replica.
7. Specify the file name and title for the new replica. Any file name you
choose must be unique to the workstation or server on which you
place the replica. The file name doesnt replicate. To put the replica
in a folder within the data folder, next to File name type the folder
name, backslash, and then the file name for example,
JOBS\POSTINGS. If the specified folder does not exist, Domino
creates it for you.
8. (Optional) Click Replication settings to select replication settings
for the new replica.
9. (Optional) Click Encryption, select Locally encrypt this database
using, and click OK to encrypt the database with the server ID file.
Choosing this option prevents users from copying or replicating the
database to their workstations and prevents users from accessing the
database directly at the server. This feature works only if the
database ACL specifies the server as the user type Server or
Server group.

10. (Optional) For Release 4 format databases only: To allow a database


to grow beyond the default 1GB limit, click Size Limit, select an
option, and click OK.
For more information, see the chapter Optimizing Database
Performance and Size.
11. Choose one of the following:
Create: Immediately to populate the new replica now. You must
wait while all information replicates to the new replica.
Create: Next scheduled replication to create a replica stub that is
populated when the destination server next replicates with the
source server. Consider selecting Create: Next scheduled
replication if the database is large or youre creating a series of
replica databases and you dont want to wait while the initial
replication of documents occurs.

Deploying an Application 20-7

Deploying Applications

For more information on encryption, see the chapter Application


Security.

12. Select Copy Access Control List to copy the ACL from the original
to the new replica. If you want to be a Manager of the new replica,
make sure you have Manager access in the ACL of the original. Or to
automatically give yourself Manager access to the new replica,
deselect Copy Access Control List. Make sure the server on which
youre creating the replica is included in the ACL and any design
element access lists.
13. (Optional) Select Create full text index for searching to create a
full-text index on the new replica.
For more information on full-text indexes, see Administering the
Domino System.
14. Click OK.

Replication settings
By default, two replicas exchange all edits, additions, and deletions if the
servers the replicas are on have the necessary access. However, you can
customize replication. For example, to save disk space, you can prevent
the transfer of irrelevant documents. Using replication settings, you can:

Limit the contents of a replica

Limit what a replica sends to other replicas

Assign miscellaneous replication settings, such as a replication


priority

You can specify replication settings when you create a replica or on an


existing replica. You can specify some replication settings for multiple
replicas at once from one replica. You must have Manager access to a
replica to set replication settings for it.
Caution Replication settings are not intended to be used as a security
measure.

20-8 Application Development with Domino Designer

This table summarizes the available replication settings. An asterisk (*)


marks the settings you can manage for multiple replicas from a central
source replica.
Setting

Controls

Panel in File Replication Settings dialog box

Remove documents not


modified in the last x
days

When Domino purges document Space Savers panel


deletion stubs and, optionally,
unmodified documents.

Only replicate incoming The cutoff date, so that a replica Other panel
only receives documents created
documents saved or
or modified since the date.
modified after: date
Which documents are scanned
during the first replication after
clearing the replication history.
The size of documents that a
replica receives.

Space Savers panel

Replicate a subset of
documents*

Which documents a replica


receives.

Space Savers panel


Advanced panel

Replicate*

Which non-document elements


this replica receives.

Advanced panel

Do not send deletions


made in this replica to
other replicas

Whether a replica can send


document deletions to other
replicas.

Send panel

Do not send changes in


database title and
catalog info to other
replicas

Whether a replica can send


Send panel
changes to the database title and
Database Catalog categories to
other replicas.

Do not send changes in


local security property
to other replicas

Whether a replica can send


changes to the Encryption
database property (in the Basics
tab of the Database properties
box) to other replicas.

Send panel

Temporarily disable
replication

Whether a replica can replicate.

Other panel

Scheduled replication
priority

The replication priority of a


database used in Connection
documents for scheduling
replication.

Other panel

CD-ROM publishing
date

The publishing date for a


database on a CD-ROM.

Other panel

Deploying an Application 20-9

Deploying Applications

Receive summary and


40KB of rich text only

Limiting the contents of a replica


Use the following replication settings in the File - Replication Settings
dialog box to limit the size of a replica or to display a subset of
information relevant to a particular group of users.
Remove documents not modified in the last x days (Space Savers
panel)
The number of days specified here, known as the purge interval, controls
when Domino purges deletion stubs from a database. Deletion stubs are
markers that remain from deleted documents so that Domino knows to
delete documents in other replicas of the database. Because deletion
stubs take up disk space, Domino regularly removes deletion stubs that
are at least as old as the value specified. It checks for deletion stubs that
require removal at 1/3 of the purge interval. For example, assuming the
default value, 90 days, when a user opens a database, Domino checks if it
has been at least 30 days since it removed deletion stubs, and if so it
removes any deletion stubs that are at least 90 days old. The Updall task,
which runs by default at 2:00 AM, also removes deletion stubs.
You can shorten the purge interval, if you want, but be sure to replicate
more frequently than the purge interval; otherwise, deleted documents
can be replicated back to the replica.
Optionally, you can select the check box to remove documents in the
replica that havent changed within the purge interval. If you select the
check box, when Domino removes deletion stubs it also removes
documents that havent changed within the specified number of days.
These documents are purged, meaning no deletion stubs remain for the
documents, so the documents arent deleted in other replicas. The Only
Replicate Incoming Documents Saved or Modified After: date setting
prevents the purged documents from reappearing through replication. If
the other replicas have this check box selected, similar document purging
occurs in them.
Caution If you select the check box on a database that does not
replicate, documents are lost and you can only recover them from a
system backup.
Note Domino regularly removes deletion stubs according to the purge
interval even if you dont select the check box.

20-10 Application Development with Domino Designer

Only Replicate Incoming Documents Saved or Modified After: date


(Other panel)
A replica can only receive documents created or modified since the date
specified. If you clear the database replication history, during the next
replication, Domino scans only documents created or modified since the
date specified here. If you clear the date before clearing the replication
history, Domino scans all documents in the database.
Use this option in conjunction with clearing the replication history to
solve replication problems. If you clear or change this date, when
Domino next purges deletion stubs, it resets the date to correspond to the
number of days specified in Remove documents not modified in the last
x days setting. For example, if Domino purges deletion stubs on 1/1/99
and the Remove documents not modified in the last x days setting is
90, on 1/1/99 Domino resets the date to 10/1/98. If the check box is
selected in the Remove documents not modified in the last x days
setting meaning documents that meet the purge interval criteria are
purged as well as deletion stubs this automatic date reset ensures that
the purged documents arent replicated back into the replica.
For more information on the replication history, see Administering the
Domino System.

When users open a shortened document, they see (TRUNCATED) in


the document title. To view the entire document, users must choose
Actions - Retrieve Entire Document from the open document.
Keep the following points in mind when using this setting:

Users cant categorize or edit shortened documents.

Agents dont work on shortened documents.

Shortened documents replicate only if the destination replica also has


this option selected.

Replicate a subset of documents (Space Savers Advanced panel)


Use this setting to specify that a replica receives only the documents in a
specific folder or view or only documents that meet selection criteria
specified in a formula. Replication formulas are similar to view selection
formulas.

Deploying an Application 20-11

Deploying Applications

Receive summary and 40KB of rich text only (Space Savers panel)
If you select this setting, Domino prevents large attachments from
replicating and shortens the documents that this replica receives. The
shortened documents contain only a document summary that includes
basic information, such as the author and subject, and the first 40KB of
rich text.

For more information on view selection formulas, see the chapter


Designing Views.
Keep in mind the following points when you use replication formulas:

You cannot use @DbLookup, @UserName, @Environment, or @Now


in a replication formula.

Using @IsResponseDoc in a replication formula causes all response


documents in a database to replicate, not just those that meet the
selection criteria. Use @AllChildren or @AllDescendants instead and
make sure the database performance property Dont support
specialized response hierarchy is not selected.

For more information on database performance properties, see the


chapter Optimizing and Troubleshooting Databases.
Replicate (Advanced panel)
Use this setting to control which non-document elements a replica
receives. This table describes the Replicate options:
Replicate

Default

Description

Forms, views,
and so on

Selected If selected, allows a replica to receive design


changes, such as changes to forms, views, and
folders from a source replica.
If deselected, prevents a replica from receiving
design changes. Alternatively, you can assign
source servers Editor access or lower in the ACL;
however, doing so prevents agents from replicating.
Dont select this option when you first create the
replica because the new replica wont contain any
design elements for displaying information.

Agents

Selected If selected, allows a replica to receive agents. If


deselected, prevents the replica from receiving
agents, although the replica still receives changes
made by the agents.

Replication
formula

If selected, ensures that replication settings specified


Not
selected for multiple destination replicas from one source
replica can replicate. This option is required if
youre using a central source replica to manage
replication settings for multiple replicas.

Access control
list

Selected If selected, allows the replica to receive ACL


changes from any server that has Manager access in
the replicas ACL.
continued

20-12 Application Development with Domino Designer

Replicate

Default

Description

Deletions

Selected If selected, allows the replica to receive document


deletions. If deselected, the replica wont receive
deletions through replication, but users assigned
Delete documents access in the replica ACL can
still delete documents from the replica.
If Do not send deletions made in this replica to
other replicas (on the Send panel of the Replication
Settings dialog box) is selected for the source
replica, this replica wont receive deletions from the
source replica, regardless of this setting.

Fields

If deselected, the replica receives all fields in each


Not
selected document received. If selected, you select a subset
of fields to receive, but you should only do this if
you have a thorough knowledge of application
design.
If youre replicating a Domino Directory, you can
also choose among minimal Address Book options.
These options provide a way for mobile users to
replicate a small version of a Domino Directory
locally. The minimal Address Book options are also
available in the Space Savers panel.
Note that users can also use a mobile directory
catalog to have local access to names in a Domino
Directory.

Assigning miscellaneous replication settings


The Other panel of the Replication Settings dialog box includes these
miscellaneous settings.
Temporarily disable replication
Select this option to temporarily suspend replication while you
troubleshoot a problem. You can select this for one database, or if you
use the Domino Administrator, you can disable replication of multiple
databases. If a database is on a cluster server, disabling replication
suspends both cluster replication and scheduled replication.
Scheduled replication priority
You can assign a replication priority of High, Medium, or Low to a
database. Then in a Connection document, you can schedule replication
so that databases of a particular priority replicate at specific times. For
example, you can schedule low-priority databases to replicate less
Deploying an Application 20-13

Deploying Applications

For information on directory catalogs, see Administering the Domino


System.

frequently and schedule high-priority databases to replicate more


frequently. If you assign a different priority to two replicas, the priority
of the replica on the server that initiates the scheduled replication takes
precedence.
Replication priority doesnt apply to replicas on a server cluster. Cluster
replication occurs whenever a change occurs, not according to schedules
in Connection documents.
For information on connecting servers for replication, see Administering
the Domino System.
CD-ROM publishing date
Some organizations for example, publishing companies distribute
databases on CD-ROM rather than replicate them. To receive updates,
users replicate with a replica on the organizations server. The users
specify the date the information was published on the CD-ROM so that
the first replication with the organizations replica scans only documents
created or modified since the publication date. If users do not specify the
date, the initial replication unnecessarily scans the entire database, which
can be a slow process, especially if it occurs over a dial-up connection.

Limiting what a replica sends


Use these settings to limit what one replica sends to other replicas.
Do not send deletions made in this replica to other replicas
This setting prevents deletions made in this replica from replicating. As
an alternative, you can deselect the ACL option Delete documents for
the server storing this replica.
Do not send changes in database title & catalog info to other
replicas
This setting prevents changes made to this replicas database title or
Database Catalog categories from replicating.
Do not send changes in local security property to other replicas
This setting prevents changes to the database Encryption property (set by
choosing Encryption on the Basics tab of the Database Properties box).
Use this primarily to prevent changes made to this property on a local
replica from replicating to a server. For example, if this setting is selected
and you disable the Encryption property on a local replica, the property
remains selected on a server replica.
For information on database ACLs, as well as information on the
Encryption property, see the chapter Restricting Access to and Securing
Parts of an Application.
20-14 Application Development with Domino Designer

Specifying replication settings


You can specify replication settings for a single replica, or you can
customize replication settings for multiple replicas of a database from
one central source replica and then replicate these custom settings to the
appropriate replicas. This approach to customizing replication allows
you to centralize replication management and requires that you know
the replication requirements for each replica.
The only centralized replication settings you can specify are Replicate a
subset of documents, to control which documents a replica receives, and
Replicate, to control which non-document elements a replica receives.
Note that changing centrally-managed replication settings requires two
replications for the changes to take effect: the first replication to replicate
the new settings from the source server to the destination servers and a
second replication to replicate based on the new settings. The second
replication doesnt occur until the source database is updated in some
other way; to force the new settings to take effect if the source database
isnt updated, clear the replication history.
For information on clearing the replication history, see Administering the
Domino System.
To specify replication settings for a single replica
1. Do one of the following:

To modify replication settings on an existing replica, open the


replica and choose File - Replication - Settings. This requires
Manager access.
2. Click the Space Savers panel and then select/deselect options.
3. Click the Send panel and then select/deselect options to limit what
the replica can send to other replicas.
4. Click the Other panel and then select/deselect options.
5. Click the Advanced panel and then select/deselect any of the options
under Replicate. Ignore the options above Replicate; these are
used for managing replication settings for multiple replicas of a
database from one central source replica.
6. Click OK.

Deploying an Application 20-15

Deploying Applications

To specify replication settings for a replica as you create it, click


Replication Settings in the New Replica dialog box.

To specify replication settings for multiple replicas from one source


replica
1. Make sure you understand replication settings.
2. Make sure you have Manager access in the ACL of the central source
replica. Make sure that the central source replica has Manager access
in the ACL of all destination replicas.
3. Do one of the following:
Click Replication Settings in the New Replica dialog box to
specify replication settings for a new replica.
Open the central source replica, and then choose File - Replication
- Settings to modify existing replication settings.
4. Click the Advanced panel.
5. To specify a destination server, click the computer icon next to
When computer, specify the name of the destination server, select
Add Server, then click OK. To specify a Notes client as a
destination server, enter the Notes clients hierarchical name.
6. To specify a source server, click the computer icon next to Receives
from, specify the name of a source server, select Add Server, then
click OK. To specify the name of a Notes client as a source server,
enter the Notes clients hierarchical name.
7. To delete a server that is selected as replication target, click either
computer icon, select a server, select Delete Server, then click OK.
8. To have the specified destination replica receive a subset of
documents, click Replicate a subset of documents and then specify
the views or folders to replicate or specify a replication formula.
9. To specify which non-document elements the replica should receive,
select appropriate options under Replicate. You must select
Replication formula.
10. Repeat Steps 5 through 9 for each additional destination and source
server combination.
11. Click OK.

Examples of specifying replication settings for multiple replicas


The following examples describe scenarios for various types of
replication.
Using the same replication settings for all destination servers
The Acme Corporation has a Technical Support database on the server
Support-E/East/Acme, which contains information about customer
problems and problem resolutions. The database displays customer
20-16 Application Development with Domino Designer

suggestions made during the support calls in a view called Customer


Suggestions. Acme has three servers at satellite sales offices:
Sales-Bos-E/East/Acme, Sales-Phil-E/East/Acme, and
Sales-Hart-E/East/Acme. The satellite sales offices are interested only in
customer suggestions and not in other details of technical support calls.
Only the contents of the Customer Suggestions view replicate to the
satellite sales office servers. To accomplish this, it completes the
replication settings dialog box on the Technical Support database on
Support-E/East/Acme as follows, replicating everything except field
data. Note that although the When computer box shows only
Sales-Bos-E/East/Acme, there are similar settings for
Sales-Phil-E/East/Acme and Sales-Hart-E/East/Acme.

Deploying an Application 20-17

Deploying Applications

Using separate replication settings for each destination server


The Acme Corporation has a database called Sales Leads on the server
Sales-E/East/Acme. Acme has three servers at satellite sales offices:
Sales-Bos-E/East/Acme, Sales-Phil-E/East/Acme, and
Sales-Hart-E/East/Acme. Each satellite sales office is interested only in
leads pertaining to its area. Each document in the Sales Leads database
includes the field Office with one of these keywords selected: Boston,
Philadelphia, or Hartford. To replicate only sales leads pertaining to
Boston to Sales-Bos-E/East/Acme, Acme completes the replication
settings dialog box on the Sales Leads database on Sales-E/East/Acme as
follows, using a replication formula to limit replication to documents
containing the keyword Boston along with all descendants of those
documents.

Acme sets up replication from Sales-E/East/Acme to


Sales-Phil-E/East/Acme and to Sales-Hart-E/East/Acme in a similar
fashion.
Note Although these examples describe server-to-server replication,
you could use similar settings to configure replication between a central
source replica and replicas on Notes clients. For example, salespeople
could replicate directly with the source replica and receive only leads
pertinent to their areas. To accomplish this, specify Notes users
hierarchical names as destination servers.

Disabling and enabling replication of a database


You can disable replication of a database for example, to stop
replication while you troubleshoot problems. Then, after you correct the
problem, enable replication again. You can disable and enable replication
of one database, or you can use the Domino Administrator, to disable
and enable replication of multiple databases at once.

To disable replication of one database


1. Open the database and choose File - Replication - Settings.
2. Select Other.
3. Select Temporarily disable replication and then click OK.
To enable replication again, repeat the procedure, but in Step 3 deselect
Temporarily disable replication.

20-18 Application Development with Domino Designer

To disable replication of multiple databases


To disable replication of multiple databases, you must use Domino
Administrator.
For information on disabling replication of multiple databases, see
Administering the Domino System.

Forcing a server database to replicate


Replication between database replicas on servers typically occurs
according to schedules in Connection documents. You might want to
force replication between two replicas, rather than wait for replication to
occur on schedule, for example, you might force replication when you
want to test replication settings or troubleshoot replication problems.
You can force replication either from a database or from the server
console.
For information on creating Connection documents to schedule
replication between servers, see Administering the Domino System.

To force replication from the server console


If you are a server administrator, you can use a database option with the
Replicate, Pull, or Push server commands to force replication of a specific
database that two servers have in common.
Use the Replicate command to send changes to and receive changes
from a specified server.

Use the Pull command to receive changes from a specified server.

Use the Push command to send changes to a specified server.

For example, to send changes to the database PRODUCTS.NSF from the


server Webstage-E/East/Acme to the server Web/East/Acme, enter the
following command from the server console on Webstage-E/East/Acme:
Push Web/East/Acme Products.nsf

For more information on these commands, see Administering the Domino


System.

To force replication from the database


1. Open the database.
2. Choose File - Replication - Replicate.
3. Select Replicate with options and click OK.

Deploying an Application 20-19

Deploying Applications

4. Select the server that stores the replica with which you want to
replicate.
5. Select Send documents to server to send updates from the replica
selected on your workspace to the server selected in Step 4.
6. Select Receive documents from server to send updates from the
server selected in Step 4 to the replica selected on your workspace.
7. Click OK.

20-20 Application Development with Domino Designer

Chapter 21
Optimizing and Troubleshooting Databases
To optimize database performance, you can set properties for individual
databases and configure the database cache to improve overall database
access time on a server. To keep a database size to a minimum, you can set
database properties that save disk space, compact databases, set database
size quotas, and regularly delete inactive documents in databases.

Setting advanced database properties


Set advanced database properties to:

Optimize database performance

Enable or disable transaction logging

Allow more fields in a database

Allow soft deletions

Use LZ1 compression for attachments

Properly setting database properties can improve the performance of an


active database. Setting database performance properties on many
databases or on one, large, active database can also improve server
performance. In addition, some of these property settings also help
reduce the size of databases.
Many of these properties require knowledge of application design.
Database designers often set these properties when they create databases.

Display images after documents


To quickly display documents that contain images, select the Basics
database property Display images after loading. Then Notes users can
read the text while the images load. If you dont load images after text,
Notes loads images in the order in which they appear in a document; if
an image appears first, Notes loads it before displaying text. With large
images or slow connections, loading images in order may slow the
display of the document.
21-1

Deploying Applications

Properties that improve database performance

This setting applies only when using Notes to view databases; Web
browser settings control the display of images to Web browser users.
Tip Users also can specify Load images: On request in the Advanced
section of a Location document to display images only when users click
them. For more information, see Lotus Notes 6 Help.

Prevent the use of stored forms


To ensure that a document always displays correctly, you can store the
form with the document. However, storing a form with every document
uses system memory and may require as much as 20 times more disk
space than not doing so. To save memory and disk space, you may want
to prevent the use of stored forms, especially if users experience
performance problems when trying to read the documents. To prevent
the use of stored forms, deselect the Basics database property Allow use
of stored forms in this database. Before preventing the use of stored
forms, make sure you understand how this design feature works and
how the database uses it.
For information on storing a form with a document, see the chapter
Designing Forms.

Don't maintain unread marks


Maintaining unread marks in a database requires system resources and
can significantly slow database performance. For some databases, unread
marks arent useful for example, reference databases such as the Help
databases provided with Domino, administration databases such as the
Domino Directory, or databases such as the log file (LOG.NSF) that are
continually updated. In these types of databases, consider disabling
unread marks. To disable unread marks, select the Advanced database
property Dont maintain unread marks.
Note Designing views that dont display unread marks doesnt improve
database performance because they are still maintained but not
displayed.
If you select or deselect the Dont maintain unread marks property,
you must compact the database so that the setting takes effect.
Compacting in this case makes a temporary copy of the database, so your
system must have the disk space to make the copy.
Tip You can also run the Compact server task with the -u or -U option
to enable or disable this property and then compact.
For information on compacting databases, see the book Administering the
Domino System.

21-2 Application Development with Domino Designer

Associate document tables with forms for view updates


When updating a view, Domino refers to tables of document information.
These tables are stored internally in the database. By default, during view
updates and rebuilds, Domino searches each table for documents that
appear in the view being updated. To update views more efficiently,
select the Advanced database property Document table bitmap
optimization. This property associates tables with the forms used by the
documents the tables contain. Then during a view update, Domino
searches only the tables associated with the forms used by documents in
the view being updated. This significantly improves the performance of
view updates, especially updates of small views within large databases
for example, the Connections view in the Domino Directory.
This property only works for views that use Form= as part of the
selection criteria. Theres a slight performance cost to maintaining the
table/form association; however, when updating small views in large
databases, the benefits offset the cost.
If you select or deselect the Document table bitmap optimization
property, you must compact the database so that the setting takes effect.
Compacting in this case makes a temporary copy of the database, so your
system must have the disk space to make the copy.
Tip You can also run the Compact server task with the -F or -f option to
enable or disable this property and then compact.

Prevent overwriting of deleted data


When data is deleted from databases, Domino, by default, overwrites the
deleted data on disk with a pattern. This pattern prevents an
unauthorized user from using a utility to access the data. This
overwriting affects disk I/O and can affect database performance.
Preventing the overwriting of deleted data is appropriate in these
circumstances:

The data is already secure for example, the database is on a server


in a locked room.

Deleted space in the database is constantly reallocated for


example, in a system database such as MAIL.BOX.

Data security isnt an issue for example, in an informal discussion


database.

To prevent the overwriting of deleted data, select the Advanced database


property Dont overwrite free space.
Optimizing and Troubleshooting Databases 21-3

Deploying Applications

For information on compacting databases, see the book Administering the


Domino System.

Don't maintain Accessed (In this file) document property


The Document Properties box displays the property Accessed (In this
file) which can show the date a document was last modified or read.
The Advanced database property Maintain LastAccessed property
controls whether the Accessed (In this file) property is updated if the
last document access was a read. Maintaining the Accessed (In this
file) property for reads causes disk I/O that wouldnt otherwise occur.
By default, the database property Maintain LastAccessed property is
not selected, meaning the Accessed (In this file) property isnt updated
when the last document access was a read, only when the last access was
a document modification. Change the default behavior by selecting
Maintain LastAccessed property.
You should select Maintain LastAccessed property if you use the
document archiving tool, available in the Database Properties box, to
delete documents based on days of inactivity.

Disable specialized response hierarchy information


By default every document stores information that associates it with a
parent document or a response document. Only the @functions
@AllChildren and @AllDescendants, which are often used in view
selection and replication formulas, use this stored information.
Maintaining this information has a significant, negative effect on
database performance.
To improve database performance, disable the response hierarchy
information in databases that dont use these @functions by selecting the
Advanced database property Dont support specialized response
hierarchy.
Disabling the response hierarchy information has no effect on views and
replication formulas that display information hierarchically without
using @AllChildren and @AllDescendants.
Disabling the response hierarchy information sets
NotesDocument.Responses to 0 documents.
If you select or deselect the Dont support specialized response
hierarchy property, you must compact the database so that the setting
takes effect. Compacting in this case makes a temporary copy of the
database, so your system must have the disk space to make the copy.
Tip You can also run the Compact server task with the -h or -H option
to enable or disable this property and then compact.
For information on compacting databases, see the book Administering the
Domino System.
21-4 Application Development with Domino Designer

Disable transaction logging


Transaction logging captures all the changes made to a database and
writes them to a transaction log. The logged transactions are then written
to disk in a batch, either when resources are available or when
scheduled. Disable the transaction log can improve database
performance.
For information on transaction logging, see the book Administering the
Domino System.

Prevent headline monitoring


Users can set up headline monitoring to automatically monitor databases
for information that interests them. Monitoring a database this way
affects performance, especially if many users do this. To prevent users
from monitoring a database, select the Advanced database property
Dont allow headline monitoring.
Administrators can also use the Security section of a Server document in
the Domino Directory to control headline monitoring at the server level.

Allow more fields in a database


You can increase the number of fields in a database by selecting the
advanced database property Allow more fields in database which
allows the database to contain up to 23,000 fields.

Use LZ1 compression for attachments


In Lotus Domino Designer 6, you can choose to compress attachments
using the new LZ1 algorithm instead of the Huffman algorithm. Because
LZ1 compression can be performed quickly and efficiently, it is favored
over the Huffman method. However, if you are working in an
environment that uses different versions of client and server software
(for example, a Lotus Domino Designer 6 client and an R5 server) and
you choose this option, attachments are automatically recompressed on
the server using the Huffman method. Note that recompressing has
performance implications. For best performance, use LZ1 in primarily
Domino 6 environments.

Optimizing and Troubleshooting Databases 21-5

Deploying Applications

For a database without this option selected, all the field names in a
database when concatenated cannot exceed 64 kilobytes, which results in
a database limit of approximately 3000 fields.

Limit the size of $UpdatedBy fields


Every document includes an $UpdatedBy field that stores, by default, the
name of the user or server associated with each document editing
session. Storing a complete edit history consumes disk space and slows
view updates and replication. To conserve disk space and improve
database performance, use the Advanced database property Limit
entries in $UpdatedBy fields to specify the number of entries that the
$UpdatedBy field can contain. When the $UpdatedBy field reaches this
limit, the oldest entry is removed to make room for the newest entry.

Limit the size of $Revisions fields


Every document includes a $Revisions field that stores, by default, the
date and time of each document editing session. Domino uses this field
to resolve replication or save conflicts that occur when two users
simultaneously edit the same document on one replica or edit the same
document on different replicas between replications.
By default, the $Revisions field stores a history of up to 500 edit sessions,
each of which requires 8 bytes of disk space. Over time, $Revisions fields
can grow large, taking up disk space and slowing view updates and
replication. To conserve disk space and improve database performance,
use the Advanced database property Limit entries in $Revisions fields
to specify the number of entries that the $Revisions field can contain.
When the $Revisions field reaches this limit, the oldest entry is removed
to make room for the newest entry.
Consider limiting the entries in $Revisions fields on a database with all of
the following characteristics:

The database contains many documents.

The database replicates often or has no replicas.

The database contains documents that are not often edited.

A suggested upper limit is 10 entries in the $Revisions field. If you set the
limit lower than 10, you run the risk of increased replication or save
conflicts.

Specify expiration time for soft deletions


When Allow soft deletions is selected, documents marked for deletion
are held in the database for a specified time before they are deleted. On
the Advanced tab of the Database Properties box, you can specify the
number of hours documents are held before they are deleted from the
database.

21-6 Application Development with Domino Designer

To set database properties that optimize database performance


You can set database properties to optimize database performance and to
reduce database size. Set database performance properties by opening
the Database Properties box on an existing database or as you create a
database.
Make sure you fully understand these database properties before
changing their settings.
1. Make sure you have Designer or Manager access in the database
ACL.
2. Do one of the following:
Open a database and choose File - Database - Properties.
As you create a new database, click the Advanced button.
3. Select or deselect properties listed in the table below.
4. After you select any of these three properties, compact the database
for the property to take effect:
Dont maintain unread marks
Document table bitmap optimization
Dont support specialized response hierarchy
Tip You can use the compact task with specific options to enable or
disable the above three properties and then compact the database.
Tab

To optimize
performance/size

Improves
database
performance?

Reduces
database
size?

Allow use of stored


forms in this database

Basics

Deselect option

Yes

Yes

Display images after


loading

Basics

Select option

Yes

No

Dont maintain unread


marks

Advanced Select option

Yes

Yes

Document table bitmap Advanced Select option


optimization

Yes

No

Dont overwrite free


space

Yes

No

Yes

No

Advanced Select option

Maintain LastAccessed Advanced Deselect option


property

continued

Optimizing and Troubleshooting Databases 21-7

Deploying Applications

Property

Property

Tab

To optimize
performance/size

Improves
database
performance?

Reduces
database
size?

Dont support
specialized response
hierarchy

Advanced Select the option Yes

Slightly

Dont allow headline


monitoring

Advanced Select the option Prevents


performance
degradation

No

Limit entries in
$UpdatedBy fields

Advanced Select the option Yes


and specify the
number of
entries
$UpdatedBy
fields can
contain

Yes

Limit entries in
$Revisions fields

Advanced Select the option Yes


and specify a
limit on the
number of
entries
$Revisions fields
can contain. The
suggested limit
is 10 entries.

Yes

Controlling database size


Databases whose size is monitored and minimized show increased
performance: database operations require less I/O and fewer CPU
resources; view rebuilding and updating is quicker; and memory and
disk space allocation is improved. The maximum database size is 64GB
on Windows and UNIX. Use the following methods to regularly monitor
the size of databases and minimize database size:

Compact databases

Set database size quotas to prevent databases from growing beyond


a specified size

Delete inactive documents using the document archiving tool or


using agents

Set database performance properties that also reduce database size

Use replication settings to limit the size of a replica by replicating to


it only whats necessary

21-8 Application Development with Domino Designer

Decrease the database purge interval to remove deletion stubs more


often

Disable the default user activity recording in databases

Disable soft deletions in databases

For information on replication settings and the database purge interval


and user activity recording, see the book Administering the Domino
System.

Monitoring database size


Use the following method to monitor database size and used space in a
database.
1. Open the database and choose File - Database - Properties.
2. Click the Info tab (i) to see the size of the database.
3. Click % Used to display the percentage of database space in use.
For information on other methods of monitoring database size, such as
the Statistics Collector task, as well as Log Analysis and Event Monitors,
see Administering the Domino System.

Compacting databases

Styles of compacting
There are three styles of compacting:

In-place compacting with space recovery

In-place compacting with space recovery and reduction in file size

Copy-style compacting

In-place compacting with space recovery only


This style of compacting recovers unused space in a database but doesnt
reduce the size of the database on disk. Databases retain the same
database instance IDs (DBIIDs), so the relationship between the
compacted databases and the transaction log remains intact. Users and
servers can continue to access and edit databases during compacting.
Optimizing and Troubleshooting Databases 21-9

Deploying Applications

When documents and attachments are deleted from a database, Domino


tries to reuse the unused space, rather than immediately reduce the file
size. Sometimes Domino wont be able to reuse the space or, because of
fragmentation, cant reuse the space effectively until you compact the
database.

This style of compacting is useful for databases that you expect to stay
the same size or to grow in size.
When you run Compact without specifying options, Domino uses this
style of compacting on all databases enabled for transaction logging.
Domino also uses this style of compacting when you use the -b option
(case sensitive) when compacting any database.
Tip Use this compacting method the most frequently it is the fastest
method and causes the least system impact.
In-place compacting with space recovery and reduction in file size
This style of compacting reduces the file size of databases as well as
recovers unused space in databases. This style of compacting is
somewhat slower than in-place compacting with space recovery only.
This style of compacting assigns new DBIIDs to databases, so if you use it
on logged databases and you use a certified backup utility, perform full
backups of the databases shortly after compacting is complete. This style
of compacting allows users and servers to continue to access and edit
databases during compacting.
When you run Compact without specifying options, Domino uses this
style of compacting on databases that arent enabled for transaction
logging. Domino also uses this style of compacting when you use the -B
option. To optimize disk space, its recommended that you run Compact
using the -B option on all databases once a week or once a month.
Copy-style compacting
Copy-style compacting creates copies of databases and then deletes the
original databases after compacting completes, so extra disk space is
required to make the database copies. This style of compacting
essentially creates a new database with a new database ID. If you use
copy-style compacting on logged databases (using the -c option),
compacting assigns new DBIIDs, so if you use a certified backup utility,
you should perform full backups of databases shortly after compacting
completes. When you use copy-style compacting, users and servers cant
edit databases during compacting, and they can only read databases if
the -L option is used.
Domino uses copy-style compacting by default when you use an option
with Compact to enable a database property that requires a structural
change to a database or when you run Compact on a database that has a
structural change pending that was initiated from the Database
Properties box. Enabling or disabling the database properties Document
table bitmap optimization and Dont support specialized response
hierarchy require structural database changes.
The following table compares the three styles of compacting.
21-10 Application Development with Domino Designer

Characteristics

In place, space
recovery

In place, space
Copy-style
recovery with file
size reduction

Databases that use it


when compact runs
without options

Logged
databases with
no pending
structural
changes

Unlogged
databases with
no pending
structural
changes

Databases you can use it


on

Current release

Current release Current release


(need -c)

Relative speed

Fastest

Medium

Slowest

Users can read databases


during compacting

Yes

Yes

No (unless -L
option used)

Users can edit databases


during compacting

Yes

Yes

No

Reduction in file size

No

Yes

Yes

Extra disk space required

No

No

Yes

Databases with
pending
structural
changes

If you have specified a value for the Num_Compact_Rename_Retries


setting, Domino waits 30 seconds before trying to rename a database that
was copy-style compacted. You can request a different amount of time to
wait by specifying the value of the Compact_Retry_Rename_Wait setting
in the NOTES.INI file. For example, to request that Domino wait 2
minutes before trying to rename a database that was copy-style
compacted, specify Compact_Retry_Rename_Wait=120.
Domino enforces the following upper limit when trying to rename a
copy-style compacted database:
Num_Compact_Rename_Retries x Compact_Retry_Rename_Wait <= 60
minutes.

Optimizing and Troubleshooting Databases 21-11

Deploying Applications

Renaming a copy-style compacted database


Domino attempts only once to rename a database that was copy-style
compacted. You can request successive attempts by specifying the value
of the Num_Compact_Rename_Retries setting in the NOTES.INI file.
Domino tries to rename until it succeeds or the number of retries is
exhausted. For example, to request that Domino try once again to
rename, specify Num_Compact_Rename_Retries=1; to request that
Domino try 5 more times to rename, specify
Num_Compact_Rename_Retries=5.

When to compact databases


Its recommended that you compact databases weekly or monthly using
the -B option to recover disk space. If you use a certified backup utility,
remember to run it after compacting is complete.
Also compact databases to:

Enable or disable specific database properties for example,


transaction logging

Run the document archiving tool on server databases that are


configured for document deletion and archiving

Fix corrupted databases

For information on transaction logging, see the chapter Transaction


Logging and Recovery. For information on the document archiving tool,
see the topic Running the document archiving tool later in this chapter.
Note The Database - Sizes view of the log file (LOG.NSF), the File
Statistic reports generated by the Statistics Collector server task, and the
Info tab (i tab) of the Database Properties box, all report the percentage of
used space in a database. These are often not accurate indicators of used
space; therefore, you shouldnt use them.

Document archiving tool


Users or server administrators can copy documents in a database that
meet specified criteria to an archive database and then delete the
documents from the database. When documents that meet the specified
criteria are deleted from the database, replica stubs remain so that
deletions can replicate if there are replicas of the database.
Users or administrators can archive documents based on days since the
documents were last read, last modified, and/or marked as expired.
From Designer, you enable archiving and specify settings that control
what happens when a database is archived.

To enable database archiving


1. Select a database and choose Edit - Properties or right-click the
database name and choose Database - Properties.
2. In the Settings section on the Info (i) tab of the Database Properties
box, select Archive Settings.
3. View or edit archive settings on the Basics, Settings, or Advanced
tabs of the Archive Settings dialog box.

21-12 Application Development with Domino Designer

Archive Settings
The tool creates an archive database with the title of the source database
followed by the word Archive in parentheses for example, Sales
(Archive). By default, the archive database is stored on a client or server
within the data folder in a folder called \archive. The file name for the
archive database is a_xxxxx.nsf where xxxxx represents the first five
characters in the source database file name for example, a_sales.nsf.
You can customize the location and file name of the archive database.
The tool can also report information about the archiving process to an
archive log database with the title Archiving Log. By default, the
Archiving Log is stored on a client or server within the data folder in a
folder called \archive. The file name for the archive database is
l_xxxxx.nsf where xxxxx represents the first five characters in the source
database file name for example, l_sales.nsf. You can customize the
location and file name of the archive log. Multiple databases can share
one Archiving Log.
You can archive documents on the client or on a server.

Delete documents without archiving them (the default is to archive


them).

Archive without creating an archiving log (the default is to create a


log).

Delete documents even if associated response documents havent


been deleted (default is not to delete).

Optimizing and Troubleshooting Databases 21-13

Deploying Applications

When you archive documents on the client, you use an archive database
and archive log on the client, and you run the archiving tool from the
client. When you archive documents on a server, you create the archive
database on a server rather than create it on the client. In addition, if the
source database is located on a server, you can set up server-based
archiving to use the Compact task on that server to archive the database
rather than manually archive from the client. When you set up archiving,
the tool signs the archive settings with your signature; the Compact task
uses the signature to verify that you have the necessary database access
to archive and then archive on your behalf. Server-based archiving also
allows you to:

Viewing a document Archiving Log


If you set up the document archiving tool to log archiving information to
an Archiving Log database, an entry is created in the Archiving Log
database when either the client or server finishes archiving. To view this
entry:
1. Open the entry in the Archiving Log database.
2. Click Archive statistics to display the date of the archive, the
number of documents archived to the Archive database, and the
number of archived documents deleted from the original database.
3. Click Database/Server to display the location, title, and path for
the original database and for the Archive database.
4. Click Links to archived docs to use document links to access
documents in the Archive database that have been removed from the
original database. This doesnt apply if you selected the advanced
archiving option Delete matching documents without archiving
them.

Using an agent to delete and archive documents


Agents give you a very high degree of control over document deletion
criteria. However, agents can be slow to run.
The following procedure describes creating an agent using simple actions.
You can also create agents using Notes formulas, LotusScript, or Java.
When you run the agent, if Domino cannot copy all specified documents
to an archive database for example, if there is not enough disk space
on the target folder the agent stops.
For more information on agents, see the chapter Agents. For more
information on Notes formulas, LotusScript, and Java see Domino
Designer Programming Guide.

To use an agent to delete and archive documents


1. (Optional) To archive deleted documents, choose File - Database New Copy to create a copy of the database as the archive copy. Copy
only the database design.
2. Open the database and choose Create - Design - Agent.
3. Type a name for the agent.
4. Below When should this agent run, click the arrow and select an
option.

21-14 Application Development with Domino Designer

5. Below Which documents should it act on? click the arrow and
select an option. Click Add Search, specify the search criteria, then
click OK.
6. (Optional) To archive deleted documents, on the bottom pane next to
Run, select Simple action(s) then click Add Action. Then select
Copy to Database and select the archive copy of the database
created in Step 1. Click OK and go to Step 8.
7. In the bottom pane next to Run, select Simple action(s) then click
Add Action. Then select Delete from Database.
8. Close and save the agent. Then choose View - Agents, select the
agent and choose Actions - Test to simulate a run and test that it
works correctly.
9. Save and close the agent if necessary.

Examples of using an agent to delete and archive documents


An agent that archives documents according to date modified
These selections create an agent that copies all documents modified more
than 60 days ago from the active database to an archive database with
the file name ARCHIVE.NSF. The agent deletes the archived documents
from the active database after all the documents have been copied.
When should this agent run? On Schedule Monthly

What should this agent run?

Simple action: Copy to Database ARCHIVE.NSF


Simple action: Delete from Database

An agent that archives documents according to field status


These selections create an agent that weekly copies all documents with a
Status field set to Closed from the active database to an archive
database with the file name ARCHIVE.NSF. Then the agent deletes the
archived documents from the active database.
When should this agent run? On Schedule Weekly
Which document(s) should it All documents in the database
act on?
Condition: by Field
Search for documents where field Status
contains Closed
What should this agent do?

Add Action: Copy to Database ARCHIVE.NSF


Add Action: Delete from Database
Optimizing and Troubleshooting Databases 21-15

Deploying Applications

Which document(s) should it All documents in the database


act on?
Add Action: @Function formula
Search for documents created more than 60 days
ago

Monitoring replication of a database


If there are replicas of a database, use any of these methods to monitor
replication daily.
Method

Description

Replication history

Records each successful replication session for a


database. Useful for determining at a glance if a
replication is occurring.

Replication Events view of Shows details about replication events between


the log file (LOG.NSF)
servers. Useful for determining the cause of
replication failure and for verifying that the
expected number of replication updates occurred.
Replication monitor

Notifies you when replication of a database hasnt


occurred within a specified time period. A server
administrator creates replication monitors as a part
of configuring the Event Monitor task.

Database analysis tool

Lets you collect replication history and replication


events from the log file, and other
database-specific information into a results
database that you can analyze.

In addition to ensuring that a database is replicating, you should


routinely check for and consolidate replication and save conflicts.
For information on replication monitors and the Event Monitor task, as
well as the Database Analysis tool, see Administering the Domino System.

The database replication history


A databases replication history is stored in the Basics tab of the Database
Properties box. The first time one server replica successfully replicates
with a replica on another server, Domino creates an entry in the
replication history. The entry contains the name of the other server, as
well as the date and time of the replication. Separate entries are created
when a replica sends information and when a replica receives it. On each
subsequent replication with a specific server, Domino updates the entry
in the history to reflect the most recent replication.
Domino uses the replication history to determine which documents to
scan for changes during the next replication. For example, if a database
successfully replicated with the HR-E/East/Acme server 24 hours ago,
Domino replicates only those documents that were added, modified, or
deleted in the replica on HR-E/East/Acme within the last 24 hours.

21-16 Application Development with Domino Designer

Before replication starts between two databases, Domino checks the


replication history of both databases to make sure that they agree. If they
dont, Domino scans each document created or modified since the date
specified in the Only replicate incoming documents saved or modified
after setting on the Other panel of the Replication Settings dialog box.
If a database doesnt replicate successfully, Domino doesnt update the
replication history.
To display a replication history
1. Make sure that you have Reader or higher access in the database
ACL.
2. Open the database.
3. Choose File - Replication - History.
4. Do one of the following:
Select Date to view the information by date.
Select Server name to view the information by server.
5. Click Done when you finish reviewing the history.
Tip If the replication history dialog box truncates an entry, click Zoom
to display the complete entry. To copy the entire replication history to the
Clipboard, click Copy.

Within a server cluster, the Cluster Replicator stores replication history


information in memory and updates the replication history about once an
hour.

Optimizing and Troubleshooting Databases 21-17

Deploying Applications

Clearing the replication history


If you have Manager access to a database, you can clear the database
replication history if you think the database doesnt contain all the
documents it should or if the database replication history is not
synchronized with that of other replicas. Clear the replication history
only as a last resort to solve replication problems. If you clear the history,
during the next replication, Domino scans each document created or
modified since the data specified in the Only replicate incoming
documents saved or modified after setting on the Other panel of the
Replication Settings dialog box. If you clear the Only replicate incoming
documents saved or modified after setting, Domino scans all documents
in the database. Scanning all these documents can be time consuming,
especially over dial-up connections.

To clear a replication history


1. Make sure you have Manager access in the database ACL.
2. Open the database.
3. Choose File - Replication - History.
4. Do one of the following:
To clear one entry, select it, click Zoom, click Remove, then click
Yes.
To clear the entire replication history, click Clear, then click Yes.
5. Click Done.
For more information on the Only replicate incoming documents saved
or modified after setting, see Administering the Domino System. For
information on viewing cluster replication data, see Administering Domino
Clusters.

Viewing replication events in the log file


The Replication Log entries in the Replication Events view of the log file
(LOG.NSF) display detailed information about the replication of specific
databases. For each database that has replicated on a specified server, a
Replication Log shows the access the server has to the database; the
number of documents added, deleted, and modified; the size of the data
exchanged; and the name of the replica that this database replicated
with. The Events section of a Replication Log shows any problems that
occurred when a specific database replicated. For example, the Events
section shows if replication is disabled or if the database ACL is
preventing replication.
To use the Domino Administrator to view a Replication Log:
1. From the Domino Administrator, in the Server pane on the left, select
the server that stores the log file you want to view. To expand the
pane, click the servers icon on the left.
2. Click the Server - Analysis tab.
3. Select Notes Log - Replication Events.
4. Open a recent Replication Log.
Tip If you dont have access to the Domino Administrator, select the log
file database and choose File - Database - Open.

21-18 Application Development with Domino Designer

Replication or save conflicts


Multiple users can simultaneously edit the same document in one copy
of a database or edit the same document in different replicas between
replication sessions. When these situations occur, Domino stores the
results of one editing session in a main document and stores the results
of additional editing sessions as response documents. These response
documents have the title Replication or Save Conflict. Domino uses the
$Revisions field, which tracks the date and time of each document
editing session, to determine which document becomes the main
document and which documents become responses.

Replication conflicts
A replication conflict occurs when two or more users edit the same
document and save the changes in different replicas between
replications. These rules determine how Domino saves the editing
sessions:
The document edited and saved the most times becomes the main
document; other documents become Replication or Save Conflict
documents.

If all of the documents are edited and saved the same number of
times, the document saved most recently becomes the main
document, and the others become Replication or Save Conflict
documents.

If a document is edited in one replica but it is deleted in another


replica, the deletion takes precedence, unless the edited document is
edited more than once or the editing occurs after the deletion.

Save conflicts
A save conflict occurs when two or more users open and edit the same
document at the same time on the same server, even if theyre editing
different fields. When this situation occurs, the first document saved
becomes the main document. Before the second document is saved, a
dialog box indicates that the user is about to save a conflict document
and if the user saves the document, it becomes a Replication or Save
Conflict document.
Note ACL and design changes never result in replication or save
conflicts; the most recent change always prevails.

Optimizing and Troubleshooting Databases 21-19

Deploying Applications

Preventing replication or save conflicts


These techniques reduce or eliminate replication or save conflicts.

Select the Form property Merge replication conflicts to


automatically merge conflicts into one document if no fields conflict.
This applies to replication conflicts only and not to save conflicts.

Specify a Form property for versioning so that edited documents


automatically become new documents.

Use LotusScript to write a custom conflict handler.

Allow users to lock documents in a database.

Assign users Author access or lower in the database ACL to prevent


users from editing other users documents.

If the database property Limit entries in $Revisions fields is set to a


value greater than 0, increase the limit by specifying a greater value
than the existing one or specify -1 to remove the limit.

Work with the server administrator to keep the number of replicas to


a minimum.

For information on using LotusScript, see the Domino Designer


Programming Guide.

Consolidating replication or save conflicts


Regularly look for and consolidate replication or save conflicts. To
consolidate a conflict, merge information into one document and remove
the other document. Conflicts are easiest to consolidate immediately after
they occur, since the conflict document is still closely synchronized with
the information in the main document. Its important to consolidate
replication or save conflicts quickly, so users access the correct
information.
Tip To locate replication or save conflicts, create a view that displays
only conflict documents. Then, to see a conflict document in context with
its main document, select the Replication or Save Conflict document in
the view that displays conflicts, hold down the CTRL key, and switch to
the view that shows the main document.
For information on creating a view that displays only conflict documents,
see the chapter Designing Views.
To consolidate replication or save conflicts, you can save the main
document or save the Replication or Save Conflict document.

21-20 Application Development with Domino Designer

To save the main document


1. Copy any information you want to save from the Replication or Save
Conflict document into the main document.
2. Delete the conflict document.

To save the Replication or Save Conflict document


1. Do one of the following:
Copy any information you want to save from the main document
into the Replication or Save Conflict document.
If you do not need to save any information from the main
document, perform a minor edit in the Replication or Save
Conflict document for example, delete a space. This will allow
you to save this document as a main document.
2. Save the conflict document. The conflict document becomes a main
document.
3. Delete the original main document.

Monitoring database activity


Monitor database activity regularly. If database activity is high and users
report performance problems, do any of the following:
Set database properties that improve performance.

Create a replica of the database on another server, if possible, one


within a server cluster.

Move the database to a more powerful server.

Move the database to a disk that is less heavily used, or if its a large
database, to its own disk.

Consider deleting an inactive database or view to free disk space on the


server.

How the Statlog task generates activity statistics


The Statlog task runs by default once a day at 5 AM to report database
activity on the server. The information appears as Database Activity Log
entries in the Database - Usage and Database - Sizes views of the log file
(LOG.NSF) and in the User Activity dialog box of individual databases.
The Statlog task also reports database size statistics in the Database Sizes view of the log file.

Optimizing and Troubleshooting Databases 21-21

Deploying Applications

This table compares the information generated in each location.


Information provided

Appears in
Appears in
Database Activity User Activity
Log entries
dialog box

Total number of times user and servers


Yes
accessed, read, and wrote to a database in past
24 hours, past week, past month, and since the
creation of the database.
Includes activity for anonymous and
authenticated Internet clients.

Yes

Inactive views (indicated by the size 0)

Yes

No

Names of users and servers who read and


wrote documents, sorted by date.
Includes activity for anonymous and
authenticated Internet clients.

No

Yes

Tip In addition to viewing activity statistics reported by Statlog, you


can evaluate database activity by creating a view that sorts documents by
date. You can also create File Monitor documents as part of Event
Monitor configuration. File Monitors report user activity for specific
databases.
For information on File Monitor documents, the Event Monitor task, and
monitoring Web site activity, see Administering the Domino System. For
information on monitoring Web site activity, see Administering the
Domino System. For information on monitoring database activity within a
server cluster, see Administering Domino Clusters.

Viewing database activity statistics generated by the Statlog task


Checking database activity statistics allows you to resolve or avoid
problems with an application.
In the log file (LOG.NSF)
1. From the Domino Administrator, in the server pane on the left, select
the server that stores the log file you want to view.
2. Click the Server - Analysis tab.
3. Do one of the following:
Select Notes Log - Database - Sizes.
Select Notes Log - Database - Usage.
4. Double-click a Database Activity Log entry to view it.
Tip If you dont have access to the Domino Administrator, select the log
file database and choose File - Database - Open.
21-22 Application Development with Domino Designer

In the User Activity dialog box


1. Open the database and choose File - Database - Properties.
2. Click the Info tab (i), and then click User Detail.
Tip To track usage over a period of time, choose Copy to Clipboard
to copy the summary to a document that you use to track usage statistics.

Managing database activity recording in databases


By default, the Statlog task reports database activity to all database User
Activity dialog boxes when it runs. Even if a user disables User Activity
reporting for a specific database, the next time Statlog runs, it enables
recording in the dialog box again.
To disable automatic activity recording in User Activity dialog boxes
To prevent Statlog from automatically recording activity in User Activity
dialog boxes, add the following setting to the Notes.ini file:
No_Force_Activity_Logging=1

Then, you can enable activity recording per database, as needed. Since
recording activity in the User Activity dialog box adds 64K to the size of
each database, disabling automatic activity recording saves disk space on
the server.
Note If you use No_Force_Activity_Logging, Statlog still reports
activity to the log file (LOG.NSF).

1. Make sure that you have Designer or Manager access in the database
ACL.
2. Open the database and choose File - Database - Properties.
3. Select the Info(i) tab, and then click User Detail.
4. Select Record Activity to enable activity recording.
5. (Optional) Select Activity is Confidential to allow only users with
at least Designer access in the database ACL to view the activity.
6. Click OK.

Optimizing and Troubleshooting Databases 21-23

Deploying Applications

To enable activity recording in a single database's User Activity


dialog box
Even if the server administrator disables automatic activity recording in
databases, you can enable recording for a single database.

To disable activity recording in a single database's User Activity


dialog box
Disabling activity recording also removes any existing activity statistics
in the User Activity dialog box.
1. Make sure that you have Designer or Manager access in the database
ACL.
2. Open the database and choose File - Database - Properties.
3. Select the Info tab (i), and then click User Detail.
4. Deselect Record Activity to disable activity recording.
5. Click OK.

Updating database indexes and views


A view index is an internal filing system that Notes uses to build the list
of documents to display in a database view or folder. View indexes
should be kept current so that information in views and folders stays
synchronized with document updates.
A full-text index is an index of the text in a database. To perform
advanced searches for text in a database, users need an up-to-date
full-text index that reflects the latest content of a database.
You can use any of the following to update database indexes:

The Update task

The Updall task

Keyboard shortcuts

The Full-text tab of the Database Properties box

For information on creating and deleting indexes, see Lotus Notes 6


Help. For information on purging or deleting view indexes with the
Update and Updall tasks, see Administering the Domino System.

Notifying users of a moved database


After you move a database, create a new database with the same file
name and path as the database before you moved it. In the new database,
create a form and document that provides the following information:

Title of the original database

File name and path of the original database

Date of the move

Reason for the move

21-24 Application Development with Domino Designer

Server currently storing the database

New file name and path of the database

When users open this database, theyll see information about the new
location.

Adding a button to open a database


In addition to including information about the database move in the
form, you can create and program a button that users click to
automatically add and open the database at its new location.
For example, this button formula adds a database with the replica ID
84254E66:0064508 to the workspace and then opens the database:
@Command([FileOpenDBRepID];"84254E66:0064508"; "SALES")

The last argument, SALES, provides the name of the server on which
the database is located.

Troubleshooting database performance


You can reduce database performance problems by using:

Transaction-based logging and recovery.

Disk-tuning procedures, such as disk defragmentation and


disk-space reallocation.

For more information on transaction logging, see Administering the


Domino System.
The topics in this section include:

Users cannot access the database

Users experience a delay when accessing the database

Using Find Note to analyze a document reported in the log file

Troubleshooting replication problems

Users cannot access the database


Users may not be able to access databases for the following reasons.

Optimizing and Troubleshooting Databases 21-25

Deploying Applications

The following topics suggest solutions to common database performance.


Some of the recommended solutions involve changing the database
design. You should always test design changes on a template or a copy of
the database before applying them to the production copy.

The server storing the database is temporarily down


Check with the Domino administrator and tell users that when the
database is expected to be available again.
Users don't have the appropriate access
Check the database access control list (ACL) to make sure that users have
the necessary access to the database. Check with the Domino
administrator to ensure that users have access to the Domino server that
stores the database.
Server backup is occurring during work hours
Users may be unable to access a server that is being backed up during
work hours because a full backup may require significant disk I/O
capacity. Ask the Domino administrator to schedule backups to occur
overnight, if possible.
Use a Domino 6-compliant backup program so users can access
databases on a server that is being backed up. Users can make changes to
databases as a backup occurs because Domino provides a point-in-time
image of the database, beginning with the time the database backup
starts.
The server is continuously updating a full-text index
If a database is large and active, database performance can be slow if the
server updates a full-text index too frequently. Change the full-text index
update frequency if necessary.
For more information on update frequency, see Administering the Domino
System.

Users experience a delay when accessing the database


Users may experience a delay when accessing databases for the following
reasons:
The database is heavily used
View the User Activity dialog box to see if the database is heavily used.
This option is on the Information tab of the Database Properties box.
Check the server to see if its hardware and memory are powerful enough
to support the user activity for the database. If the server is not powerful
enough, you may need to upgrade hardware or memory on the server.
You can also create an additional replica of the database so all users are
not always using the same one. If disk contention is a problem, move the
database to a less heavily used disk.

21-26 Application Development with Domino Designer

There are too many views


If the database contains many views, consider consolidating some of
them. For example, you can consolidate views by creating alternative
collations in the same view, rather than using separate views. Database
performance can suffer when a database contains many views.
View indexes are being refreshed too frequently
If the database is heavily used or contains many documents, refresh view
indexes less frequently, if possible.
Unread mark processing may cause delays
Delays can occur as the unread marks in a database are updated while
the database is opening. It also creates disk contention, which slows
down every operation on the database. Disabling unread marks on the
database eliminates the delay.
The database design is complex
A complex database design can cause performance problems. Consider
simplifying the database design.
Database performance properties are not being used
If feasible, set database properties to improve database performance.

Using Find Note to analyze a document reported in the log file


You can use the Find Note dialog box in the Domino Administrator to
analyze a document reported in the log file. If the log file reports a
problem with a document, you can display the properties for the
document to help you to troubleshoot the problem. For example, you can
use Find Note to review the document properties for a document that
cannot replicate.
1. Copy or write down the hexadecimal Note ID (for example,
NT201B2) of the documentreported in the log file to the Clipboard.
You may also troubleshoot using the universal Note ID (UNID), a
unique identifier used to locate the same document across database
replicas.
2. In the Server list, select the server that stores the database that
contains the reported document.

Optimizing and Troubleshooting Databases 21-27

Deploying Applications

The database cache needs adjustment


If you are a system administrator, monitor the database cache on the
server that stores the database to see if its working effectively. If
necessary, increase the number of the databases the cache can hold. The
NSF buffer pool size may also need to be increased.

3. Click the Files tab and select the database that stores the reported
document.
4. Choose Tools - Database - Find Note.
5. Select one:
by Note ID
by Universal Note ID (UNID)
6. Paste or enter the Note ID or UNID from Step 1 into the ID field.
7. Click Find.
8. View the document details and properties in the Fields and
Properties fields.
For more information about determining the Notes ID for a document, see
the chapter Completing an Application and Managing Design Changes.

Troubleshooting replication problems


The following topics suggest solutions to common problems associated
with scheduled replications.

A database replica database does not contain all the documents it


should

A database replica is not receiving design changes

Changes to the database title do not replicate

Database replicas are different sizes

The database stops replicating and the option Enforce a consistent


ACL is selected

The database replica has not received ACL changes

The new replica contains the ACL of the source server but you did
not copy the ACL

You see the message Database is not fully initialized yet

Deletions are not replicating

Unexpected deletions occur in a replica

Deleted documents reappear


For cluster replication problems within a server cluster, consult with
your Domino administrator. The log file (LOG.NSF) provides helpful
information for troubleshooting replication problems within a cluster,
and your administrator can help you assess the operation of your cluster.
For more information about replication and server clusters, see
Administering Domino Clusters.
21-28 Application Development with Domino Designer

A database replica does not contain all the documents it should


If none of the following explanations apply, clear the replication history
by using the File - Replication - History dialog box in the Notes client.
Replicas are different sizes
If changes made to one replica have not yet replicated, the content of
replicas may be different until replication occurs.
The source server has insufficient access
The source server access in a destination replica ACL determines what
the destination replica can receive from the source server. Give the
source server higher access in the destination replica ACL if necessary.
The following message in the server log (LOG.NSF) indicates insufficient
server access:
Access control is set to not allow replication

There is no destination server in an access list


Access lists allow only a subset of people and servers in the ACL to
access documents. If such access lists exist, add the destination server to
them in the source server replica. If the access list uses a role to define
access, add the destination server to the role on the source server replica.

Replication settings are filtering documents


Some replication settings act as filters that screen out documents and
features. Check the replication settings.
The server is out of disk space
If the database is a Release 4 format database, check to see if it exceeded
the maximum database size. Ask your Domino administrator to resolve
disk space problems and if necessary, consider moving a replica to
another server or deleting databases on the server.
Older documents weren't replicated to a new replica
Change the date specified for the replication setting option Only
replicate incoming documents saved or modified after. To view the
date, choose File - Replication - Settings and click the Other tab in the
Notes client. Create a new replica and specify an earlier date.

Optimizing and Troubleshooting Databases 21-29

Deploying Applications

An intermediate server has insufficient access


If replication between a source and destination server occurs through an
intermediate server, make sure the source and destination server replica
ACLs give the intermediate server high enough access to replicate all
changes.

A database replica is not receiving design changes


To receive design changes from a source server, the database replica on
the destination server must give the source server at least Designer
access and the source server replica must give the destination server at
least Reader access.

Changes to the database title do not replicate


If the replication setting Do not send changes in database title & catalog
info to other replicas is selected on the source server replica, the title
wont replicate. Deselect this setting to replicate a database title. To view
this setting, choose File - Replication - Settings and click the Send tab in
the Notes client.

Database replicas are different sizes


Database replicas may be different sizes for the following reasons:
Replication settings
Some replication settings cause one replica to receive only a subset of
documents and features from another replica.
Access Control List
The ACL prevents a replica from receiving all documents or design
elements from a source server replica.
Read ACL or Reader Names fields
A destination server isnt included in a Read ACL or Reader Names field
and therefore doesnt receive all documents from a source server replica.
View indexes
A view is used in one replica but not in another, and the replica
containing the unused view is smaller because no index is built for the
unused view.
Private agents or personal views or folders
If these features are used on one replica, but not on another, there can be
a size disparity between the replicas.

21-30 Application Development with Domino Designer

Deletions are not replicated


Check these replication settings by choosing File - Replication - Settings
in the Notes client:

On the Advanced panel, make sure that the Deletions option under
Replicate incoming is not selected.

On the Send panel, make sure that the Do not send deletions made
in this replica to other replicas option is selected.

Unused space
One replica has been compacted while another has not been compacted.

The database stops replicating


If a user changes a local or remote server database replicas ACL when
the Enforce a consistent access control list across all replicas of this
database option is selected, the database stops replicating. This option is
found on the Advanced panel of the Access Control List dialog box. The
message in the log file is:
Replication cannot proceed because cannot maintain uniform
access control list on replicas

The database replica has not received ACL changes


To receive ACL changes from a source server, the database replica on the
destination server must give the source server Manager access and the
source server must give the destination server at least Reader access.

A replica stub is an empty replica that has not yet been populated with
documents. When you choose File - Replication - New Replica, Notes
creates a replica stub and populates it with documents, either
immediately or at the next scheduled replication, depending on the
option you select.
Somebody modified the access control list on the source server
before initial replication occurred
If you create a replica stub and somebody modifies the ACL on the
source server before initial replication occurs, the ACL on the source
server becomes the most recent one and replicates to the replica stub.
Simply opening the Access Control List dialog box on the source server
replica and then closing it can cause this problem.

Optimizing and Troubleshooting Databases 21-31

Deploying Applications

The new replica contains the ACL of the source server but you did
not copy the ACL

The server times are not synchronized


If you create a complete replica immediately (rather than creating a
replica stub) and the time on the source server is later than the time on
the destination server, the new replica contains the ACL from the source
server.

You see the message "Database is not fully initialized yet"


A replica stub on a workstation hasn't been manually replicated
If users create replica stubs on their workstations and dont populate
them with documents according to a schedule, they must manually
replicate to populate the database replica with documents.
The server storing the replica stub doesn't have adequate access to
pull information
If you rely on scheduled replication to populate a replica stub, the server
storing the replica stub must have at least Reader access in the source
server replica ACL to pull the documents from the source server.
An appropriate Connection document between two servers isn't in
place
If you rely on scheduled replication to populate a replica stub on a server
with documents from a replica on another server, a Connection
document must exist between the two servers storing the replica and the
replica stub. Confirm with your Domino administrator that a Connection
document exists and that it is configured correctly.
Replication is disabled
Notes cannot populate a replica stub if replication is disabled on the
source or destination server replica. To see if replication is disabled for
the database, see if the Temporarily disable replication option is
deselected. This option is found on the Other tab when you choose File
- Replication - Settings in the Notes client.

Deletions are not replicating


Servers don't have adequate access to the database
To receive document deletions, the ACL on a destination server replica
must give the source server Editor access or higher and have the access
level privilege Delete documents selected.
A replication setting is preventing deletions from replicating
Review these replication settings by choosing File - Replication - Settings
in the Notes client:

21-32 Application Development with Domino Designer

On the Send panel, if the option Do not send deletions made in this
replica to other replicas is selected, a source server doesnt send
deletions to another replica.

On the Advanced panel, if the Deletions option under Replicate


incoming is not selected, a replica doesnt receive deletions.

Unexpected deletions occur in a replica


Check these replication settings by choosing File - Replication - Settings
in the Notes client:

On the Advanced panel, deselect Replicate incoming: Deletions to


prevent a database from receiving deletions made in other replicas.

On the Other panel, select Do not send deletions made in this


replica to other replicas to prevent a database from sending
deletions.

Unexpected deletions may also occur for the following reasons.


There is a new replication formula in place
A new replication formula overrides previous formulas and removes
documents that dont match the formula.

Deleted documents reappear


A purge interval prevents replication of deletions
When a document is deleted, it leaves behind a deletion stub. When the
database replicates, Notes uses the deletion stub to identify and delete
the same document in the replica.
To save disk space, Notes purges deletion stubs according to the
replication setting Remove documents not modified in the last [ ] days.
If Notes purges the deletion stubs before they replicate, deleted
documents can reappear after the next replication. This option is on the
Space Saver panel when you choose File - Replication - Settings in the
Notes client.

Optimizing and Troubleshooting Databases 21-33

Deploying Applications

A replication setting is automatically removing older, unmodified


documents
The replication setting Remove documents not modified in the last [ ]
days removes older, unmodified documents. If the specified number of
days is low, consider increasing the value. This option is on the Space
Saver panel when you choose File - Replication - Settings dialog box in
the Notes client.

A document edit writes over a document deletion


When the same document is modified on different servers between
replication sessions, the document that was modified most
frequently takes precedence. If both documents are modified only
once, the one modified most recently takes precedence.

If a document is edited multiple times on one server and deleted on


another server between replication sessions, the edited document
takes precedence because it underwent the greatest number of
changes, even if the deletion was the most recent change.

If somebody deletes a document on one server and then someone


else updates the document on another server once between
replication sessions, the edit overrides the deletion because both
documents were updated once and the edit occurred after the
deletion.

21-34 Application Development with Domino Designer

Chapter 22
Enabling an Application for Domino Off-Line Services
This chapter introduces Domino Off-Line Services (DOLS) and explains
the developers tasks in enabling applications so that users can take IBM
Lotus Domino Release 6 Web applications offline, work in them, and
synchronize their changes with an online replica on the Domino server.

Domino Off-Line Services


Domino Off-Line Services (DOLS) provides a way for users to take IBM
Lotus Domino Release 6 Web applications offline, work in them, and
synchronize the changes with an online replica on the Domino server.
Users are not required to have IBM Lotus Notes Release 6 client because
the applications are accessed with a browser.

The developer and administrator must set up and configure a DOLS


subscription for offline use.
The developer copies a number of elements into the subscription, makes
design changes if necessary, and configures the subscription in the
Offline Subscription Configuration Profile document.
The administrator makes sure DOLS is installed properly on the server,
sets security for the subscription, sets up agents, makes changes to the
Offline Subscription Configuration Profile document if necessary, and
helps users install the subscription.
Once the subscription is enabled, users can access it on the server using a
browser. The user clicks in a new frame on the subscriptions main page
to open a JavaScript menu. When the user selects install from the
menu, the subscription is installed on their computer.

22-1

Deploying Applications

Nearly all Notes functionality is retained when a DOLS-enabled


application (called a subscription) is taken offline. Users can compose,
edit, delete, sort, and categorize Notes documents, and perform full-text
searches. DOLS subscriptions can make full use of Java applets, agent
execution, and workflow. DOLS also supports full data replication,
retains application logic, and supports the full Notes security model.

Also installed on their computer is the Lotus iNotes(TM) Sync Manager,


a utility for managing DOLS subscriptions. Users can open subscriptions
online or offline, synchronize, and set subscription properties with the
Sync Manager.
For more information, see Lotus iNotes Sync Manager Help (available
from the Help menu of the Lotus iNotes Sync Manager).

Overview of DOLS developer tasks


Developers and administrators perform different tasks to enable a
subscription for offline use. Developers perform the following tasks:
1. Copy design elements from the DOLRES.NTF file into the
subscriptions main database.
2. (Optional) Customize how users install the subscription.
3. Edit the Offline Subscription Configuration Profile document.
4. Customize the subscription.
5. Tell the administrator they have completed their tasks. Developers
who perform administrator tasks should read the DOLS topics in
Lotus Domino Administrator 6 Help.

Copying DOLS design elements into the main database


You must copy several elements from DOLRES.NTF into the main
database of your subscription. The database you choose should be the
first database the user sees when opening the subscription. To copy the
elements:
1. Open the main database of the subscription. Even if the subscription
has multiple databases, copy DOLS design elements only into the
main database.
2. Open DOLRES.NTF (the DOLS Resource template). DOLRES.NTF is
in the Domino Data directory.
3. Copy the following pages from DOLRES.NTF into your database:
DOLS Request Offline ID. This is a hidden page. Do not do
anything else to it.
One of the following:
DOLS Web Control. This page loads ActiveX and/or plug-ins that
enable Go offline and Go Online menu items in the database.
You must either choose this design element or the DOLS Load

22-2 Application Development with Domino Designer

Download Page as a way for users to download the subscription.


For more information on downloading the subscription, see the
topic Customizing how users install the DOLS subscription.
DOLS Load Download Page. If you prefer to use an icon instead
of the DOLS Web Control in your subscription, use this page. For
more information on downloading the subscription, see the topic
Customizing how users install the DOLS subscription.
(Optional) DOLS Web Control Bitmaps. Copy this page if you want
to change the default bitmaps built into the DOLS Web Control.
For more information on downloading the subscription, see the
topic Customizing how users install the DOLS subscription.
4. Copy the DOLS Offline Configuration form from DOLRES.NTF
into the Domino subscription. This form contains the Offline
Subscription Configuration Profile form. Every DOLS subscription
must contain this form.
5. Copy the Edit Offline Configuration agent from DOLRES.NTF into
the subscription. This agent allows you to create an Offline
Subscription Configuration Profile document.
Note Do not copy the agent named Delete Configuration
Document. Deleting an Offline Subscription Configuration Profile
document may cause problems for a subscription. The Delete agent is
included in this template for unusual circumstances only, such as a
failed upgrade.

DOLS Configuration Settings. This is a table of Offline


Subscription Configuration Profile document fields. Do not
modify this subform. Because this form inherits its design changes
from DOLRES.NTF, any changes you make may be overwritten.
DOLS Customize. Use this subform to customize the configuration
document. This is the only subform that you should modify and
you can leave it hidden or make it visible. You can create fields and
modify fields dynamically in other subforms. For more information
on using the Customize subform, see the topic Customizing fields
and design elements in a DOLS subscription..
DOLS Download Control. This subform contains the JavaScript
that loads the Web Control when a user installs a subscription.
This subform only displays in a browser. Do not modify this
subform. Because this form inherits its design changes from
DOLRES.NTF, any changes you make may be overwritten.

Enabling an Application for Domino Off-Line Services 22-3

Deploying Applications

6. Copy the following subforms from DOLRES.NTF into the Domino


subscription:

DOLS Download Instructions. This subform contains the default


text that the user sees when a subscription is installed. Do not
modify this subform.

Customizing how users install the DOLS subscription


The developer has two choices for how users install and possibly manage
the subscription: the Web Control or an icon. The developer must choose
one, then copy the appropriate design element into the main database of
the subscription. They must then create a frame in the main frameset of
the subscription and place either the Web Control or icon in it.

Using the Web Control


The Web Control is the recommended way to have users install a
subscription.
The DOLS Web Control page (in DOLRES.NTF) loads ActiveX (in
Internet Explorer browsers) or plug-ins (in Netscape browsers) that
enable Go offline and Go Online menu items in the subscription.
When users click Go Offline or Go Online they can choose several
options, including installing the subscription.
You can cut and paste the contents of the Web Control page to another
page or design element, but the disadvantage of cutting and pasting is
that you do not automatically receive changes the next time you upgrade.
The DOLS Web Control Bitmaps page (in DOLRES.NTF) contains the
default images the user clicks to open the Web Control menu. You can
replace these images with your own by giving your files the same names
as the default files, then deleting and replacing the default files with your
own.
Your image files must have the following names to override the default
image files:

DOLCONTROLDEFAULT.BMP - the bitmap that appears when no


subscription is installed

DOLGOOFFLINE.BMP - the bitmap that appears when users open


the subscription online once its installed

DOLGOONLINE.BMP - the bitmap that appears when users open


the subscription offline once its installed

One reason you may want to change the default bitmaps is to replace the
default English words in the images with another language. Or, you may
want to say something other than Install Subscription, Go Offline, or
Go Online, or use different colors.

22-4 Application Development with Domino Designer

You must create a frame for the Web Control in the main frameset of the
subscription. The default height and width for each bitmap file is 64
pixels by 16 pixels. To change the default height and width of the
bitmaps, edit the JavaScript in the DOLS Web Control page. (Make
sure you also adjust the size of the frame that contains the bitmap.)
Each subscription can have only one Web control.

Using an icon
The DOLS Load Download Page page contains an icon called
DOLS.GIF, which loads into a new frame in the subscription. Unlike the
Web Control, there is no popup menu. A user clicks the icon to install the
subscription. Once the subscription is installed, the user must manage
the subscription (for example, synchronize, or open the subscription
online or offline) with the Sync Manager.
An advantage of using this page instead of the Web Control is that the
subscription downloads faster. Or you may want to use your companys
logo as the icon for downloading the subscription. The recommended
way to use this page is to include it as a frame in a frameset. You can also
cut and paste the JavaScript to another page or design element, but the
disadvantage of cutting and pasting is that you do not automatically
receive changes the next time you upgrade.

Configuring the DOLS subscription


You choose configuration settings for the subscription in the Offline
Subscription Configuration Profile document. You must edit and save a
configuration document in every subscription even if you make no
changes to the document. A subscription can have only one configuration
document, even if the subscription has multiple databases. The
configuration document must be stored in the main database. The main
database is the database in the subscription from which the user
downloads the subscription.
You can change configuration settings even after users have downloaded
the subscription.

Enabling an Application for Domino Off-Line Services 22-5

Deploying Applications

You can replace DOLS.GIF with your own image by opening


DOLRES.NTF, choosing Shared Resources - Images, clicking New Image
Resource, and adding your image. Then replace references to DOLS.GIF
in the JavaScript contained in the DOLS Load Download Page page
with the name of your image.

To edit the configuration document


1. Copy the appropriate design elements into the main database.
2. Open the database in Notes.
3. Choose Actions - Edit Offline Configuration to open the document.
Note that some of the fields have default values, which you can
change. You can use wild card characters in any field.
4. Click the Basics tab. The name of the main database should be in the
Subscription title field. If it is not, enter it.
5. Click the Services tab and fill in the following fields.
Name of Field

Action

The offline subscription may need support for


full-text indexing, LotusScript and unscheduled
agents (such as Web open), Java back-end classes
Basic services
and applets, MAPI enablement, or custom services.
(required)
Full-Text Indexing Select the appropriate boxes so that only files the
users actually need are downloaded to their
LotusScript and
machine.
unscheduled
MAPI enablement is available only when you use
agents
the Extended Mail Template (MAIL6EX.NTF) for
Java classes and
Web Mail or iNotes Access for Microsoft Outlook
applets
users.
Custom Services
Choose a default language for the Web Control
MAPI enablement menu and the iNotes Sync Manager. Users can
Default Language override this setting by selecting a different
language from the Web Control menu.

Domino services to
install offline

Custom services to
install offline

This field is available only when you select the


Custom services box.
Enter the name of custom service files to be
unpacked and executed on the users computer
during installation of the subscription. Custom
services have the following syntax:
CustomServiceName [Setup.exe [SetupArguments]].
For example:
mycustomname mysetupfile.exe -z -r -u
If you specify more than custom service, separate
the services with commas. For example:
mycustomname mysetupfile.exe -z -r -u,
mycustomname2 mysetupfile2.exe -z -r -u
For more information on custom file sets, see the
topic Creating custom file sets for a DOLS
subscription.

22-6 Application Development with Domino Designer

6. Click the Schedule tab and complete the following fields. Note that
the user can override most of these fields from within the
Subscription Properties box of the iNotes Sync Manager.
Name of Field

Action

Type of schedule
Daily

Select this field, then specify the time of day you


want synchronization to occur.

Weekly

Select this field, then check the days you want


the synchronization to occur.

Monthly

Select this field, then specify the day of the


month you want the synchronization to occur.

Start time

Enter the time of day for the subscription to


start scheduled synchronization.

Frequency
Repeating schedule

Select this box if you want synchronization to


repeat at certain intervals after the initial start
time.

Interval

Specify the time between repeating


synchronizations. Enter a number and then
choose either minutes or hours. For example,
you can enter 180 minutes or 3 hours.

Limitations
Stop synchronization at
Recurrence exceptions
Schedule disabled

Select this box to make a disabled


synchronization schedule the default state. The
subscription only synchronizes once, when it is
installed. The user can override this setting in
the offline synchronization properties.

Enabling an Application for Domino Off-Line Services 22-7

Deploying Applications

Specify the time you want the synchronization


to stop.

7. Click the Sync Options tab and complete the following fields:
Name of Field

Description

File Rules
Required files to Enter the subscriptions required files. Required files are
databases, templates or directories that are automatically
replicate
installed offline, and are replicated every time the
subscription is synchronized.
All required files and directories must be specified
relative to the servers data directory.
For tips on using directory names and wildcards when
you specify more than one Required file or Optional file,
see the topic Creating multiple database DOLS
subscriptions.
Optional files to Enter the subscriptions optional files. Optional files are
databases, templates or directories that can be enabled or
replicate
disabled in the sync manager for offline installation and
replication. For example, in addition to the required
file(s), you may want to download a related Help
database or an archived discussion database as an
optional file.
All optional files and directories must be specified relative
to the servers data directory.
Optional databases replicate as stubs, meaning only the
design is replicated. Users can open Sync Properties, click
the Sync Options tab, select the database, and deselect the
disable box. The data is then replicated at the next
synchronization. To save disk space, users can disable an
optional file, and the data is removed at next
synchronization.
Enable replication of optional files by default:
Select this box to automatically download and
synchronize new databases found in the subscriptions
directories on the server. For example, if one of the
optional databases is designed to create new databases,
the new databases are automatically downloaded and
synchronized.
continued

22-8 Application Development with Domino Designer

Name of Field

Description

File Rules
Synchronize directory catalog:
Select this box to install a directory catalog with the
subscription. Then enter the file name, including
directory path, of the catalog database on the server (for
example, dircats\mydircat.nsf). If the server
administrator has specified a default offline directory
catalog for the server by adding
$DOLSDirectoryCatalog = nameofcatalog.nsf to the
NOTES.INI on the server, you can leave this field blank
and the servers default offline catalog is replicated with
the subscription. A catalog filename specified here will
override the servers default offline directory catalog.
Choose the Replicate as an optional file checkbox to
specify the catalog as an optional file. If the directory
catalog is specified an optional file, the Enable
replication of optional files by default checkbox must
be checked for the catalog to replicate the first time.
In order for iNotes Access for Outlook users, or iNotes
Access for Web Mail users, to take a directory catalog
offline, you must add the name of a directory catalog,
including the NSF extension, to the
$DOLSDirectoryCatalog setting in the servers
NOTES.INI file.
For more information on using directory catalogs with
DOLS, see the topic Adding a directory catalog to the
application before adding one to your subscription.

Encryption

Encrypt this subscription:


Select the box to enable encryption. Then select the
level of encryption. Encryption prevents an
unauthorized user from accessing the offline
subscriptions data using another software product.
If the subscription has multiple databases, all of these
databases are encrypted.
If the subscription has a shared file, you must encrypt
all susbcriptions sharing the file. An unencrypted
subscription may not be able to open an encrypted file.
Using strong encryption causes a database to open
more slowly than it would using a weaker encryption
or no encryption.
Do not encrypt the database from the Database
Properties box. Use the Offline Subscription
Configuration document to prevent unauthorized users
from reading subscription data using other applications.
continued
Enabling an Application for Domino Off-Line Services 22-9

Deploying Applications

Directory catalog

Name of Field

Description

Sync Options
Date Filtering

Only sync documents modified within the


last [number] days:
Select this box to preset a default,
date-based filter on all databases created
offline. For example, if you specify 30 days,
only documents created or modified in the
last 30 days will synchronize. Once
installed, users can reset this for each
subscription file using the iNotes Sync
Manager.

Halt Conditions

Limit database size to [number] MB: Select


this box to specify the maximum size in
megabytes of the offline database. You
cannot specify a number less than 10.
Limit subscription size to [number] MB:
Select this box to specify the maximum size
in megabytes of the entire offline
subscription. You cannot specify a number
less than 10.
You can preset an automatic halt to the
offline synchronization when a database
exceeds a particular size, or when the
subscription as a whole exceeds a particular
size. The user can override this setting.
Be careful not to specify a size that may be
too limiting. The offline subscription may
not be fully operational if synchronization is
interrupted prematurely.

Sync Options: Optional actions


Full-Text Index subscription
after sync

Select this box to force full-text indexing of


the subscription after synchronization. The
user can override this setting.

Compact subscription after


sync

Select this box to force the subscription to


compact after synchronization.

Notify on completion of sync Select this box if you want the user to
receive a message when synchronization is
complete. The user can override this setting.
If warnings are displayed during the
synchronization process, and this option is
selected, each warning message will
display.
continued
22-10 Application Development with Domino Designer

Name of Field

Description

Route mail on client


shutdown

Select this box so that pending outgoing


mail messages are sent before the user exits
from the iNotes Sync Manager. The user can
override this setting.

Replicate on client shutdown Select this box so that synchronization


occurs before the user exits from the iNotes
Sync Manager. The user can override this
setting.
Use multi-user data directory Select this box so that the subscription can
be installed to a client with a Notes
multi-user setup. Subscription data is stored
in the users personal profile data directory.
Allow per-user shared
subscription data

Enabling an Application for Domino Off-Line Services 22-11

Deploying Applications

Select this box to allow the subscription to


share a file with another subscription, as
long as as the same user has installed both
files.
For example, a user installs this subscription
with the directory catalog dircat1.nsf. If the
user then installs another subscription that
uses dircat1.nsf., and also selects this option,
the two subscriptions share dircat1.nsf.
All subscriptions that share the same file
must be either encrypted or not encrypted.
Non-encrypted subscriptions may not be
able to share a file that is encrypted.

8. Click the Admin tab and complete the following fields:


Name of field

Action

Push subscription settings: Push subscription settings to iNotes Sync


Manager.
Select this box to push changes made to the
active Off-Line Subscription Configuration
Profile Document (on the server), down to the
iNotes Sync Manager (on the client), without
requiring a reinstallation of the subscription.
The following are the only settings and actions
that cannot be changed on the users computer
unless the user deletes and reinstalls the
subscription:
Encryption
Per-user shared subscriptions
Multi-user data directories
Passthru server settings
Optional TCP/IP addresses
A change in the subscription title
Adding new services or custom filesets
Deleting or moving the main.nsf
Force user to accept subscription changes. This
box is only visible when Push subscription
settings to iNotes Sync Manager is selected.
Select this box to force the user to accept
changes in the Offline Subscription
Configuration Profile document. Not selecting
this box allows users to prevent the changes
from occurring on their subscriptions.
Read only subscription
settings:

Make schedule read-only. Select this box to dim


the scheduled replication settings in the
Properties dialog - Schedule tab of the
subscription on the users computer. You can
push this to users by selecting it before they
install the subscription, or by using the Push
subscription settings feature.
Make sync options read-only. Select this box to
dim the Sync Options settings in the Properties
dialog - Sync Options tab of the subscription on
the users computer. You can push this to users
by selecting it before they install the
subscription, or by using the Push subscription
settings feature.
continued

22-12 Application Development with Domino Designer

Name of field

Action

Passthru server settings:

Use passthru server to connect to destination


server. Select this box to use a passthru server to
connect to the Domino server that hosts the
subscription. You must enter the name of the
passthru server.

Network Settings:

Use optional TCP/IP address to connect to


destination server. Select this box to provide
primary and/or secondary TCPIP addresses for
the destination Domino server hosting the
subscription. This is especially useful for users
who access the server through both an intranet
and an extranet. If the primary address is not
reachable, the iNotes Sync Manager tries the
secondary address to connect to the server.
Then enter the name of the primary and
secondary addresses. If users connect to the host
server through a passthru server, the addresses
must be for the passthru server.
Alternatively, an administrator can configure
these settings for all the subscriptions hosted on
a particular server by adding addresses to the
$DOLS_TCPIPAddress and
$DOLS_TCPIPAddress2 settings in the servers
NOTES.INI.

Leave Display default download page contents selected to have


the download page contain the default text and graphics. You can
add text, HTML, or images in the rich-text field below the default
text and graphics.
Select Display only the custom contents below to create a
download page. A rich-text field appears in which you can add
text, HTML, or images.
10. Save and close the configuration document.
11. Save and close the subscription.
12. (Optional) Customize the subscription. For more information on
customizing the subscription, see the topic Optional tasks for DOLS
developers.

Enabling an Application for Domino Off-Line Services 22-13

Deploying Applications

9. (Optional) At the bottom of the configuration document, select


whether to display the default download page or create your own
download page. The download page is what users see while theyre
installing a subscription. Its useful for showing instructions,
company graphics, warnings, or tips. Do one of the following:

Creating multiple database DOLS subscriptions


A subscription can contain several databases. Although some databases
can be optional, others like the main database (the one containing the
DOLS design elements) are required.

Required databases are those databases necessary for the


subscription to work offline. Required databases replicate in full,
meaning both the design and data are sent to the users machine.

Optional databases replicate as stubs, meaning only the design is


replicated. When you include optional databases in a subscription,
you enable users to download the data in the required databases
more quickly. Users can then download the optional data later.

Here are a few tips to keep in mind when enabling a multiple database
subscription for offline use:

Identify all the databases in your subscription.

Identify the main database and copy the DOLS design elements only
to the main database. Do not copy the design elements to each
database in the subscription.

Use relative URLs and relative paths to link between databases.


Avoid absolute URLs and paths, which do not work offline.
For example, use /dev/mynsf.nsf as opposed to
http://www.servername.com/dev/mynsf.nsf.

Use wildcards (*) or use a directory when entering values in either


the Required files to replicate or Optional files to replicate fields
on the Rules tab of the Offline Subscription Configuration Profile
document.
If you enter explicit file names in either of these fields, you must
re-edit the configuration document each time you add or delete files.
For example, if the field contains three files SalesApp\main.nsf,
SalesApp\contacts.nsf, SalesApp\custom.ntf you must update the
field each time a file is added to the SalesApp\ directory or else that
file will not replicate offline to join the rest of the subscription.
By using wildcards (*) in either of these fields, you specify that all
database files or all template files in a given directory are
automatically replicated, even files recently added. For example, if
you use a wildcard in this way, all NSF files in the SalesApp
directory are replicated:
SalesApp\*.nsf

Similarly, to make sure all NTF files in the SalesApp directory are
included in the replication, specify the following:
SalesApp\*.ntf
22-14 Application Development with Domino Designer

By using just the directory, without a wild card, in either of these


fields, you specify that all files in the directory, whether NSF or NTF,
are replicated, even files recently added, as in this example:
SalesApp

Optional tasks for DOLS developers


This section includes additional information and optional tasks for the
DOLS developer:

Creating custom file sets for a DOLS subscription

Customizing fields and design elements in a DOLS subscription

Creating multiple database DOLS subscriptions

Adding a directory catalog to a DOLS subscription

Adding time zones to a DOLS subscription

Setting a sort order for a DOLS subscription

Creating custom file sets for a DOLS subscription


You can have custom programs run on the subscription after it is
installed to the users machine. You must use a DOLS utility called
DOLMKINF to have your custom program install offline. Do the
following to have your program install and run offline.

Note For Windows client platforms, the file name must begin with
N_ to signify that it is a Win32 file. For example:
N_MYCUSTOM.EXE.
2. Copy the file to the following directory on the Domino server:
Lotus\Domino\Data\domino\html\download\filesets
3. In the command prompt, navigate to the \filesets directory and run
the DOLMKINF utility (DOLMKINF.EXE) by entering arguments
with the following syntax:
DOLMKINF -d path [-f filename] [-v version] [-h]

Enabling an Application for Domino Off-Line Services 22-15

Deploying Applications

1. Create a self-extracting executable (EXE) file containing your


program files.

Argument

Description

-d

Enter this argument, then enter the directory path to your


program files (all the separate files, not the .EXE or .DLL.)

-f

Enter this argument, then enter a name for the INF file,
including the INF suffix. If you do not use the -f argument,
the default file name will be the same as the name of the
directory specified in the -d argument.
The INF name must match the compressed EXE or .DLL file
name. For example, if the EXE file is N_MYCUSTOM.EXE,
specify N_MYCUSTOM here to produce
N_MYCUSTOM.INF.

-v

Enter this argument, then specify a version number. If you do


not use this argument, the default version number is 0.0. This
version number is compared against any existing custom
programs previously downloaded.
The new program is not downloaded if a program with a
higher version number exists on the users machine.

-h

Enter this argument to output help.

Examples

DOLMKINF -d project\myfiles
DOLMKINF -d project\myfiles -f project\n_mycustom
DOLMKINF -d project\myfiles -f project\n_mycustom -v 1.0

The utility generates an INF file containing the number of files in the
program; the number of bytes for the files in the program; and the
version number of the program.
4. Open the Offline Subscription Configuration Profile document. Click
the Services tab, then select Custom Services.
5. Specify your program name (without the N_ prefix or .EXE suffix) in
the Custom Services to install offline field. For example:
MYCUSTOM
In this example, DOLS looks for N_MYCUSTOM.EXE and
N_MYCUSTOM.INF in the \filesets directory. The files are installed
to the iNotes client program directory on the users machine.
6. (Optional) Specify a setup program and any arguments your
program takes. For example:
MYCUSTOM SETUP.EXE -r
In this example, DOLS looks for N_MYCUSTOM.EXE and
N_MYCUSTOM.INF in the \filesets directory. The files are installed
to the iNotes client program directory on the users machine.
Then SETUP.EXE runs and takes the -r argument.
22-16 Application Development with Domino Designer

Note If you specify more than one program, separate the entries with
commas.
Customizing fields and design elements in a DOLS subscription
The DOLS Customize subform provides a way to override default values
in the fields of other subforms in the subscription. This gives you the
flexibility to customize the subscription to your organizations needs. The
values that you can override are listed in the following table. You can
also attach identity icons to this subform.
After you have copied the DOLS Customize subform from DOLRES.NTF
into the subscription, you can edit it in IBM Lotus Domino Designer
Release 6. Because this subform loads after all other subforms, you can
use events such as PostOpen to override the default values for other
fields. You can also place into this subform field validation formulas that
override other fields. During download, the DOLS Customize subform is
loaded by a DSAPI filter on the server and all validation formulas are
retriggered to bring in any new information. For example, the @today
formula brings in todays date.
Identity icons
You can attach identity icon files to the DOLS Customize subform that
identify the subscription on the users computer. You can attach from one
to three identity icons to this subform by choosing File - Attach in Lotus
Domino Designer 6. The icons you attach must be named:
subscription.ico - This icon appears on the users Windows desktop
and serves as a shortcut to the offline subscription. The default is

syncstate1.ico - This icon and syncstate2.ico toggle on the task bar


during synchronizations of the subscription. The default is

syncstate2.ico - This icon and syncstate1.ico toggle on the task bar


during synchronization of the subscription. The default is

Note that each ICO file has a size limit of 15KB.

Enabling an Application for Domino Off-Line Services 22-17

Deploying Applications

Published design elements


The following design elements are published, meaning they are available
for customization. You can manipulate these values with LotusScript or
Formula language statements placed in the DOLS Customize subform.
Design elements not named in this table are subject to change with future
releases. You should not reference them programmatically.
Note Notes C or C++ API access to the following design elements is not
supported. The Notes editor must still execute some formulas in other
subforms through the Offline Subscription Configuration Profile
document.
Published Design Elements
Name

Element
Type

Where Found

Comments

DOLSLoad
DownloadPage

Page

DOLRES.NTF

DOLSRequest
OfflineID

Page

DOLRES.NTF

DOLSWeb
Control

Page

DOLRES.NTF

The published program


name for most design
elements is not the name
with spaces in it - shown,
for example, in the views
in Domino Designer. The
name with spaces may
change over time or locale.

DOLSWeb
ControlBitmaps

Page

DOLRES.NTF

The page that contains the


DOLS Web Control
bitmaps that override the
default bitmaps.

dolcontrolde
fault.bmp

Bitmap file
attachment

DOLSWeb
ControlBitmaps
Page

The bitmap that appears


when no subscription is
installed.

dolgooffline.bmp Bitmap file


attachment

DOLSWeb
ControlBitmaps
Page

The bitmap that allows you


to open a subscription
offline when you are
online with the
subscription.

dolgoonline.bmp

DOLSWeb
ControlBitmaps
Page

The bitmap that allows you


to open a subscription
online when you are
offline with the
subscription.

Bitmap file
attachment

DOLSEditOffline Agent
Configuration

DOLRES.NTF
continued

22-18 Application Development with Domino Designer

Published Design Elements


Element
Type

Where Found

Comments

DOLSOffline
Configuration

Form

DOLRES.NTF

DOLS
Configuration
Settings

Subform

DOLRES.NTF

DOLSCustomize

Subform

DOLRES.NTF

DOLSDownload
Control

Subform

DOLRES.NTF

DOLSDownload
Instructions

Subform

DOLRES.NTF

SubscriptionTitle

Field

DOLS
Title of subscription.
Configuration
Settings Subform

subscription.ico

Icon file
attachment

DOLSCustomize Default subscription icon.


Subform
Appears on users desktop.

syncstate1.ico

Icon file
attachment

DOLSCustomize One of two animation


icons for active sync of this
Subform
subscription. Appears on
users task bar.

syncstate2.ico

Icon file
attachment

DOLSCustomize One of two animation


Subform
icons for active sync of this
subscription. Appears on
users task bar.

Choose
DownloadText

Field

DOLS
Download text radio
Configuration
button
Settings Subform

Basic

Field

DOLS
Basic services check box
Configuration
Settings Subform

Search

Field

DOLS
Full-text indexing check
Configuration
box
Settings Subform

LotusScript

Field

DOLS
LotusScript and agents
Configuration
check box
Settings Subform
continued

Enabling an Application for Domino Off-Line Services 22-19

Deploying Applications

Name

Published Design Elements


Name

Element
Type

Where Found

Comments

JavaApplets

Field

DOLS
Java classes and applets
Configuration
check box
Settings Subform

CustomFile

Field

DOLS
Custom services check box
Configuration
Settings Subform

CustomFile
Names

Field

DOLS
Custom services list
Configuration
Settings Subform

CanonicalServer
Name

Field

Hidden field that must


DOLS
always have canonical
Configuration
Settings Subform name of current server.

ScheduleType

Field

DOLS
Schedule type radio button
Configuration
Settings Subform

Weekdays

Field

DOLS
Check box selection of
Configuration
multiple weekdays.
Settings Subform

Monthdays

Field

DOLS
Numeric - not less than 1
Configuration
or greater than 31
Settings Subform

RunOnce

Field

DOLS
Check box
Configuration
Settings Subform

StartTime

Field

DOLS
Date/time
Configuration
Settings Subform

Repeat

Field

DOLS
Check box
Configuration
Settings Subform

RepeatInterval

Field

DOLS
Positive numeric interval
Configuration
Settings Subform

RepeatInterval
Unit

Field

DOLS
Selection list
Configuration
Settings Subform
continued

22-20 Application Development with Domino Designer

Published Design Elements


Element
Type

Where Found

Comments

StopSync

Field

DOLS
Check box
Configuration
Settings Subform

SyncStopTime

Field

DOLS
Datetime
Configuration
Settings Subform

LimitSync
Duration

Field

DOLS
Check box
Configuration
Settings Subform

SyncDuration

Field

DOLS
Positive numeric interval
Configuration
(minutes)
Settings Subform

Disabled

Field

DOLS
Check box
Configuration
Settings Subform

RequiredFilesTo
Replicate

Field

DOLS
Text list
Configuration
Settings Subform

AutoReplicate

Field

DOLS
Check box
Configuration
Settings Subform

OptionalFilesTo
Replicate

Field

DOLS
Text list
Configuration
Settings Subform

LimitReplicate
DaysBack

Field

DOLS
Check box
Configuration
Settings Subform

ReplicateDays
Back

Field

DOLS
Positive numeric integer
Configuration
Settings Subform

LimitDBSize

Field

DOLS
Check box
Configuration
Settings Subform

DBSizeLimit

Field

DOLS
Positive numeric integer
Configuration
Settings Subform
continued

Enabling an Application for Domino Off-Line Services 22-21

Deploying Applications

Name

Published Design Elements


Name

Element
Type

Where Found

Comments

LimitSubscription Field
Size

DOLS
Check box
Configuration
Settings Subform

SubscriptionSize
Limit

Field

DOLS
Positive numeric integer
Configuration
Settings Subform

NotifyOn
Completion

Field

DOLS
Check box
Configuration
Settings Subform

RouteMailOn
ShutDown

Field

DOLS
Check box
Configuration
Settings Subform

RunReplication
OnShutdown

Field

DOLS
Check box
Configuration
Settings Subform

Custom
DownloadText

Field

DOLS
Download
Instructions
Subform

Rich text for download


page

Adding a directory catalog to a DOLS subscription


Adding a directory catalog to a DOLS subscription allows users to take
Domino Directory information offline. To add a directory catalog to a
subscription:
1. Read the following.
Adding a catalog means more for a user to download. To keep
download time reasonable, you may want to create a directory
catalog specifically for offline users, which contains only the
information they absolutely need.
To add a default catalog, open the NOTES.INI file on the server
and add the line $DOLSDirectoryCatalog=nameofcatalog.nsf
(nameofcatalog being the actual name of the catalog). Once you do
this, you dont need to specify a catalog in the Directory catalog
to replicate field in the Offline Configuration Profile document.
You must add a default catalog for iNotes Access for Outlook
users.

22-22 Application Development with Domino Designer

From the DOLS Customize subform, you can create a field that
looks up a catalogs name on the server record and populates the
Directory catalog to replicate field with that name.
2. Open the Offline Subscription Configuration Profile document.
3. Enter the name of the catalog in the Directory Catalog field in the
Rules tab.
Adding time zones to a DOLS subscription
When there is a date and time displayed in the subscription, add a time
zone field, too. If you do not specify the time zone, you may confuse the
offline user because the subscription uses the clock of the local machine
(not the clock of the server) when it runs locally. For example, a Chicago
user might view an offline document that displays the local time as 10
AM. At the same time, the online version of the same document displays
the time as 11 AM. By adding time zones, you can display the times as 10
CST and 11 EST.
Setting a sort order for a DOLS subscription
A sort order language determines the rules by which documents are
ordered in views. For example, some applications use a sort order in
which documents are sorted by number first, then letter.

To ensure that the same sort order is used online and offline, specify a
sort order in the Database Properties - Design tab of each database in the
subscription. Select Multilingual database and select a sort order
language.

Enabling an Application for Domino Off-Line Services 22-23

Deploying Applications

The default sort order of an application is determined by the operating


system of the computer its on. This could be a problem with a DOLS
subscription if the sort order offline (on the users computer) is different
from the sort order online (on the Lotus Domino 6 server). Users would
see the same information in the views, but in a different order than you
intended.

Appendix A
Domino Designer Templates
The templates described in the following table are available with Lotus
Domino Designer 6 and specifically intended for use by application
developers.
For information on system administration templates, see the topic
Application and System Templates found in Administering the Domino
System or in the Lotus Domino Administrator 6 Help.

Table of Domino Designer templates


If you install the templates with Lotus Domino Designer 6, youll find
them in the Notes program directory.
In the table, an asterisk (*) indicates that additional information on this
template appears in the Domino Designer Templates Guide available on the
Lotus Developer Domain Web site: http://www.lotus.com/ldd/doc.
Database title

File name & design Audience Description


template name

Discussion - Notes discsw6.ntf


& Web (6) (*)
StdR6Disc

doclbw6.ntf
Notes
StdR6WebDocLib and
Web
users

Electronic conference room.


Features: Threaded
discussion database with
user profiles that allow users
to receive automatic mailing
with links to items of
interest. Anonymous
responses, archiving, and
public/private threads.
Multiple navigators,
alternate view templates, and
hotspot actions for Web
users.
Document storage.
Features: Review workflow
(serial and parallel) and
archiving.
continued
A-1

Reference

Doc Library Notes & Web


(R6) (*)

Notes
and
Web
users

Database title

File name & design Audience Description


template name

Microsoft Office
Library (6)

doclbm6.ntf
StdR6DocLibMS

Notes
users

Special version of the


Document Library template
dedicated to this application
suite.
Automatically loads and
sizes the OLE object to the
window; and stores and
supports review cycles of
documents created with suite
products.

Personal Journal
(R6)

journal6.ntf
Std6Journal

Notes
and
Web
users

Electronic diary where users


can write and store private
documents. Includes
instructions for customizing
the database design.

TeamRoom (6)(*)

teamrm6.ntf
Notes
StdR6TeamRoom and
Web
users

A-2 Application Development with Domino Designer

Team collaboration database.


Maintains several document
communication types to
represent meetings,
discussions, and action
items. Features parallel
review processing, archiving,
and newsletters.

Appendix B
Importing to and Exporting from Views
Importing data allows you to move data from another system into a
view. Exporting data allows you to create a table of the data in a view for
use in a presentation or report.

File formats you can export and import


No matter what type of data you want to import into a view, its best to
import a small test file first. You can quickly determine whether the
import is working correctly and make any necessary corrections before
you import the entire file. The following table lists the types of files you
can import and export.
File extensions

File description

Lotus 1-2-3 and


Symphony
Microsoft Excel

WKS, WK1, WRK,


WR1, WK3, WK4

Entire worksheet or named range.


To import a Microsoft Excel file, use
Excel to save the file as a 1-2-3
worksheet and then import it.
You cannot import a WRK or WR1 file
to a view, but you may export to
either format. If you import a
multiple-worksheet file, only the
worksheet that was most recently
viewed will be imported. If you
import a specific range from a
multiple-worksheet file, only the
information from the most recently
viewed worksheet will be imported.

Tabular text

TAB, TXT, PRN, RPT ASCII text arranged in rows and


columns; limit of 1536 characters per
record, total.

Structured text

LTR, CGN, STR

ASCII text that retains its structure in


fields and values; shown as one
record per page and one field per line;
limit of 256 bytes per simple text field.
continued

B-1

Reference

File type

Importing options
When you import a file into a view you have some choices for how to
display the imported data.

Formatting options
You have three choices for generating the column titles and widths
during an import.

Choose View Defined if the column names and column widths in


the source worksheet are identical to the names and widths of the
columns in the view.

Choose WKS Title Defined if youve set up the worksheet so that


the cells in the first row of the worksheet match the column headers
and fields in the view. The cells in the first row must be labels.

Choose Format File Defined if you are using a column descriptor


file (COL) that contains column style instructions.

Including additional fields for imported documents


You can use the import option Calculate fields on form during
document import if you want the newly created document to contain all
of the fields of the form youre using for the import. Notes imports
information more quickly when you do not select this option. If you first
import without selecting this option and the results are not what you
expect for example, fields that rely on other fields are empty or
incorrect import the worksheet again and choose this option.

Character translation file


Notes uses a character translation file (CLS) to translate foreign symbols
and characters. The CLS file must be in the Notes program directory.

Importing worksheets
Before you import a worksheet, you must create a form and a view to
hold the imported data. When you import a worksheet into the view,
each worksheet row becomes an individual document, and each
worksheet column becomes a field. The original cell contents become the
field contents. You can import data into either main documents or
response documents.

B-2 Application Development with Domino Designer

Notes doesnt wrap lines of an imported worksheet. If a worksheet has


more columns than a window can display, use the horizontal scroll bars
to see the full width of the worksheet. Notes can handle a worksheet
whose maximum text width is 22.75 inches; additional text is not
displayed in the columns.

To import worksheet data into a view


The source file containing the worksheet must be on your local hard
drive or on a file server to which you are connected.
1. Select the database and open the view that will receive the source
data.
2. Choose File - Import.
3. Select the name of the source file.
4. Select 123 Worksheet.
5. Click Import.
6. Select a form to use for the imported source data from the Use
Form list.
7. Leave Main Document(s) selected in the Import as list, unless you
are creating response documents.
8. Select a Column format.
If you select Format File Defined, enter the name of the COL file,
including the complete operating system path.
9. To import part of a worksheet, type a range name or range address
in the WKS Range Name box. You cannot import a 3-D range.
Note If you import a multiple-sheet worksheet file, Domino imports
only the sheet that was open when the file was last closed, or, if
importing a specified range, imports the range from that sheet.
10. (Optional) Select Calculate fields on form during document
import.

Importing to and Exporting from Views B-3

Reference

11. Click OK.


After importing, you can change the column font to a proportional space
font, such as Courier, in the view design pane to improve the display of
worksheet data.

Importing tabular text


Tabular text is ASCII text arranged in rows and columns, separated by
characters. When you import a tabular text file into a view, each text row
becomes an individual document, and each text column becomes a field.
The original cell contents become field contents.
There is a limit of 1536 total characters per record for tabular text
imported into a view.
If the ASCII file and the view have different formats, create a column
descriptor file (COL) to parse the ASCII file so its individual components
correspond to columns in the view or document fields. Then when you
import the ASCII file, select the Use format file option in the Tabular
Text Import dialog box.

Viewing imported text


ASCII text files are monospaced. If columns in the view use a
proportional font, text from the imported file may be truncated. To avoid
problems when importing text into a view, select Typewriter Fonts
(monospaced text) for the columns. You may want to resize columns to
be sure the data is not truncated on import. Truncation occurs only in the
displayed text; no data is lost.

To import tabular text into a view


The source file containing the tabular text file must be on your local hard
drive or on a file server to which you are connected.
1. Select the database and open the view that will receive the source
data.
2. Choose File - Import.
3. Select Tabular Text.
4. Select the name of the source file.
5. Click Import.
6. Select a form to use for the imported source data from the Use Form
list.
7. (Optional) Enter a Header Line Count or a Footer Line Count.
To import only the data, specify the number of header and/or footer
lines that you want Notes to ignore in the source file.

B-4 Application Development with Domino Designer

8. Enter the number of Lines Per Page in the source file.


The Lines per Page setting establishes how many lines of data each
Notes document receives. The total number of lines in the imported
documents are calculated as:
Lines Per Page - (Header Line Count + Footer Line Count)
9. Leave Main Document(s) selected in the Import as list, unless you
are creating response documents.
10. (Optional) Select Calculate fields on form during document
import.
11. (Optional) Select Use format file, click Choose format file, and
select a column descriptor (COL) file.
12. Click OK.

Importing structured text files


Structured text is ASCII text that retains its structure in fields and values.
When you import a structured text file into a view, the field names in the
text file must correspond to the field names in a Notes document in the
view. To do this, create a form that contains the names of the fields
youre importing.

To import structured text into a view


The source file containing the structured text file must be on your local
hard drive or on a file server to which you are connected.
1. Select the database and open the view that will receive the source
data.
2. Choose File - Import.
3. Select Structured Text.
4. Select the name of the source file.
6. Select a form to use for the imported source data from the Use
Form list.
7. Select an Inter-Document Delimiter to determine how to separate the
records.
Select Form-feed if the records in the source file are separated
by a form feed (ASCII 12).
Select Character Code if the records in the file are separated by
a delimiter other than the default, ASCII (form-feed).
Importing to and Exporting from Views B-5

Reference

5. Click Import.

8. Leave Main Document(s) selected in the Import as list unless you


are creating response documents.
9. Do one of the following:
Select Justify in the For body text list to wrap text to fit the
Notes window.
Select Preserve Line Breaks in the For body text list to
maintain the existing line breaks in the source file and add a
return character at the end of each line of text.
10. (Optional) Select Calculate fields on form during document
import.
11. Click OK.

Creating a column descriptor (COL) file


A column descriptor (COL) file is an ASCII text file that contains
instructions for mapping each column in a source file into the fields and
columns of a Notes view. Use a COL file only with tabular ASCII files
and worksheet files.
1. Use any ASCII text editor to create a file with the extension COL.
2. Use the column descriptor keywords and syntax to describe how to
import each column from the source file.
3. Write formulas in a section that is delimited by the keywords
FORMULASTART and FORMULAEND.
4. Save and close the file.

Using a column descriptor file (COL ) to map a source file to a Notes


view
To import many files that have an identical structure into a view, create a
column format descriptor (COL) file. A COL file is like a map that
defines which data from the source file goes into which Notes field. Use a
COL file only with tabular text files and worksheet files.
A COL file is an ASCII text file that contains a series of column definition
statements, followed by a section containing formulas that control the
contents of fields in the Notes view. You write one statement for each
column in the source file. This statement describes how to format and
map the columns in the source file to columns in the Notes view. For best
results, use exactly the same field names in the COL file and in the Notes
view.
B-6 Application Development with Domino Designer

Mapping a column to a field in a view


Enter the name of the column in the source file. The name should be
identical to the name of the corresponding field in a form. After you
enter the column name, you can provide an optional statement that
specifies the data type of the data. You must, however, provide
statements that define the format of the source data that is, the
delimiter or fixed position of the column.
If you use field names in the COL file that are not in the Notes view,
Notes imports the data for those fields, but the data wont appear in the
form or view until you create Notes field names that exactly match those
in the COL file. For example, if the COL file uses the field name Phone
and the Notes view uses PhoneNumber, data for the Phone field is
present in the view but is not displayed. To correct this problem, change
the name of the existing Notes field to Phone, create a synonym for the
existing field, or create a new Notes field called Phone, and refer to the
field in the view youre using.

Specifying the data type of a column


When you import a file, Notes automatically determines the data type of
each column, based on the appearance of the data. For example, if the
column in the source file contains data in the form 7/19/97, Notes
imports the data as dates.
As part of a field definition, you can provide an optional TYPE expression,
followed by the appropriate data type: Text, Number, or Datetime. For
example, to import the contents of a field called DateOfBirth as a date,
enter the following field definition into the COL file:
DateOfBirth: TYPE DATETIME

The data in the source column must fit the data type you specify. If Notes
encounters data that doesnt match the data type you specify, Notes
imports the data as the type it most resembles.

Using formulas

Use @If formulas to test incoming values and display a specific value
in the view, depending on the result of the formula.

Use text manipulation functions to modify the appearance of the


incoming value for example, to concatenate values or trim excess
space characters from incoming values.

Enter default values in fields.


Importing to and Exporting from Views B-7

Reference

The formulas that you write in a COL file describe how to modify the
incoming values for display in the view. These formulas, which follow
the same rules as view selection formulas, may:

Writing a COL file for a worksheet


To import worksheets using COL files, use these keywords:
WKSCOL
This keyword allows you to associate a field name with a specific
worksheet column. The syntax for a statement using this keyword is:
fieldname: WKSCOL columnletter
Where:

fieldname is the name of the field in the view.

columnletter is the letter of the source column in the worksheet that


maps to that field name.

Only columns specified by the WKSCOL keyword will be imported.


RANGE
This keyword specifies the worksheet range to be imported. The syntax
for a statement using this keyword is:
RANGE rangename
Where:

rangename is the name of the range in the worksheet.

The range must be a valid range name in the imported file.


If you use a RANGE statement, the first WKSCOL statement in the COL
file must refer to the first column in the range. For example, if the range
starts at column D, the first WKSCOL statement in the COL file must be:
Fieldname: WKSCOL D
Note that a RANGE statement in a COL file overrides any range name
entered in the Worksheet Import Settings box.

Writing a COL file for a tabular text file


Specifying the delimiter of a column
If the tabular text file uses a delimiter character to separate columns of
data, you must use the UNTIL keyword to specify the delimiter as part of
each field definition.

B-8 Application Development with Domino Designer

For example, if the source data is delimited by commas, as in:


Smith, Robert, Gryphon Real Estate, 555-1212
and the view contains the following field names:
LastName, FirstName, Company, Phone
then the COL file will contain the following lines:
LastName: UNTIL ",";
FirstName: UNTIL ",";
Company: UNTIL ",";
Phone: UNTIL "";

If there is no delimiter at the end of the record (row), you identify the
end of the last field as a null ().

Specifying the start, end, and width of a fixed-width column


If the tabular text file contains fixed-width columns of data, you use the
START keyword along with either the END or WIDTH keyword to
define each field.
For example, if the source data contains a LastName field that is 12
characters wide and the view contains a field named LastName, the COL
file must contain the following column definition:
LastName: START 01 END 13

or
LastName: Start 01 WIDTH 12

The first column position is always 01, not 0.


The following lines of a COL file give two sets of instructions:
LastName: START 1 WIDTH 12
FirstName: TYPE TEXT START 13 END 20

Importing to and Exporting from Views B-9

Reference

The first line puts the contents of the first field, LastName, at position 1
and allows 12 characters for it. The second line specifies that the data
type of the FirstName field is text, begins the contents of the field at
position 13, and allows 8 characters for it.

Specifying the header, footer, and lines per page


The HEADER, FOOTER, and LINESPERPAGE keywords tell Notes to
ignore headers and footers during importing. The number of lines in the
imported document are calculated as:
LinesPerPage - (HeaderLines + FooterLines)
For example, the following line of a COL file tells Notes to ignore 4
heading lines and 1 footer line and sets the maximum number of lines
per page to 66:
HEADERLINE 4 FOOTERLINE 1 LINESPERPAGE 66

The keywords may appear together or alone on a line in the file. These
settings in a COL file override values in the Tabular Text Import dialog
box.

Writing formulas for COL files


All formulas in a COL file must appear after all the column definition
statements. A COL file can have only one FORMULASTART and
FORMULAEND sequence. FORMULASTART must appear alone on a
line before the first formula. FORMULAEND must appear alone on a line
after the last formula. Each line of formulas between these keywords
must end with a semicolon.

Example
The following COL file is used to import a 1-2-3 .WK3 file that records a
checkbook balance.
;COL file for checkbook worksheet
;Discovers checkbook errors
Define five columns of input
date: WKSCOL A
chknum: WKSCOL B
amount: WKSCOL C
deposits: WKSCOL F
withdrawals: WKSCOL G
balance: WKSCOL K
;Define one column to mark bounced checks
FORMULASTART
FIELD bounced:=@IF(balance<0,"Yes"; "No");
FORMULAEND

In this example, columns D, E, H, I, and J in the worksheet are not


imported into the view.

B-10 Application Development with Domino Designer

Exporting views
You can export a view to a worksheet, a tabular text file, or a structured
text file.

Exporting to a worksheet
When you export a view to a worksheet, each document becomes a row
in the worksheet. Each field becomes a column in the worksheet. The
original field contents become cell contents. Column titles become labels
in the worksheet.
When you export a view to a new worksheet file, Notes exports the file in
1-2-3 WK1 format. Although you can specify any extension with the file
name, its best to keep the extension .wk1. When you open the exported
file in a newer release of 1-2-3, 1-2-3 automatically converts the file to its
new format and adds the appropriate extension.
If you change the exported file to WK2, WK3, or WK4 before opening it
in a release of 1-2-3 that uses that extension, and then open the file in
1-2-3 and attempt to add and save attributes, the new copy of the file will
be in conflict with the original, and you wont be able to save your
changes.
To export to a Microsoft Excel file, export the view as a 1-2-3 worksheet,
and then save the file in 1-2-3 as a Microsoft Excel file.

Exporting to a tabular text file


Tabular text is ASCII text arranged in rows and columns, separated by
space characters. When you export a view to a tabular text file, each
document becomes a text row (line). Each field becomes a text column,
separated by space characters. The original field contents become the
cell contents. To see the separation between columns in the exported
view, use a monospaced font for the columns in the original view.

To display or edit the contents of a view in a Notes document, export the


view to a tabular text file. Then import the tabular text file into a Notes
document.

Importing to and Exporting from Views B-11

Reference

The result of a tabular export may not look exactly like the view. Views
use a proportionally spaced font, but exports use a monospaced font.
Export a few documents as a test. Then, if necessary, adjust the column
width settings in the view before you perform the whole export.

Exporting to a structured text file


Structured text is ASCII text that retains its structure in fields and values.
Exporting a view to structured text creates a file containing the text of all
the documents in the view, minus any rich text attributes.

To export a view
1. Select the database and open the view you want to export.
2. (Optional) Select specific documents to export only a subset of the
view.
3. Choose File - Export.
4. Select the file format youre exporting to.
5. Do one of the following:
To replace an existing file, select a directory and file name from
the list.
To create a new file, enter a new file name.
To append to an existing tabular text file, select a directory and
file name from the list.
6. Click Export.
7. If you selected an existing file, do one of the following:
To replace the file, click Replace.
To append to an existing file, click Append.
8. Click All documents unless you selected specific documents in
Step 2.
9. (Optional, for 1-2-3 worksheet or tabular text formats) Select
Include View titles to export the views column headings to a
worksheet or tabular text file.
10. (Optional, for structured text format) Change the inter-document
delimiter and word-wrap settings if you are exporting to a structured
text file.
11. Click OK.

B-12 Application Development with Domino Designer

Delimiter and word wrap settings


Delimiter - Choose Form Feed to use a form-feed to separate records
in the file, or choose Character Code to separate the records in the
file with the ASCII code for a delimiter other than the default, ASCII
12 (form-feed), such as:

32

Space

44

45

58

59

124

Word wrap - Represents the number of characters at which each line


wraps. The default is 75 characters.

Reference
Importing to and Exporting from Views B-13

Appendix C
Developing Applications Using MAPI
This appendix describes the support available in Domino to access your
Domino mail file and the Domino Directory.

Developing applications using MAPI


Lotus Domino Designer Release 6 supports the messaging application
program interface (MAPI), which allows mail integration between
Domino and a MAPI-compliant messaging application, such as Microsoft
Outlook, Microsoft Office applications, or user-written C++ programs.
To support MAPI, Domino includes these service providers, which
provide access to the Domino message, directory, and transport services
from simple or extended MAPI clients:

Address Book provider

Message Store provider

Message Transport provider

Using the MAPI classes and methods supported by the Domino MAPI
service providers, you can write C++ programs to manipulate Domino
objects.
A list of supported MAPI classes and methods appears at the end of this
appendix.

The Address Book provider provides access to the Domino Directories.


The provider searches all name and address books on a server. To specify
that the provider search additional Domino Directories when doing
address lookups, set the NAMES= setting in the NOTES.INI file to
include the file names of additional Domino Directories to search. Also,
add the names of the Domino Directories for Options - Addressing
during MAPI profile setup.

C-1

Reference

The Address Book provider

The Address Book provider searches the Domino Directory for recipients'
names according to the order specified in the profile.
Any simple or extended MAPI client can use the Address Book provider
to access a Domino Directory.

The Message Store provider


If you are a Notes user receiving a message, you use the Message Store
provider as the default MAPI handler of messages (instead of using the
Message Transport provider). In addition, messages are sent using calls
to the Message Store Message Interface rather than the MAPI spooler.
MAPI creates an Outbox folder the first time the Domino Message Store
is accessed. The Outbox folder captures outgoing messages you send
from any extended or simple MAPI client (for example, Microsoft
Outlook or Office) when you are not connected to the LAN. Messages
addressed to Notes recipients are stored in the Outbox folder and placed
in the local mail.box database in Domino. Once a connection to the server
is re-established, the messages are transferred. Messages addressed to
non-Domino recipients are placed in the outgoing mail queue, the
exchange.box database, and the MAPI spooler handles them.
The MAPI folder interface is mapped onto Domino folders. You can
create, move, copy, rename, and delete folders. You can also create or
delete file attachments in messages you compose while using the client
application. Attachment data is set or obtained using the IStream or
IStorage interfaces. RTF and native HTML are supported.
Note that some message store capabilities may not be supported.

The Message Transport provider


The Domino Mailer and Router transfers messages between Notes users.
When the MAPI spooler receives messages composed in a non-Notes
message store, the Domino MAPI Message Transport provider registers
address and message types and sends messages to Notes recipients. If
one or more recipients are not of ADDRTYPE Notes, the Mail Router
passes the messages to the MAPI spooler.

C-2 Application Development with Domino Designer

MAPI recipient types


Domino MAPI service providers handle delivery of messages to the
following recipient types:

Users who access their Domino mail files through a simple or


extended MAPI client, such as Microsoft Outlook

Non-Notes users who access their non-Domino mail files through a


simple or extended MAPI client, such as Microsoft Outlook

Notes users who access their Domino mail files from the Notes
desktop

Users of foreign mail systems that use a gateway as a backend

For information about MAPI service providers, see the topic "Using
Microsoft mail programs with Notes" in Lotus Notes 6 help.

Platforms and requirements for MAPI


The DLLs required for the Windows messaging subsystem are available
only from Microsoft. Before you install the Notes Client, you must install
Microsoft Outlook 98 or Microsoft Outlook 2000.
Windows 98
When you install the Notes client, the Domino MAPI service providers are
automatically installed. The required DLLs for the Windows messaging
subsystem are already present in Windows 95 and Windows 98.
Windows NT 3.51
The Domino MAPI service providers are available for Windows NT 3.51.
Since Windows NT 3.51 does not provide the Windows messaging
subsystem, you must install the subsystem separately.

Windows 2000
The Domino MAPI service providers are available for Windows 2000.
The required DLLs for the Windows messaging subsystem are already
present in Windows 2000.

Developing Applications Using MAPI C-3

Reference

Windows NT 4.0
The Domino MAPI service providers are available for Windows NT 4.0.
The required DLLs for the Windows messaging subsystem are already
present in Windows NT 4.0.

Note The Domino MAPI service providers can be installed and used for
node installations on all of the above Windows platforms.
Mail
The Domino MAPI service providers may only be used to access mail
files that use the Lotus Domino Designer 6 mail extended template
(MAIL6EX.NTF). If you are upgrading from Release 5.x to Lotus Domino
Designer 6, you must upgrade your mail file to use the mail template
provided in Lotus Domino Designer 6. To use the service providers, both
the client and the server must be running Lotus Domino Designer 6.
The Profile Setup Wizard automatically installs all three service
providers. When you create a Microsoft Outlook Profile, the wizard uses
information stored in the current Location document in Domino. You
make modifications to the Office (Network) Location document to
configure the location for server-based mail.
To use workstation-based mail, you modify the Local Mail
(Disconnected) Location document. Note that the Location type in the
local mail document must be either Local Area Network or No
Connection. The Mail section of the location document must specify
information about the mail file location, the name of the mail file, and the
domain.
Note During logon to the service providers, the settings for
MDB_NO_DIALOG and AB_NO_DIALOG flags are ignored. As a result,
the user is always prompted for a password.
Address Book template
To access Domino Directories through the Address Book Provider, you
must apply the Domino Directory template (pubnames.ntf) to the design.
If you are using workstation-based mail, apply the Personal Address
Book template (pernames.ntf) to the design of the Personal Address
Books.

C-4 Application Development with Domino Designer

MAPI classes and methods


Not all supported methods are supported for all objects.
Supported methods

CLASS IMAPIContainer

GetContentsTable
GetHierarchyTable
OpenEntry
SetSearchCriteria

CLASS IABLogon

Advise
CompareEntryIDs
GetLastError
Logoff
OpenEntry
Unadvise
GetOneOffTable

CLASS IABProvider

Logon
Shutdown

CLASS IMAPIControl

Activate
GetLastError
GetState

CLASS IMAPIFolder

CopyFolder
CopyMessages
CreateFolder
CreateMessage
DeleteFolder
DeleteMessages
EmptyFolder
GetMessageStatus
SaveContentsSort
SetMessageStatus
SetReadFlags

CLASS IMAPIProp

CopyProps
CopyTo
GetIDsFromNames
GetLastError
GetNamesFromIDs
GetPropList
GetProps
OpenProperty
SaveChanges
SetProps
DeleteProps

Reference

MAPI classes

continued

Developing Applications Using MAPI C-5

MAPI classes

Supported methods

CLASS IMAPITable

Abort
Advise
CreateBookmark
FindRow
FreeBookmark
GetLastError
GetRowCount
GetStatus
QueryColumns
QueryPosition
QueryRows
QuerySortOrder
Restrict
SeekRow
SeekRowApprox
SetColumns
Unadvise
SortTable

CLASS IMessage

CreateAttach
DeleteAttach
GetAttachmentTable
GetRecipientTable
ModifyRecipients
OpenAttach
SetReadFlag
SubmitMessage

CLASS IMsgStore

AbortSubmit
Advise
CompareEntryIDs
FinishedMsg
GetOutgoingQueue
GetReceiveFolder
NotifyNewMail
OpenEntry
SetLockState
SetReceiveFolder
StoreLogoff
Unadvise

CLASS IMSLogon

Advise
CompareEntryIDs
GetLastError
Logoff
OpenEntry
Unadvise
continued

C-6 Application Development with Domino Designer

MAPI classes

Supported methods

CLASS IMSProvider

CompareStoreIDs
Logon
Shutdown
SpoolerLogon

CLASS IXPLogon

AddressTypes
EndMessage
FlushQueues
Idle (supported, but not used for tightly-coupled
message store)
OpenStatusEntry
Poll (supported, but not used for tightly-coupled
message store)
RegisterOptions
StartMessage (supported, but not used for
tightly-coupled message store)
SubmitMessage
TransportNotify

CLASS IXPProvider

Shutdown
TransportLogon

CLASS IMailUser

All methods supported for this class

CLASS IAttach

All methods supported for this class

CLASS IMAPIAdviseSink All methods supported for this class


CLASS IMAPIProfile

All methods supported for this class

CLASS IMAPIContainer

All methods supported for this class

CLASS IMAPIStatus

All methods supported for this class

CLASS IPropData

All methods supported for this class

CLASS ITableData

All methods supported for this class

Reference
Developing Applications Using MAPI C-7

Appendix D
Features to Avoid Using in Web Applications
The majority of design features are available for both Notes and Web
users. This section describes the features that arent applicable to Web
browsers or arent supported for them.

Overview of features to avoid using in Web applications


Developers creating applications specifically for the Web, or for the dual
purpose of serving Notes and Web clients, should review the following
tables for features that are not supported on the Web.
@functions

Actions and agent properties

Calendar features

Field properties

Form properties

Formatting features

Frame properties

Horizontal rule properties

Hotspot properties

Navigator properties

Table properties

Text styles

View properties

Features that are not supported by the Domino view applet

Reference

D-1

Domino @functions that are not supported on the Web


The following groups of @functions are not supported in Web
applications or are supported differently than they are in Domino
applications.
@Function

Comments

@Certificate
@DbCommand

Available only with the syntax


@DbCommand(Domino;ViewNextPage)
and @DbCommand
(Domino;ViewPreviousPage) to create a
link to the next/previous page in a view. Not
available in other contexts.

@DDEExecute
@DDEInitiate
@DDEPoke
@DDETerminate
@DocMark
@DeleteDocument
@DocChildren
@DocDescendants
@DocLevel
@DocNumber
@DocParentNumber
@DocSiblings

Not available except in column formulas.

@IsCategory
@IsExpandable
@Responses
@DialogBox
@PickList
@Prompt
@IsModalHelp
@GetPortsList
@Environment
@SetEnvironment
ENVIRONMENT keyword

Use predefined field names to gather


information about the Web users environment
by requesting Common Gateway Interface
(CGI) environment variables.

@MailSend
continued

D-2 Application Development with Domino Designer

@Function

Comments

@Domain
@MailDbName
@MailEncryptSavedPreference
@MailEncryptSendPreference
@MailSavePreference
@MailSignPreference
@IsAgentEnabled
@IsDocBeingMailed
@Unique
@URLGetHeader
@URLHistory
@UserPrivileges
@Platform for users platform. Returns servers platform only. Use
@ClientType to distinguish between Web and
Domino users.

Domino actions and agent properties that are not supported on the
Web
Avoid using the following actions and agent features in a Web
application.
Agents

Comments

Manually From Actions Menu

Web users do not have an Actions menu.


Run agents with actions or buttons that use
@Command([RunAgent]),
@Command([ToolsRunMacro]), or through
the WebQuerySave and WebQueryOpen
form events.

Form and view actions


Include action in Action menu

Web users do not have an Actions menu.


Use the option Include action in button
bar instead.

Default form and view actions


that use system commands (such
as *Edit Document, *Categorize)

Use supported @commands to create the


equivalent actions.
continued

Features to Avoid Using in Web Applications D-3

Reference

If Documents Have Been Pasted The concepts of pasted documents and


and the document selection
selected documents dont apply to Web
option Selected documents
applications.

Agents

Comments

Programs for actions and agents


Simple actions
LotusScript for forms, actions,
and buttons

Supported for agents only.

Alias a folder simple action

Dragging and dropping to folders is not


available on the Web.

Domino calendar features that are not supported on the Web


Avoid using these calendar features in a Web application.

Embedded Group Scheduler

Date Picker

Time control

Duration control

Domino field properties that are not supported on the Web


Avoid using the following field features in a Web application.
Notes/FX fields

Comments

Field Info properties


Compute After Validation
Give this field default focus
Control properties
Options

Display entry helper button is not


supported.

Advanced properties
Help description
Enable encryption for this field

Web users cannot read data in encrypted


fields.

Sign if mailed or saved in section


continued

D-4 Application Development with Domino Designer

Notes/FX fields

Comments

Names fields/Control properties


Use Address dialog for choices, Use
Access Control List for choices, and Use
View dialog for choices are not
supported. Web user access to databases is
based on the authenticated name.

Choices (for Names fields)

Check box fields


Check box selection order

For some browsers, the order of the data


returned from multiple selections in a
checkbox may be different from the
selection order. The data itself remains the
same, but the order returned is different.

Domino form properties that are not supported on the Web


Avoid using the following form features in a Web application.
Form Info properties

Comments

Versioning
Anonymous forms
Merge replication conflicts
Store form in document - Edit mode Read mode is supported, but do not use
for documents that need to be created or
edited on the Web.
Disable field exchange
Automatically refresh fields
Defaults properties

On Open: Show context pane


continued

Features to Avoid Using in Web Applications D-5

Reference

Inherit entire selected document into rich


On Create: Inherit entire selected
document into rich text field as text field as rich text is supported. The
Link and as Collapsible rich text documents must reside in the same
database and the database property, Web
Access: Use JavaScript when generating
pages" must be selected.

Form Info properties

Comments

Security properties
Default encryption keys

Not applicable to Web.

Disable printing/
forwarding/copying to clipboard
Form elements
Layout regions

Use tables to align form components


instead.

Pop-up hotspots
ActiveX components, OLE, and
OCX objects

Not supported on Macintosh, UNIX, and


OS/2 platforms. Supported for display on
Windows NT and Windows 95 platforms,
but users cant save changes made to
objects.

Border controls for tables

If the top left cell of a table has a border,


the entire table is displayed with a border;
otherwise, there is no border because of
limitations with HTML.

Domino formatting features that are not supported on the Web


Avoid using the following formatting features in Web applications.
Feature

Comments

Bullet characteristics in an ordered


list (sizing and color)

The color and size of a bullet in an ordered


list cannot be manipulated on the Web.

International characters

The international characters that are


supported on the Web vary depending on
the browser version and the fonts installed
on the platform used to view and edit text
on the Web.

First-line indent or outdent in a


paragraph
Full justification paragraph
alignment
Images

Avoid this feature if editing a document


with both the Notes client and the editor
applet.
continued

D-6 Application Development with Domino Designer

Feature

Comments

Ordered lists

Avoid this feature if the list will be edited


in the Notes client and the editor applet.
Ordered lists are supported if they are
edited with the editor applet only.

Pasting text

There are limitations for pasting text in the


editor applet. See Designing Fields for
information about using the editor applet
for editing rich text fields on the Web.

Tabs
Tables

Avoid this feature if editing a document


with both the Notes client and the editor
applet.

Unordered lists

Avoid this feature if the list will be edited


in the Notes client. Unordered lists are
supported if they are edited with the
editor applet only.

Domino frame properties that are not supported on the Web


Avoid using this frame feature in a Web application.
Comments

Default target for links in frame

Targets may be set in both the Frame


Properties box and the design element
contained by that frame. The design
element in this case may be a form, page,
or view. If a target is set in the Frame
Properties box of a Web application, but
not in the design element, and the design
element is later replaced, the links in the
frame will not go to the target specified in
the Frame properties. To avoid this,
specify the same target frame in both the
Frame properties and the design element.

Features to Avoid Using in Web Applications D-7

Reference

Basics properties

Domino horizontal rule properties that are not supported on the Web
Avoid using color rules in a Web application. Gradient color is not
supported on the Web.

Domino hotspot properties that are not supported on the Web


Avoid using hotspot borders in a Web application.

Domino navigator properties that are not supported on the Web


Avoid using the following navigator features in a Web application.
Navigators

Comments

Info properties
Auto adjust panes at runtime
Objects
Polyline objects

Polyline objects display on the Web, but


clicking them has no effect.

HiLite properties
Highlight when... options for
navigator objects

Domino table properties that are not supported on the Web


Avoid using the following table features in a Web application.
Table Layout properties

Comments

Column spacing

This property is not supported in Web


applications, but may affect the Width
property of a cell, which is supported on
the Web.

Minimum height
Row spacing
Table Width

Same as window setting is ignored in a


Web application.
continued

D-8 Application Development with Domino Designer

Table Layout properties

Comments

Cell Borders properties


Color

Color settings for cell borders are not


supported on the Web

Cell Border Style

The style options, Ridge and Groove, are


not supported on the Web.

Cell Border Thickness

Border thickness settings greater than 1 are


not supported.

Table/Cell Background properties


Style

Solid is the only color option supported on


the Web. Gradients will appear as the first
color.

Table Borders properties


Border style

Determined by individual cell borders.

Border color

The table color is used.

Border effects

Width is not supported.

Thickness
Table Margins properties
Left
Right
Table wrap
Compatibility
Table Rows properties
Show only one row at a time

Switch rows every n milliseconds and


transitions are not supported.

Reference
Features to Avoid Using in Web Applications D-9

Domino text styles that are not supported on the Web


Avoid using the following text features in a Web application.
Font properties

Comments

Default fonts (Helvetica and Times


Roman in Windows)
Alignment and Tab properties
Full Justification and No Wrap
alignment styles
Interline spacing

A line spacing which is not a whole


number will be rounded up to the nearest
whole number. For example, a line spacing
of 1.5 will be rounded up to 2.

Formatting aids, such as tabs,


HTML doesnt support these formatting
indents, outdents, and extra spaces styles. Use tables to align form
components. Use the text style Pass-Thru
HTML to use HTML formatting styles.
Text effects properties
Shadow, Emboss, and Extrude text
styles

Domino view and folder properties that are not supported on the Web
Avoid using the following view and folder features in a Web application.
Views and folders

Comments

Folders

Private folders are not supported in


outlines on the Web.

Views

Private views are not supported.

Options properties
Show in View menu

Web applications do not have a View


menu. To exclude a view from the
folders navigator, use the Design Design Properties box to hide the view
from Web users, or include the view
name in parentheses for example,
(HiddenView).

On Open: Go To... options


On Refresh options
continued
D-10 Application Development with Domino Designer

Views and folders

Comments

Style properties
Unread rows
Alternate rows
Show selection margin
Beveled headings

Show selection margin is supported for


views rendered as HTML, but not for
view applets.

Advanced properties
Refresh index options
Discard index options

Views can be reindexed by a Domino


server.

Column Info properties


Show twistie when row is
expandable

Expand/collapes icons (twisties) are


always shown.

Note If you embed a view, you cannot dynamically sort a categorized


column on the Web or in a Notes client.

Features that are not supported by the Domino view applet


Avoid using the following Domino view applet features in a Web
application.
Feature

Comments

Pass-Thru HTML
View Info properties
Calendar views

Calendar views are not supported. The


HTML Calendar view will be generated
even if view applet is selected.

Options properties
On Refresh

None of the on refresh options are


supported.

Style properties

Reference

Unread rows color


Beveled headings
Lines per heading
Shrink rows to content
Row spacing
continued

Features to Avoid Using in Web Applications D-11

Feature

Comments

Advanced properties
Refresh index
Discard index
Unread marks
For ODBC Access
Active Link
Unvisited Link
Visited Link
Restrict initial index build to
designer or manager
Font properties

The available fonts are limited to a subset


of fonts supported by Java.

Title properties
Font
Advanced properties
Show values in this column as links

D-12 Application Development with Domino Designer

The available fonts are limited to a subset


of fonts supported by Java.

Appendix E
URL Commands for Web Applications
This section contains information about programming related to Web
applications, such as Domino URL commands, Perl, and CGI scripting.
For information on using formula language, LotusScript Java, and
JavaScript for programming Web sites, see the Domino Designer
Programming Guide.

Programming options for Web applications


You have a variety of options for programming a Web site. You can
directly manipulate objects such as documents or views in an application
using Domino URL commands. Adding Domino URL commands as
HTML in forms gives users shortcuts for navigating databases and
performing other tasks quickly.
You can also use the Lotus formula language of @functions and
@commands to allow users to work in a Web application. For
information about using @commands and @functions, see the Domino
Designer Programming Guide.
You can also use Java, JavaScript, Visual Basic Script, Perl script, and CGI
programs to automate tasks in a Web application.
For more information on programming a Web application, see
Programming Domino for Web Applications in the Domino Designer
Programming Guide.

Reference
E-1

Domino URL Commands


A URL command combines a specific URL with a command that
manipulates an item such as a document or view. Adding Domino URL
commands as HTML in forms gives users shortcuts for navigating
databases and performing other tasks quickly.

The Domino URL command syntax


Domino URL commands have the syntax:
http://Host/DominoObject?Action&Arguments
Where

Host = a DNS entry or an IP address

DominoObject = a Domino construct (for example, a database, view,


document, form, navigator, agent, and so on). URL commands for
accessing DominoObjects use the following syntax:
http://Host/Database/DominoObject?Action&Arguments where Database
= the database in which the DominoObject resides.

Action = the desired operation on the specified DominoObject (For


example, ?OpenDatabase, ?OpenView, ?OpenDocument,
?EditDocument, ?OpenForm, and so on).

Arguments = a qualifier of the action (for example, Count = 10


combined with the ?OpenView action limits the number of rows
displayed in a view to 10).

Syntax Guidelines

Domino URLs do not use the server name. Host identifies the server.

You can specify the maximum size and other limits of a URL
command in the Server record, in fields listed under the Internet
Protocols -HTTP tab.

Special identifiers used in Domino URL commands include:


$defaultView, $defaultForm, $searchForm, $file, $icon, $help,
$about, and $first.

DominoObject can be any of the following: for a database, the


database name or replica ID; for other objects, the DominoObjects
name, universal ID, or special identifier. For example, to specify a
view in a URL, you can use any of the following: the view name,
view universal ID, or $defaultView.

E-2 Application Development with Domino Designer

A Notes database can be specified by its file name, for example


leads.nsf, or by placing a double underscore before the replica ID
and adding an .nsf suffix to the end. For example, specify
__852562F3007ABFD6.nsf

A DominoObjects name and universal ID are identical in all replicas


of a database. One name or alias can refer to two objects for
example, two forms with the same name when one is hidden from
Notes users and one is hidden from Web users.

Action can be explicit or implicit. Examples of explicit actions include


?OpenDatabase, ?OpenView, ?OpenDocument, ?OpenForm, and
?EditDocument. Examples of implicit actions include ?Open, ?Edit,
and ?Delete. If you do not specify an action, Domino defaults to the
?Open action.

To require user authentication, append the Login argument to any


Domino URL.

Because URLs cannot contain spaces, use the + (plus sign) or the hex
value %20 to represent a space. For example:
http://www.mercury.com/discussion.nsf/By+Author
http://www.mercury.com/discussion.nsf/By%20Author

Where a name or argument contains a symbol that is not part of the


URL syntax or would conflict with URL syntax, such as plus signs
(+), slashes (\ or /), or ampersands (&), use %xx (where xx is the hex
ascii value) to represent the symbol. For example, the following URL
opens the document which has the key value Smith&Jones, Inc.
For example:
http://www.mercury.com/leads.nsf/By%20Company
/Smith%26Jones,%20Inc.?OpenDocument

Separate arguments with an ampersand (&). For example:


http://www.mercury.com/leads.nsf/By+Salesperson?OpenView&
ExpandView

http://www.mercury.com/discussion.nsf/Docs/By+Author

If you are generating your own URLs for any part of an application,
use simple aliases whenever possible to avoid URLs with
unsupported characters.

URL commands may also refer to databases with .nsf4 or .box


suffixes. They may also refer to template files (.ntf), but these
databases can only be opened in preview mode.

URL Commands for Web Applications E-3

Reference

Separate hierarchical names with a slash (/). For example, to open a


view named Docs\By Author in a database named Discussion, enter:

Selecting Web access: Use JavaScript when generating pages in


Database properties will enable you to compute URLs attached to
buttons and hotspots on the Click event. If this option is not selected,
URLs attached to buttons and hotspots will be computed when the
page is generated. Enabling this property can be useful if youre
using editable fields on a form.

URL commands for opening servers, databases, and views


The following commands access servers, databases, views, About This
Database documents, Help documents, and database icons. Databases
must be in the notes\data directory or a subdirectory of the notes\data
directory in order to be accessed by a URL command, except server
commands such as ?Login, ?Logout, and ?Redirect. You may use the
name of a database that does not exist in the server command syntax if a
database is required, as it is with Microsoft Internet Information Server.
If the database referenced in a server command does not exist, it will be
ignored. Use ?Redirect to redirect doclinks across servers. Hidden design
elements are hidden from the server too; you cant use Domino URL
commands to access documents in hidden views.
Caution If the database property Do Not Allow URL Open is set,
these URL commands are disabled.
Note The URLs shown below are for example only. They do not point to
existing Web sites.

Redirect
Syntax
http://Server/Dummy.nsf?Redirect&Name=notesserver&Id=To=encodedurl
Where:

http://Server refers to the Web server which is generating the URL.

Name=notesserver specifies a Domino server name in its common or


abbreviated form. This is optional when the By Database setting on
the server is enabled.

ID=repid indicates the replica ID of the database to be located. This is


an optional argument.

To=encodedurl specifies the rest of the URL.

Example
http://mercury.com/dummy.nsf?Redirect&Name=Mister%2FHankey&
Id=0525666D0060ABBF&To=%FAView%3FOpenView
E-4 Application Development with Domino Designer

OpenDatabase
Syntax
http://Host/__DatabaseReplicaID.nsf?OpenDatabase
Examples
http://www.mercury.com/leads.nsf?OpenDatabase
http://www.mercury.com/sales/discussion.nsf?OpenDatabase
http://www.mercury.com/__852562F3007ABFD6.nsf?OpenDatabase

OpenView
Syntax
http://Host/Database/ViewName?OpenView
http://Host/Database/ViewUniversalID?OpenView
http://Host/Database/ViewNoteID?OpenView
http://Host/Database/$defaultview?OpenView
Examples
http://www.mercury.com/leads.nsf/By+Salesperson?OpenView
http://www.mercury.com/leads.nsf/DDC087A8ACE170F8852562F3007
02264?OpenView
http://www.mercury.com/leads.nsf/$defaultview?OpenView
Optional arguments for OpenView
Append optional arguments to refine the URL. Combine any of the
following arguments for the desired result except where otherwise noted.
Collapse=n
Where n is the row number to display in collapsed format in a
hierarchical view. Do not combine this argument with the
ExpandView or CollapseView arguments.
Displays the view in collapsed format
Count=n
Where n is the number of rows to display
Expand=n
Where n is the row number to display in expanded format in a
hierarchical view. Do not combine this argument with the
ExpandView or CollapseView arguments.
URL Commands for Web Applications E-5

Reference

CollapseView

ExpandView
Displays the view in expanded format
RestrictToCategory=category
Sets the category for Show Single Category object
Where category is the category to be displayed in the view.
Start=n
Where n is the row number to start with when displaying the view.
The row number in a hierarchical view can include sub indexes (for
example, Start=3.5.1 means the view will start at the third main topic,
sub-topic 5, document 1).
StartKey=string
Where string is a key to a document in the view. The view displays at
that document.
Examples
http://www.mercury.com/leads.nsf/DDC087A8ACE170F8852562F3007
0226400000196?OpenView&CollapseView
http://www.mercury.com/leads.nsf/DDC087A8ACE170F8852562F3007
0226400000196?OpenView&ExpandView
http://www.mercury.com/leads.nsf/By+Category?OpenView&Restrict
ToCategory=pricing
http://www.mercury.com/leads.nsf/DDC087A8ACE170F8852562F3007
0226400000196?OpenView&Start=3&Count=15
http://www.mercury.com/leads.nsf/DDC087A8ACE170F8852562F3007
0226400000196?OpenView&StartKey=F

ReadViewEntries
Use this command to access view data in XML form without appearance
attributes such as fonts, list separators, date formats, HTML settings,
view templates and frame redirections.
Note This command only returns the documents a user is allowed to
access.
Syntax
http://Host/Database/ViewName?ReadViewEntries
http://Host/Database/ViewUniversalID?ReadViewEntries
http://Host/Database/ViewNoteID?ReadViewEntries
http://Host/Database/$defaultview?ReadViewEntries
E-6 Application Development with Domino Designer

Examples
http://www.mercury.com/leads.nsf/By+Salesperson?ReadViewEntries
http://www.mercury.com/leads.nsf/DDC087A8ACE170F8852562F3007
02264?ReadViewEntries
http://www.mercury.com/leads.nsf/$defaultview?ReadViewEntries
Optional arguments for ReadViewEntries
Append optional arguments to refine the URL. Combine any of the
following arguments for the desired result except where otherwise noted.
Collapse = n
Where:
n is the row number to display in collapsed format in a hierarchical
view. Do not combine this argument with the ExpandView or
CollapseView arguments.
CollapseView
Displays the view in collapsed format
Count = n
Where:
n is the number of rows to display
Expand = n
Where:
n is the row number to display in expanded format in a hierarchical
view. Do not combine this argument with the ExpandView or
CollapseView arguments.
ExpandView
Displays the view in expanded format
KeyType = text|time (

URL Commands for Web Applications E-7

Reference

Specifies the type of StartKey. The default when no argument is


specified is text. Setting the KeyType to time allows you to use a time
value as the value for StartKey which dictates from what row to
display the view and the value for UntilKey, which specifies where
to stop display of the view. If &KeyType=time is specified, then
&StartKey and &UntilKey may be ISO date time values. For
example, you might use the time value 20020101T140000,00Z to
represent 9:00AM Eastern standard Time in Coordinated Universal
Time (UTC) or Greenwich Mean Time (GMT), or you might use the

time value 20020101T090000,00-05 to represent the same date and


time in local time plus offset.
PreFormat
Causes all data types to be converted to text on the server. Text lists,
numbers, dates and lists of numbers are converted to text before
being sent. The servers locale is used for all formatting. Without this
argument, the XML output stream contains information in
structured, locale-neutral formats.
ResortAscending = column number
ResortDecending = column number
Where:
column number is the 0-based number of the column in the view you
wish to resort in ascending or descending alphanumeric order.
RestrictToCategory = category
Sets the category for the Show Single Category object
Where:
category is the category to be displayed in the view
Start = n
Where:
n is the row number to start with when displaying the view. The row
number in a hierarchical view can include subindexes (for example,
Start=3.5.1 means the view will start at the third main topic, subtopic
5, document 1).
StartKey = string
Where:
string is a key to a document in sorted view. The view displays at
that document. In cases where there is no match for the StartKey, the
next document is returned. So, for example, if the StartKey is A
and there are no documents that begin with A, StartKey returns
the first document that begins with B.
UntilKey = string
UntilKey is only valid when used with StartKey. It allows you to
display the range of view entries beginning with the document
specified by StartKey until the document specified by UntilKey. For
example, &StartKey=A&UntilKey=B would give you all the entries
that start with A. Use the &Count keyword to further limit the
number of entries returned within any given range.
E-8 Application Development with Domino Designer

Examples
http://www.mercury.com/leads.nsf/DDC087A8ACE170F8852562F3007
0226400000196?ReadViewEntries&CollapseView
http://www.mercury.com/leads.nsf/DDC087A8ACE170F8852562F3007
0226400000196?ReadViewEntries&ExpandView
http://www.mercury.com/leads.nsf/By+Category?ReadViewEntries&
PreFormat
http://www.mercury.com/leads.nsf/By+Category?ReadViewEntries&
RestrictToCategory=pricing
http://www.mercury.com/leads.nsf/DDC087A8ACE170F8852562F3007
0226400000196?ReadViewEntries&Start=3&Count=15
http://www.mercury.com/leads.nsf/DDC087A8ACE170F8852562F3007
0226400000196?ReadViewEntries&StartKey=F

OpenAbout
Use the OpenAbout command to access the About This Database
document.
Syntax
http://Host/Database/$about?OpenAbout
Example
http://www.mercury.com/leads.nsf/$about?OpenAbout

OpenHelp
Use the OpenHelp command to access the Using This Database
document.
Syntax
http://Host/Database/$help?OpenHelp

OpenIcon
Use the OpenIcon command to access the database icon.
Syntax
http://Host/Database/$icon?OpenIcon
Example
http://www.mercury.com/leads.nsf/$icon?OpenIcon
URL Commands for Web Applications E-9

Reference

Example
http://www.mercury.com/leads.nsf/$help?OpenHelp

URL commands for opening framesets


OpenFrameset
Note The URLs shown below are for example only. They do not point to
existing Web sites.
Syntax
http://Host/Database/FramesetName?OpenFrameset
http://Host/Database/FramesetUNID?OpenFrameset
http://Host/Database/FramesetNoteID?OpenFrameset
Examples
http://www.mercury.com/discussion.nsf/main?OpenFrameset
http://www.mercury.com/discussion.nsf/35AE8FBFA573336A852563D
100741784?OpenFrameset

URL commands for opening agents, forms, and navigators


The following commands open agents, forms, and navigators in a
database. Hidden design elements are hidden from the server too; you
cant use Domino URL commands to access documents in hidden forms.
Note The URLs shown below are for example only. They do not point to
existing Web sites.

OpenAgent
Syntax
http://Host/Database/AgentName?OpenAgent
Examples
http://www.mercury.com/sales/leads.nsf/Process+New+Leads?Open
Agent
Note Agents may only be referred to by name. The use of UNID is not
supported when referring to an agent.

OpenForm
Syntax
http://Host/Database/FormName?OpenForm
http://Host/Database/FormUniversalID?OpenForm

E-10 Application Development with Domino Designer

http://Host/Database/FormNoteID?OpenForm
http://Host/Database/$defaultform?OpenForm
Examples
http://www.mercury.com/products.nsf/Product?OpenForm
http://www.mercury.com/products.nsf/625E6111C597A11B852563DD0
0724CC2?OpenForm
http://www.mercury.com/products.nsf/$defaultform?OpenForm
Optional argument for OpenForm
ParentUNID = UniqueIDNumber
Where UniqueIDNumber is the document ID of the parent document,
which is used in response forms or when the form property Formulas
inherit values from selected document is selected.
Syntax
http://Host/Database/FormUniversalID?OpenForm&ParentUNID
Example
http://www.mercury.com/products.nsf/40aa91d55cle4c8285256363004
dc9e0?OpenForm&ParentUNID=6bc72a92613fd6bf852563de001f1a25

OpenNavigator
Syntax
http://Host/Database/NavigatorName?OpenNavigator
http://Host/Database/NavigatorUniversalID?OpenNavigator
http://Host/Database/NavigatorNoteID?OpenNavigator
http://Host/Database/$defaultNav?OpenNavigator
$defaultNav opens the folders pane in a database.

http://www.mercury.com/products.nsf/7B5BC17C7DC9EB7E85256207
004F8862?OpenNavigator
http://www.mercury.com/products.nsf/$defaultNav?OpenNavigator

URL Commands for Web Applications E-11

Reference

Examples
http://www.mercury.com/products.nsf/Main+Navigator?Open
Navigator

ReadForm
Use the ReadForm command to display a form without showing its
editable fields. ReadForm is useful for displaying a form as a simple Web
page.
Syntax
http://Host/Database/FormName?ReadForm
http://Host/Database/FormUniversalID?ReadForm
http://Host/Database/FormNoteID?ReadForm
http://Host/Database/$defaultform?ReadForm
Examples
http://www.mercury.com/home.nsf/Welcome?ReadForm
http://www.mercury.com/products.nsf/625E6111C597A11B852563DD0
0724CC2?ReadForm
http://www.mercury.com/products.nsf/$defaultform?ReadForm

URL commands for opening resources


The following URL commands open resources, design elements that
allow you to import, store, and deploy a variety of file types in an NSF
application. Resources are widely used with Web applications and
applications designed for use with WebDAV.
For more information on resources, see Sharing non-NSF files.

OpenImageResource
Allows you to open a graphic resource in an application.
Syntax
http://Host/Database/ImageResourceName?OpenImageResource
Where:

ImageResourceName is the name of the image file being accessed.

Examples
http://www.mercury.com/leads.nsf/TopHeader.gif?OpenImageResource

E-12 Application Development with Domino Designer

OpenFileResource
Allows you to open a file resource in an application.
Syntax
http://Host/Database/FileResourceName?OpenFileResource
Where:

FileResourceName is the name of the file being accessed.

Examples
http://www.mercury.com/leads.nsf/JSLibrary.js?OpenFileResource

URL commands for creating, deleting, editing, opening, and saving


documents
The following commands manipulate documents in a database. Hidden
design elements are hidden from the server too; you cant use Domino
URL commands to access documents in hidden views.
Note The URLs shown below are for example only. They do not point to
existing Web sites.

CreateDocument
The CreateDocument command is used as the POST action of an HTML
form. When the user submits a form, Domino obtains the data entered in
the form and creates a document.
Syntax
http://Host/Database/Form?CreateDocument
http://Host/Database/FormName?CreateDocument
Where:
FormName is the name of the form being accessed.

http://www.mercury.com/products.nsf/basketballs?CreateDocument

URL Commands for Web Applications E-13

Reference

Examples
http://www.mercury.com/products.nsf/b9815a87b36a85d9852563df004
a9533?CreateDocument

DeleteDocument
Syntax
http://Host/Database/View/Document?DeleteDocument
Example
http://www.mercury.com/products.nsf/By+Part+Number/PC156?
DeleteDocument

EditDocument
Syntax
http://Host/Database/View/Document?EditDocument
Example
http://www.mercury.com/products.nsf/By+Part+Number/PC156?Edit
Document
Note Rich text fields containing hidden text will be visible to Web users
with Editor access to documents.

OpenDocument
Syntax
http://Host/Database/View/Document?OpenDocument
Where:
Document is any of the following:

DocumentKey the contents of the first sorted column in the


specified view.

DocumentUniversalID

DocumentNoteID

$first
The first document in the view.
Examples
http://www.mercury.com/products.nsf/By+Part+Number/PC156?
OpenDocument
http://www.mercury.com/leads.nsf/By+Rep/35AE8FBFA573336A8525
63D100741784?OpenDocument

E-14 Application Development with Domino Designer

SaveDocument
The SaveDocument command is used as the POST action of a document
being edited. Domino updates the document with the new data entered
in the form.
Syntax
http://Host/Database/View/Document?SaveDocument
Example
http://www.mercury.com/products.nsf/a0cefa69d38ad9ed8525631b006
582d0/4c95c7c6700160e2852563df0078cfeb?SaveDocument

URL commands for opening documents by key


The following commands allow you to open a document by using the
key value of the first sorted column of a view, such as a document name,
or to generate a URL to link to a document by key. Hidden design
elements are hidden from the server too; you cant use Domino URL
commands to access documents in hidden views, unless youve hidden
the view by surrounding its name in parentheses, rather than using the
Hide tab in the Properties box.
Note The URLs shown below are for example only. They do not point to
existing Web sites.

Using Domino URLs to access a document


To open a document by key, create a sorted view with the sort on the first
key column. Then use a URL to open the document.
Syntax
http://Host/Database/View/DocumentName?OpenDocument
Where:
View is the name of the view. To access a document regardless of the
view, specify the document by its universal ID and substitute a zero
(0) for the view name.

DocumentName is the string, or key, that appears in the first sorted or


categorized column of the view.

Use this syntax to open, edit, or delete documents and to open attached
files. Domino returns the first document in the view whose column key
exactly matches the DocumentName.

URL Commands for Web Applications E-15

Reference

There may be more than one matching document; Domino always


returns the first match. The key must match completely for Domino to
return the document. However, the match is not case sensitive or accent
sensitive.
Note that View can be a UNID, or view name. In addition, the implicit
form of any of these commands will work when appropriate. For
example, you can omit the OpenDocument argument in a URL command
and the document will still open because the command is automatically
interpreted as OpenDocument. (EditDocument and DeleteDocument
must be explicit commands.)
Examples
http://www.mercury.com/register.nsf/Registered+Users/Jay+Street?
OpenDocument
http://www.mercury.com/register.nsf/0/466c5172561e1c5c852566c200
5f6bbb?OpenDocument

Using @commands to link to a document


For information about using @commands in Web applications, see
Features to Avoid Using in Web Applications.

Using Domino URLs to access attachments


When Domino saves a file attachment with a document, it generates a
URL so it can retrieve the file later. An attachment generates a URL
whose last component is the original file name. For example:
http://domino.lotus.com/domdown.nsf/ViewUNID/DocumentUNID/$
File/DOMINO.EXE

ViewUNID can indicate a ViewID or a ViewName. DocumentUNID can be


a DocumentKey. This allows you to create URL links to attachments by
supplying a view name and document key.
By default, the browser uses the name specified in the URL to save the
file.

E-16 Application Development with Domino Designer

URL commands for opening pages


The following command will open a Web page using its name or UNID.
Note The URLs shown below are for example only. They do not point to
existing Web sites.

OpenPage
Syntax
http://Host/Database/PageName?OpenPage
http://Host/Database/PageUNID?OpenPage
http://Host/Database/PageNoteID?OpenPage
Examples
http://www.mercury.com/discussion.nsf/products?OpenPage
http://www.mercury.com/discussion.nsf/35AE8FBFA573336A852563D
100741784?OpenPage

Optional arguments for OpenPage and OpenDocument


The following arguments manipulate outline controls on pages and
documents. The arguments for OpenPage and OpenDocument
commands use the same syntax regardless of the command.
CollapseOutline=[n]
Where n is the triangle at the top level of the outline. It is possible to
collapse triangles in hierarchical order. For example,
&CollapseOutline=2.1.3 will collapse the second triangle at the top
level of the outline, the first triangle at the second level, and the third
triangle at the third level.
Syntax
http://Host/Database/PageName?OpenPage&CollapseOutline=n

http://Host/Database/PageNoteID?OpenPage&CollapseOutline=n
Examples
http://www.mercury.com/sales.nsf/products?OpenPage&Collapse
Outline=1
http://www.mercury.com/sales.nsf/products?OpenDocument&
CollapseOutline=1

URL Commands for Web Applications E-17

Reference

http://Host/Database/PageUNID?OpenPage&CollapseOutline=n

http://www.mercury.com/sales.nsf/products?OpenPage&Collapse
Outline=1.2.3
http://www.mercury.com/sales.nsf/products?OpenDocument&
CollapseOutline=1.2.3
ExpandOutline=[n]
Where n = the triangle at the first level of the outline. It is possible to
expand a triangle in hierarchical order. For example,
&ExpandOutline=2.1.3 will expand the second triangle at the top
level of the outline, the first triangle at the second level, and the third
triangle at the third level.
Syntax
http://Host/Database/PageName?OpenPage&ExpandOutline=n
http://Host/Database/PageUNID?OpenPage&ExpandOutline=n
http://Host/Database/PageNoteID?OpenPage&ExpandOutline=n
Examples
These URLs do not point to existing Web sites. They are for example
only.
http://www.mercury.com/sales.nsf/products?OpenPage&Expand
Outline=5
http://www.mercury.com/sales.nsf/products?OpenDocument&Expand
Outline=5
http://www.mercury.com/sales.nsf/35AE8FBFA573336A852563D10074
1784?OpenPage&ExpandOutline=5.1.2
http://www.mercury.com/sales.nsf/35AE8FBFA573336A852563D10074
1784?OpenDocument&ExpandOutline=5.1.2
Arguments
StartOutline=[n]
Where n is the triangle at the top level of the outline. It is possible to
expand a triangle in hierarchical order. For example,
&StartOutline=2.1.3 will start the display with the third triangle at
the third level of the outline.
Syntax
http://Host/Database/PageName?OpenPage&StartOutline=n
http://Host/Database/PageUNID?OpenPage&StartOutline=n
http://Host/Database/PageNoteID?OpenPage&StartOutline=n
E-18 Application Development with Domino Designer

Examples
http://www.mercury.com/sales.nsf/products?OpenPage&StartOutline=1
http://www.mercury.com/sales.nsf/products?OpenDocument&Start
Outline=1
http://www.mercury.com/sales.nsf/35AE8FBFA573336A852563D10074
1784?OpenPage&StartOutline=5.1.2
http://www.mercury.com/sales.nsf/35AE8FBFA573336A852563D10074
1784?OpenDocument&StartOutline=5.1.2

URL commands for opening attachments, image files, and OLE objects
The following commands open files and objects within a document.
Note The URLs shown below are for example only. They do not point to
existing Web sites.

OpenElement
Use the ?OpenElement command to access attachments, image files, and
OLE objects.
Using OpenElement with attachments
Syntax
http://Host/Database/View/Document/$File/Filename?OpenElement
Example
http://www.mercury.com/lproducts.nsf/By+Part+Number/SN156/$
File/spec.txt?OpenElement
Note If more than one attached file has the same name, the URL
includes both the internal file name as well as the external name. Since
the internal file name is not easily determined, make sure all attached
files have unique names.

http://Host/Database/View/Document/$File/InternalFileName/
Filename?OpenElement
Using OpenElement with image files
Syntax
http://Host/Database/View/Document/FieldName/FieldOffset?Open
Element
URL Commands for Web Applications E-19

Reference

Because some browsers require that the URL end with the attached file
name, Domino treats all file attachment OpenElement commands as
implicit commands. For example:

http://Host/Database/View/Document/FieldName/FieldOffset?Open
Element&FieldElemFormat=ImageFormat
Optional argument for OpenElement
FieldElemFormat = ImageFormat
Where ImageFormat is either .GIF or .JPEG. If you do not specify
FieldElemFormat, Domino assumes the image file format is .gif.
Using OpenElement with OLE Objects
Syntax
http://Host/Database/View/Document/FieldName/FieldOffset/$OLEOBJINFO
/FieldOffset/obj.ods?OpenElement
Note The current URL syntax for referencing images and objects in
Notes documents specifically the FieldOffset makes it impractical
to create these URLs manually. As an alternative, you may paste the
actual bitmap or object in place of the reference, create URL references to
files stored in the file system, or attach the files to the documents.

URL commands for searching for text


Search-related URLs are available for performing view,
multiple-database, and domain searches. Typically you define a URL
that displays an input form either a customized search form or the
default search form to let users define their own searches, but you
may also define a URL that performs text searches without user input.
Both input and results forms may be customized.
Note The URLs shown below are for example only. They do not point to
existing Web sites.

SearchDomain
Use SearchDomain URLs for text searches across a domain. The search
input form is opened with the OpenForm command by name or
universal ID. For search results, the results template is specified as part
of the URL. If no template is found, then the default template form,
$$SearchDomainTemplate, is substituted. If $$SearchDomainTemplate is
not found, an error is returned. If no results are returned, the value of the
$$ViewBody field remains the same.

E-20 Application Development with Domino Designer

Syntax
http://Host/Database/[templateForm]?SearchDomain[ArgumentList]
Where:

templateForm is an optional argument that calls the search results


form.

ArgumentList is a list of optional arguments.

Example
http://www.mercury.com/mersrch.nsf/MercuryResults?SearchDomain

Redirect
The server will provide a direct or redirect URL command as needed for
links displayed on the results form if the capability has been enabled. The
domain URL locates information on the server where the links are
generated. The redirect command locates the correct server and redirects
a link to that server by constructing the appropriate URL. The redirect
command can improve performance by resolving individual links when
they are selected instead of resolving all of the links returned at once.
See Domino 5 Administration Help for information about enabling redirect
on a server.

SearchSite
Use SearchSite URLs for text searches in multiple databases. Because the
URL requires the name of a search site database, be sure to create one
before using a SearchSite URL.
Syntax
http://Host/Database/[$SearchForm]?SearchSite[ArgumentList]
Where:
$SearchForm and ArgumentList are optional arguments.

SearchView
Use SearchView URLs to limit a search to documents displayed in one
database view.
This URL is useful for views that display all documents (so you can have
a full-database search) or for views in which you can predict what users
need to see, such as all documents whose status is Completed.

URL Commands for Web Applications E-21

Reference

Example
http://www.mercury.com/mercsrch.nsf/$SearchForm?SearchSite

Syntax
http://Host/Database/View/[$SearchForm]?SearchView[ArgumentList]
Where:
$SearchForm and ArgumentList are optional arguments. The special
identifier $SearchForm indicates that Domino will present a search view
form for search input. If this identifier is provided, the ArgumentList is
ignored. If this identifier is absent, a default form will be generated
dynamically based on the contents of the search.htm file located on the
server. The default form generated by the server does not support paged
results.
Example
http://www.mercury.com/products.nsf/By+Product+Number/$Search
Form?SearchView
Optional arguments for SearchSite, SearchView, and SearchDomain
$SearchForm
The special identifier $SearchForm indicates that Domino will present
a search site form for search input. If this identifier is provided,
ArgumentList is ignored.
ArgumentList
The ArgumentList must contain the Query argument; in addition, it
may contain any or all of the other arguments in any order.
Query=string
Where string is the search string.
Count=[n]
Where n is the number of results to display on each page until the
SearchMax has been reached. For example Count=10 will display 10
results per page.
Scope=[1,2,3]
The scope of the search. Where 1 = Notes databases only, 2 = file
system only, 0 = both. The default value is 0. This argument should
only be used with the SearchDomain command.
SearchEntry=formName
Where formName is the name of the form to use for the results of a
domain search. The default argument is ResultEntry, which
supports all of the predefined results fields specified in the
ArgumentList. This argument is valid for SearchDomain only and
should not be used for SearchSite or SearchView.
E-22 Application Development with Domino Designer

SearchFuzzy=[TRUE,FALSE]
Indicate TRUE for fuzzy search. The default is FALSE.
SearchOrder=[1,2,3,4]
Indicate 1 to Sort by relevance, 2 to Sort by date ascending, 3 to
Sort by date descending. The default is 1. SearchView also
supports a SearchOrder value of 4 to Keep current order, which
sorts the resulting set of documents in the order in which they
appear in the view.
SearchMax=[n]
Where n is the maximum number of entries returned. The default
value is determined by the server.
SearchWV=[TRUE, FALSE]
Where TRUE = include word variants in the search. The default
value is FALSE.
Start=[n]
Where n is the number corresponding to the document that appears
first in your list of results. For example, Start=10 begins your list of
results with the 10th document found in the search. Start=0 means
that paged results will not be returned.
Examples
http://www.mercury.com/mercsrch.nsf/?SearchSite&Query=product+
info+requests&SearchOrder=2&SearchMax=30&SearchWV=TRUE&
SearchEntry=myResultsForm
http://www.mercury.com/products.nsf/By+Product+Number/?Search
View&Query=PC156&SearchOrder=3&SearchMax=1&SearchFuzzy=
TRUE&SearchWV=FALSE

URL search syntax and customized results

Start and Count parameters


Start and Count parameters allow you to display search results
page-by-page and may be included as arguments in the SearchView or
SearchSite URL commands or as items in the search results form. The
Start parameter is the entry that appears first when your results are
displayed. The Count parameter is the number of results that will display
on each screen. For example, if Start=5 and Count=10, the search results
would display beginning with the 5th entry and would display up to 10
URL Commands for Web Applications E-23

Reference

The following parameters for SearchView and SearchSite URL


commands allow you to display search results page-by-page and to
provide buttons or hotspots to navigate between pages.

entries per screen until the maximum number of entries has been
displayed. These parameters work with customized forms only.
Syntax
http://Host/Database/ViewName/[$SearchForm]?SearchView[ArgumentList]
http://Host/Database/ViewUNID/[$SearchForm]?SearchView[ArgumentList]
http://Host/Database/ViewNoteID/[$SearchForm]?SearchView[ArgumentList]
Where: ArgumentList includes the Query argument and any or all of the
other arguments including the Start and Count parameters. For example:
?SearchView&Query=String&Start=n&Count=n&SearchOrder=n&Search
WV=TRUE or FALSE&SearchFuzzy=TRUE or FALSE&SearchMax=n.
Examples
http://www.mercury.com/products.nsf/ProductView?SearchView&
Query=bicycles&Start=21&Count=20&SearchOrder=1&SearchWV=
TRUE&SearchFuzzy=FALSE&SearchMax=50
http://www.mercury.com/products.nsf/F6025FD7E72456F98525654000
5839D3?SearchView&Query=bicycles&Start=21&Count=20&Search
Order=1&SearchWV=TRUE&SearchFuzzy=FALSE&SearchMax=50

Using Next and Previous buttons or hotspots with Start and Count
parameters
If you are using Start and Count parameters you can include Next and
Previous buttons or hotspots to enable users to navigate between pages
of results. Both parameters must be used if you are using navigational
buttons.
1. Open your customized results form and place buttons or hotspots
labeled Next and Previous where you want them to appear on the
form.
2. For the button or hotpsot labeled Next, write a formula that will
advance the user forward one page.
3. For the button or hotspot labeled Previous, write a formula that will
take the user back one page.
Example of a formula for a Next button or hotspot
@If(Hits >= Count; @URLOpen(/ + @Subset(@DbName; -1) + / +
SearchView + ?SearchView&Query= + @ReplaceSubstring(Query; ;
+) + &Start= + @Text(Start+Hits) + &Count= + @Text(Count) +
&SearchOrder=+@Text(SearchOrder) +&SearchWV=+@If(Search
Vw = 0;FALSE;TRUE)+&SearchThesaurus=+@If(SearchThesaurus
= 0;FALSE;TRUE) + &SearchMax= + @Text(SearchMax)); )
E-24 Application Development with Domino Designer

Example of a formula for a Previous button or hotspot


@If(Start > Count; @URLOpen(/ + @Subset(@DbName; -1) + /
+SearchView + ?SearchView&Query= + @ReplaceSubstring(Query;
; +) + &Start= + @Text(Start-Count) + &Count= + @Text(Count) +
&SearchOrder=+@Text(SearchOrder) +&SearchWV=+@If(SearchV
w = 0;FALSE;TRUE)+&SearchThesaurus=+@If(SearchThesaurus =
0;FALSE;TRUE) + &SearchMax= + @Text(SearchMax)); )
Tip To avoid syntax errors, use @ReplaceSubstring(Query; +) to
replace all of the spaces in your query with plus signs (+).

URL commands for required authentication


Login argument
To force user authentication regardless of the database access control list,
append the Login argument to any Domino URL. This ensures that
anonymous Web users who werent initially prompted for a name and
password when they entered the site are required to supply a name and
password to complete tasks that require user identity.
Note The URLs shown below are for example only. They do not point to
existing Web sites.
Syntax
http://Host?OpenServer&login
http://Host/DatabaseDirectory/DatabaseFileName?OpenDatabase&login
Examples
http://www.mercury.com?OpenServer&login
http://www.mercury.com/sales/leads.nsf?OpenDatabase&login

The following commands automate the request and receipt of Secure


Sockets Layer (SSL) certificates stored in a database.
Note The URLs shown below are for example only. They do not point to
existing Web sites.

URL Commands for Web Applications E-25

Reference

URL commands for processing SSL certificates

OpenForm with SpecialAction argument


Syntax
http://Host/Database/FormName?OpenForm&SpecialAction=special
ActionField
Where:
specialActionField is the name of an editable text field on the form whose
value contains a predefined command. To use the field with SSL
certificates, use one of the following certificate request commands:
SubmitCert
ServerRequest
ServerPickup
For more information about the OpenForm command, see URL
commands for opening agents, forms, and navigators earlier in this
chapter.
Examples
http://www.mercury.com/certs.nsf/UserCertificateRequest?OpenForm
&SpecialAction=SubmitCert
http://www.mercury.com/certs.nsf/ServerCertificateRequest?Open
Form&SpecialAction=ServerRequest
http://www.mercury.com/certs.nsf/Certificate?OpenForm&Special
Action=ServerPickup

Creating an SSL User Certificate


The SubmitCert command creates a User Certificate document in the
specified database, using the form specified in the TranslateForm
argument.
Syntax
http://Host/Database/ResultForm?RequestCert&Command=SubmitCert
&TranslateForm=TranslationFormName
Where:

ResultForm is a form in the specified database that displays


information about the processed request.

TranslationFormName represents a form in the database that contains


fields to hold certificate information.

E-26 Application Development with Domino Designer

Example
http://www.mercury.com/certs.nsf/CertificateProcessed?RequestCert&
Command=SubmitCert&TranslateForm=Certificate
Optional and required fields
The SubmitCert command requires a translation form with a field named
Certificate. Domino saves information about the certificate subject and
issuer in the document if the form contains fields with these names:

CommonName

Org

OrgUnit

Locality

State

Country

IssuerCommonName

IssuerOrg

IssuerOrgUnit

IssuerLocality

IssuerState

IssuerCountry

Creating an SSL Server Certificate Request


The ServerRequest command creates a Server Certificate Request
document in the specified database, using the form specified in the
TranslateForm argument.
Syntax
http://Host/Database/MessageForm?RequestCert&Command=Server
Request&TranslateForm=TranslationFormName
Where:
ResultForm is a form in the specified database that displays
information about the processed request in the users browser after a
successful submission.

TranslationFormName represents a form in the database that contains


fields to hold certificate information.

Example
http://www.mercury.com/certs.nsf/CertificateProcessed?RequestCert&
Command=ServerRequest&TranslateForm=Certificate
URL Commands for Web Applications E-27

Reference

Optional and required fields


The ServerRequest command requires a translation form with a field
named Certificate. Domino saves information about the server request in
the document if the form contains fields with these names:

CommonName

Org

OrgUnit

Locality

State

Country

URL commands for setting user preferences in Web applications


In a Notes application, many settings such as how a date or time value
is formatted or defaut language preferences are set through a users
operating system. Users can modify the settings according to their
preferences. In a Web application, the formats are determined by the
settings that are installed with the browser. The URL command
OpenPreferences allows users of browser applications to select display
formats that apply to applications on one server or all the servers in a
domain.
The OpenPreferences command works by setting a cookie for a users
preferences. The server retrieves the information from the users cookie
and responds with the specified formats and preferences for that user.
When designing an application, you might create a button that launches
this URL command so that browser users can set their preferences
without having to enter the command themselves.
Note The URLs shown below are for example only. They do not point to
existing Web sites.

OpenPreferences
Syntax
http://Host/$Preferences.nsf?OpenPreferences[&Arguments]
OpenPreference with no arguments displays a frameset displaying a
menu of choices on the left, and a panel for selecting time zone
preferences on the right. OpenPreferences accepts arguments for
manipulating what preference page displays.

E-28 Application Development with Domino Designer

The Host argument can apply to the server named or to all of the servers
in the domain of the specified server. The scope of OpenPreference is
determined by the value in the Web User Preferences field on the Web
Site Template for the specified server. If the Web User Preferences field is
set to Multi-server, the settings for OpenPreference apply to all of the
servers in the domain. If the field value is Single server, the preferences
apply only to the specified server. The server administrator can also set
the field to Disable, which causes the server to ignore any cookies set for
OpenPreference. Speak to your system administrator about setting the
correct scope for the command.
Note Settings a user specifies for OpenPreferences will not override
custom settings you specify for a field or view column.
Examples
http://www.mercury.com/$Preferences.nsf?OpenPreferences

Optional arguments for OpenPreferences


The following arguments open specific pages of the OpenPreferences
user interface instead of loading the default frameset.
&PreferenceType=Menu
Displays only the Menu page, with links for opening the Time Zone
and Regional preference pages.
&PreferenceType=Time Zone
Displays only the Time Zone selection page. The defaults dispayed
are the server settings. Users can either select custom settings and
apply them by clicking the Custom button, or click the Server button
to apply the server settings as their preferences.

Reference
URL Commands for Web Applications E-29

&PreferenceType=Regional
Displays only the Regional preference page. Regional settings apply
to Date/Time and Number/Currency settings. When the page first
opens, the default for the Preferred Locale field is derived from the
Accept Language setting for the users browser. The other
configuration items are based on the browser defaults that
correspond with the language setting. A user can specify a new value
for Preferred Locale and click the Load default options for this
locale button to apply all of the formats that correspond with the
specified locale. A user can set new preferences or revert to the
defaults.

Managing multilingual input in a single database


The charset=[MIME charset name] argument can be added to any URL
command to return the requested form or page in the specified character
set, regardless of the preferred language setting in the browser. The
server does not generate the charset=[MIME charset name] argument
automatically. It must be built into the application.

E-30 Application Development with Domino Designer

Syntax
http://Host/Database/FormName?OpenForm&charset=[MIME charset
name]
Where:

FormName is the name of the form to be opened.

[MIME charset name] is the name of the character set that will be used
for the returned target form.

Usage
The charset=[MIME charset name] argument will override the
$$HTMLContentLang field in a form. For information on using the
$$HTMLContentLang field to enable multiple character sets to be used
for input to a database see the topic Managing multilingual input in a
single database in Lotus Notes, Domino and Designer Release Notes
Release 5.0.2.
Example
A company has sales staff in the United States, Japan, and Russia.
Members of each staff are expected to submit performance summaries
monthly to a single database. The sales personnel can use English,
Japanese, and Russian character sets in the same database if the URL
command that returns the summary form uses the charset=[MIME charset
name] argument. When the server receives the command, it returns the
target form in the specified character set. A URL command that would
return the target form in the Japanese character set is shown below.
http://www.mercury.com/sales.nsf/Summary?OpenForm&charset=
Shift_JIS

Perl Scripts

URL Commands for Web Applications E-31

Reference

Domino supports programs written in Perl. Perl programs have file


names that end with .pl. Place Perl programs in the cgi-bin directory.
By default, Domino looks in directories that are included in the servers
PATH statement for a Perl interpreter named perl.exe. To override this
default, define an environment variable (PERLBIN) that gives the name
or absolute path of the perl interpreter for example,
c:\perl5\bin\perl.exe.

Common Gateway Interface (CGI) programs


CGI is a standard for connecting external applications with HTTP
servers. CGI programs allow you to do some background processing
on a Web page. To run CGI programs, place them in the default cgi-bin
directory or in a directory that has execute access. Because Domino does
not maintain access control at the file system level, scripts must include
access control measures to prevent unauthorized use.

Running a CGI program


To run a CGI program, include the URL to the CGI program file and
enclose it in brackets. Note that you can pass arguments for example,
values from fields in the form to the CGI program. For example:
[http://www.lotus.com/cgi-bin/register.exe? + Email + &&& +
LastName + &&&]
A CGI program can run immediately after the user submits a document.
You might specify when you want to use the Notes API to further
process the data. To run a CGI program this way, add a field named
$$Return, and use HTML instructions as the field value.

CGI variables
When a Web user saves a document or opens an existing document, the
Domino Web server uses CGI variables to collect information about the
user, including the users name, the browser, and the users Internet
Protocol (IP) address.
To capture this information in a Web application:

Create a field with the name of a CGI variable.

Create an agent whose script contains a CGI variable as a


DocumentContext property.

E-32 Application Development with Domino Designer

Creating a field with the name of the CGI variable


When a field is named after a CGI variable, Domino copies the field
value from the CGI environment and places it in the field. This feature is
useful in computed-for-display fields and for determining hide when
conditions.
1. Create a field and give it the name of a CGI variable.
For example, to obtain the IP address of the user submitting the
form, add a field named Remote_Addr to the form.
2. Select the hide-when field properties Previewed for Editing and
Opened for editing so users cannot enter information in it.
Example: Using the DocumentContext property in Web agent
scripts
This script uses the Print statement and the CGI variable remote_user to
display User = and the Web users name. The script sets the
DocumentContext before executing the rest of the script. The variable
assumes a text list.
Dim session As New NotesSession
Dim doc As NotesDocument
Set doc = session.DocumentContext
Print "User = " + doc.remote_user(0)

Note HTML generated by a Web agent does not include the


<TITLE></TITLE> tags.

Table of CGI variable names


Domino captures the following CGI variables through a field or a
LotusScript agent. You can also capture any CGI variable preceded by
HTTP or HTTPS. For example, cookies are sent to the server by the
browser as HTTP_Cookie.

Reference
URL Commands for Web Applications E-33

For more information about CGI environment variables, see:


http://hoohoo.ncsa.uiuc.edu/cgi/env.html
Field name

Returns

Auth_Type

If the server supports user authentication


and the script is protected, this is the
protocol-specific authentication method
used to validate the user.

Content_Length

The length of the content, as given by the


client.

Content_Type

For queries that have attached information,


such as HTTP POST and PUT, this is the
content type of the data.

Gateway_Interface

The version of the CGI spec with which the


server complies.

HTTP_Accept

The MIME types that the client accepts, as


specified by HTTP headers.

HTTP_Accept_language

The languages that the client accepts, as


specified by HTTP headers.

HTTP_Referer

The URL of the page the user used to get


here.

HTTPS

Indicates if SSL mode is enabled for the


server.

HTTPS_CLIENT_CERT_
COMMON_NAME

The common name on the x.509 certificate.

HTTPS_CLIENT_CERT_ISSUER_ The issuer of the x.509 certificate.


COMMON_NAME
HTTPS_KEYSIZE

The session key during an SSL session. For


example, 40-bit, 128-bit.

HTTP_User_Agent

The browser that the client is using to send


the request.

Path_Info

The extra path information (from the


servers root HMTL directory), as given by
the client. In other words, scripts can be
accessed by their virtual path name,
followed by extra information that is sent as
PATH_INFO.
continued

E-34 Application Development with Domino Designer

Returns

Path_Info_Decoded

Returns the same as Path_Info, but decodes


the string. For example, if a URL references
a view name that contains characters that
are not allowed a URL, the name is encoded.
This CGI variable decodes the string.
Path_Info_Decoded is available to Domino
applications only.

Path_Translated

The server provides a translated version of


PATH_INFO, which takes the path and does
any virtual-to-physical mapping to it.

Query_String

The information that follows the question


mark (?) in the URL that referenced this
script.
If your Domino server is configured to allow
search engines to search your Web site
Domino will generate URLs with an
exclamation mark (!) instead of a question
mark (?). If this is the case the Query_String
CGI variable includes the information that
follows the exclamation mark (!). Domino
always recognizes both the question mark
(?) and the exclamation mark (!), but only
generates URLs with the exclamation mark
(!) if your site is accessible to Web search
engines. Generating URLs with an
exclamation mark (!) makes them more
searchable.

Query_String_Decoded

Returns the same as Query_String, but


decodes the string. For example, if a URL
references a view name that contains
characters that are not allowed in a URL, the
name is encoded. This CGI variable decodes
that string. Path_Info_Decoded is available
to Domino applications only.

Remote_Addr

The IP address of the remote host making


the request.

Remote_Host

The name of the host making the request.

Remote_Ident

This variable will be set to the remote user


name retrieved from the server. Use this
variable only for logging.

Remote_User

Authentication method that returns the


authenticated user name.
continued

URL Commands for Web Applications E-35

Reference

Field name

Field name

Returns

Request_Content

Supported only for agents. Contains the data


sent with an HTTP POST request. The data
is usually URLencoded, consisting of
name=value pairs concatenated by
ampersands. For example,
FirstName=John&LastName=Doe

Request_Method

The method used to make the request. For


HTTP, this is GET, HEAD, POST, and
so on.

Script_Name

A virtual path to the script being executed,


used for self-referencing URLs.

Server_Name

The servers host name, DNS alias, or IP


address as it would appear in
self-referencing URLs.

Server_Protocol

The name and revision of the information


protocol accompanying this request.

Server_Port

The port to which the request was sent.

Server_Software

The name and version of the information


server software running the CGI program.

Server_URL_Gateway_Interface

The version of the CGI spec with which the


server complies.

E-36 Application Development with Domino Designer

Appendix F
Accessibility and Keyboard Shortcuts
This appendix provides information regarding designing applications for
maximum accessibility for users with physical challenges.

Accessibility and keyboard shortcuts


Domino Designer is accessible to people with physical challenges. Those
with restricted mobility or limited vision can use the following assistive
aids:

Extended accelerator keys let you navigate through the Bookmark


bar and window tabs using your keyboard. Note that you must
enable extended accelerator keys before you can use them.

Keyboard shortcuts let you navigate through and perform a variety


of tasks in Designer.

For more information about accessibility, see:

Lotus Notes Help or go to the Documentation Library of the Lotus


Developer Domain at http://www.lotus.com/ldd/doc to download
or view Lotus Notes 6 Help.

The IBM Special Needs Web site at http://www.ibm.com/able.

Enabling and using extended accelerator keys


Before you can use extended accelerator keys to navigate through the
Bookmark bar or the window tabs, you must enable the keys.

Reference

To enable extended accelerators for the Bookmark bar


1. Choose File - Preferences - User Preferences.
2. Select Basics.
3. In the Additional Options box, select Show extended accelerators.

F-1

To use extended accelerators in the Bookmark bar


Once you enable extended accelerators, press ALT+B to display them on
the Bookmark bar.
You can use the accelerator keys as follows:

To navigate, use the UP and DOWN ARROWS, and HOME, END,


PAGE UP, and PAGE DOWN.

To select a Bookmark icon, press ENTER.

To remove focus on a Bookmark icon, press ESC.

To enable keyboard navigation of window tabs


1. Choose File - Preferences - User Preferences.
2. Select Basics.
3. In the Additional Options box, select Show extended accelerators.

To use extended accelerators in window tabs


To use an accelerator, press ALT+W, followed by the number that
appears next to the window tab.

Keyboard shortcuts
The keyboard shortcuts in this section are based on U.S. standard
keyboards. If you are using a screen reader, you may want to maximize
your window so the tables of shortcuts are completely expanded and
accessible.
Click these links to see shortcuts for:

Changing text and paragraph properties in a document

Databases

Designer interface and windows

Dialog boxes

Moving the cursor in a document

Navigating through views, folders, and panes

Properties boxes

Reading documents

Selecting and moving text in a document

Working in views

F-2 Application Development with Domino Designer

Keyboard shortcuts for the Designer interface and windows


You can use the following keyboard shortcuts to navigate through
Designer.
Press

To do this

ALT+B, then number (extended accelerators


in User Preferences must be enabled)

Open bookmark on Bookmark


bar

ALT+F5

Restore Designer to default


minimized size

ALT+F7, then ARROW KEYS, then ENTER

Move position of active window

ALT+F8, then ARROW KEYS, then ENTER

Change size of active window

ALT+F9

Minimize active window

ALT+F10

Maximize active windows

ALT+underlined letter for menu item

Access menu item

ALT+underlined letter for menu item, or


ARROW KEYS

Move to next menu item

ALT+W, then number (extended accelerators Open window tab on task bar
in User Preferences must be enabled)
Stop operation in progress

CTRL+L, type URL, then ENTER

Go to a Web page

CTRL+Q or ALT+F4

Exit Designer

CTRL+TAB

Move to next window tab

ESC or CTRL+W

Close active window

F1

Get Help on current feature

F5

Lock User ID

F6

Move to next pane or frame

F10 or ALT

Access menu bar

SHIFT+ALT+S

Open search menu

SHIFT+CTRL+TAB

Move to previous window tab

SHIFT+CTRL, then UP ARROW or DOWN


ARROW

Select multiple bookmarks or


Bookmark folders

SHIFT+DOWN ARROW

Select additional items below an


already selected item

SHIFT+F6

Move to previous pane or frame

SHIFT+F10

Access Windows context menus

SHIFT+UP ARROW

Select additional items above an


already selected item

Accessibility and Keyboard Shortcuts F-3

Reference

CTRL+BREAK

Keyboard shortcuts for databases


You can use the following keyboard shortcuts for getting to and
navigating through a database.
Note In any form, page, or document there could be several embedded
elements (the date picker in the Calendar is an example of an embedded
element). You can navigate to an embedded element, give focus within
the embedded element, and then remove the focus to continue
navigating through the form, page, or document. When focus is in an
embedded element, the thin black frame around it disappears. When
focus is removed from an embedded element, the thin black frame
reappears.
Press

To do this

ARROW KEYS

Move through embedded element

CTRL+N

Create new database

CTRL+O

Open database

ENTER

Select item in embedded outline

ESC

Exit embedded element

ESC or CTRL+W

Close current database

F9

Refresh current document (in Edit


mode), view or workspace

MINUS (-) key

Collapse folder in embedded outline

PAGE DOWN

Move to bottom of active page

PAGE UP

Move to top of active page

PLUS (+) key

Expand folder in embedded outline

SHIFT+CTRL+F9

Update all views in current database

SHIFT+F9

Rebuild current document, view,


workspace (must have Manager access)

SPACEBAR

Give focus to embedded element

UP and DOWN ARROW

Move through embedded outline

F-4 Application Development with Domino Designer

Keyboard shortcuts for dialog boxes


Standard dialog boxes appear when you perform many tasks in
Designer. For example, the Open Database dialog box appears when you
choose File - Database - Open from the menu.
Press

To do this

DOWN ARROW or RIGHT ARROW

Select next item in a list or set of options


in dialog box

ESC

Cancel changes and close dialog box

F1

Get Help on current dialog box

SHIFT+TAB

Move to previous option or set of


options in dialog box

SPACEBAR

Access default or selected item(s) in


dialog box

TAB

Move to next option or set of options in


dialog box

UP ARROW or LEFT ARROW

Select previous item in a list or set of


options in dialog box

Keyboard shortcuts for properties boxes


In Designer, you can learn about and change the characteristics of a
document, object, or database by opening whats known as a properties
box. For example, when youre editing a document, choose Text - Text
Properties from the menu to open the Text Properties box.
To do this

ALT+DOWN ARROW

Open Color box in Font tab

ALT+UP ARROW

Close Color box in Font tab

ALT+ENTER

Open or close properties box

CTRL+ALT+ENTER

Open or close express tools in properties


box

CTRL+END

Move to last properties box tab

CTRL+HOME

Move to first properties box tab

CTRL+PAGE DOWN

Move to next properties box tab

CTRL+PAGE UP

Move to previous properties box tab


continued

Accessibility and Keyboard Shortcuts F-5

Reference

Press

Press

To do this

DOWN ARROW or RIGHT ARROW

Select next item in a list or set of options


in properties box

ENTER

Activate default or selected item(s) in


properties box

ENTER

Close Color box in Font tab and activate


selection

ESC

Close Color box in Font tab without


activating selection

F1

Get Help on current properties box

SHIFT+CTRL+END

Move to first properties box in list

SHIFT+CTRL+HOME

Move to last properties box in list

SHIFT+CTRL+PAGE DOWN

Move to next properties box in list

SHIFT+CTRL+PAGE UP

Move to previous properties box in list

SHIFT+TAB

Move to previous option or set of


options in properties box

TAB

Move to next option or set of options in


properties box

UP ARROW or LEFT ARROW

Select previous item in a list or set of


options in properties box

Keyboard shortcuts for documents


You can use the following keyboard shortcuts when you are in a
document.
Press

To do this

CTRL+DOWN ARROW

Move to next highlighted search word


in document appearing in preview pane

CTRL+E

Edit document

CTRL+END

Move to bottom of document

CTRL+F

Find text and replace

CTRL+G

Find next occurrence of text

CTRL+HOME

Move to top of document

CTRL+P

Print selected document

CTRL+PAGE DOWN

Move to next tab in tabbed table


continued

F-6 Application Development with Domino Designer

Press

To do this

CTRL+PAGE UP

Move to previous tab in tabbed table

CTRL+UP ARROW

Move to previous highlighted search


word in document appearing in
preview pane

ESC

Move to previous linked document

F4 or TAB

Move to next unread document

LEFT ARROW

Move to previous link or object

RIGHT ARROW

Move to next link or object

SPACEBAR

Activate selected object

SPACEBAR

Expand or collapse selected section

SPACEBAR

Open selected link to document, view


or database

Keyboard shortcuts to select and move text in a document


You can use the following keyboard shortcuts when you are creating or
editing a Mail memo, a document, or form. You must be in Edit mode to
use these shortcuts. Press CTRL+E to put your document in Edit mode.
To do this

CTRL+A

Select all contents of document

CTRL+C

Copy selected text or object

CTRL+DOWN ARROW

Move item in list or table one row


down

CTRL+UP ARROW

Move item in list or table one row up

CTRL+V

Paste text or object

CTRL+X

Cut selected text or object

DELETE

Delete selected graphic

DELETE

Delete selected text or object

SHIFT+CTRL+DOWN ARROW

Select text up to same point of next line

SHIFT+CTRL+LEFT ARROW

Select previous word

SHIFT+CTRL+RIGHT ARROW

Select next word

SHIFT+CTRL+UP ARROW

Select text up to same point of previous


line
continued

Accessibility and Keyboard Shortcuts F-7

Reference

Press

Press

To do this

SHIFT+DOWN ARROW

Select text to end of current line, move


focus to next

SHIFT+END

Select text to end of current line

SHIFT+HOME

Select text to beginning of current line

SHIFT+LEFT ARROW

Select previous character

SHIFT+RIGHT ARROW

Select next character

SHIFT+UP ARROW

Select text to beginning of current line,


move focus to previous

Keyboard shortcuts to move the cursor in a document


You can use the following keyboard shortcuts when you are creating or
editing a Mail memo, a document, or form. You must be in Edit mode to
use these shortcuts. Press CTRL+E to put your document in Edit mode.
Press

To move to

CTRL+LEFT ARROW

Beginning of current word

CTRL+RIGHT ARROW

Beginning of next word

END

End of line

HOME

Beginning of line

SHIFT+TAB

Previous field in a form

SHIFT+TAB

Previous row in table

TAB

Next field in a form

TAB

Next row in table

F-8 Application Development with Domino Designer

Keyboard shortcuts to change text and paragraph properties in a


document
You can use the following keyboard shortcuts when you are creating or
editing a Mail memo, a document, or form. You must be in Edit mode to
use these shortcuts. Press CTRL+E to put your document in Edit mode.
To do this

CTRL+B

Bold selected text

CTRL+E

Put document in Edit mode (toggle)

CTRL+F

Find text and replace

CTRL+G

Find next

CTRL+I

Italicize selected text

CTRL+J

Format paragraphs (alignment, spacing, etc.)

CTRL+K

Format text (font, size, color, etc.)

CTRL+R

Show/Hide ruler

CTRL+T

Change text style to default (color changes only if


the text style is from a Paragraph Style)

CTRL+U

Underline selected text

CTRL+Z

Undo last action

F2

Enlarge selected text to next available point size

F7

Indent first line in paragraph

F8

Indent entire paragraph

F9

Refresh current document (in Edit mode), view,


or workspace

F11

Cycle through paragraph styles from Paragraph


Styles tab in Text Properties box

SHIFT+CTRL+L

Insert page break

SHIFT+F2

Reduce selected text to next available point size

SHIFT+F7

Outdent first line in a paragraph

SHIFT+F8

Outdent entire paragraph

Accessibility and Keyboard Shortcuts F-9

Reference

Press

Keyboard shortcuts to navigate within views, folders, and panes


You can use the following keyboard shortcuts to navigate through a
view, folder, or pane.
Note In any view, folder, or pane, there can be several embedded
elements (the date picker in the Calendar is an example of an embedded
element). You can navigate to any embedded element, give focus within
the embedded element, and then remove the focus to continue
navigating through the view, folder, or pane. When focus is in an
embedded element, the thin black frame around it disappears. When
focus is removed from an embedded element, the thin black frame
reappears.
Press

To do

ARROW KEYS

Move between views and folders

ARROW KEYS

Move through embedded view

ASTERISK (*) key on numeric keypad Expand collapsed view, category, or


folder with subsections
BACKSPACE

Open previous document in current


view or folder

CTRL+END

Move to bottom of navigation pane or


view pane

CTRL+HOME

Move to top of view navigation pane or


view pane

END

Move to far right of view pane

ENTER

Open next document in current view or


folder

ENTER

Open selected view or folder

F6

Move to next pane or frame

HOME

Move to far left of view pane

MINUS (-) key

Collapse expanded view, category, or


folder

PLUS (+) key

Expand collapsed view, category, or


folder

SHIFT+8

Expand all collapsed views, categories,


or folders with subsections

SHIFT+BACKSPACE

Select previous document in view

SHIFT+F6

Move to previous pane or frame

TAB

Move to next unread document in


embedded view

F-10 Application Development with Domino Designer

Keyboard shortcuts when working in views


You can use the following keyboard shortcuts when you are in a view.
Note In any view, there can be several embedded elements (the date
picker in the Calendar is an example of an embedded element). You can
navigate to any embedded element, give focus within the embedded
element, and then remove the focus to continue navigating through the
view. When focus is in an embedded element, the thin black frame
around it disappears. When focus is removed from an embedded
element, the thin black frame reappears.
To do this

CTRL+A

Select all documents in view

CTRL+C

Copy selected document

CTRL+F

Find text in view

CTRL+P

Print selected document or


view

CTRL+V

Paste selected document

CTRL+X

Cut selected document

DELETE

Delete selected document


(place document in Trash
folder)

ENTER

Select item in embedded view

F3

Move to next selected


document

F4 or TAB

Move to next unread


document

F9

Refresh current document (in


Edit mode), view or
workspace

SHIFT+CTRL+F9

Update all views in current


database

SHIFT+DELETE

Delete selected document


permanently

SHIFT+F3

Move to previous selected


document

SHIFT+F9

Rebuild current document,


view, or workspace (must
have Manager access)

SPACEBAR

Select or deselect document

Accessibility and Keyboard Shortcuts F-11

Reference

Press

Index
Symbols
$$fields
list of, 6-50, 19-21
$$HTMLHead field, 6-51
$$NavigatorBody field, 6-50
$$Return field, 5-48, 6-51
$$ReturnAuthenticationFailure
field, 5-49
$$ReturnAuthorizationFailure
field, 5-49
$$ReturnDocumentDeleted
field, 5-49
$$ReturnGeneralError field, 5-49
$$ViewBody field, 6-50, E-20
$$ViewList field, 6-50
$Anonymous field, 18-34
$ChargeRead field, 6-50
$ChargeWrite field, 6-50
$fields
$Anonymous, 18-34
$HLFormula, 6-31
$PublicAccess, 18-43
$Title, 5-6
$UpdatedBy, 18-34
$VersionOpt, 6-56
$GroupScheduleRefreshMode
field, 6-50
$GroupScheduleShowLegend
field, 6-50
$HLFormula field, 6-30
$Title field, 5-5, 6-51
$trash
creating a trash folder, 7-74
$UpdatedBy field, 18-34
$VersionOpt field, 6-51, 6-56
@commands
for application automation, 10-61
on Web, 2-11
Programmer's pane and, 1-6
referencing, 6-33
@Db commands
@DbColumn, 6-26, 13-16
@DbCommand, 13-16
@DbLookup, 6-26, 13-16
described, 13-1

@functions
for date and time
calculations, 6-18
for external data access, 6-26
Programmer's pane and, 1-6
referencing, 6-33
using, 7-55
Web, D-2
@username
using to customize views, 7-6
1-2-3 files
importing into views, B-3

A
About Database document
creating, 19-3
inheriting from template, 19-29
launching, 19-26
opening, E-9
Accelerator keys. See Shortcut keys
Accent sensitivity
sorting, 7-33
Access
denying, 18-15, 18-46
Access control list. See ACL
Access level privileges
ACL, 18-6
Access levels
anonymous, 18-17
assigning, 18-2
conflicts, 18-24
default, 18-12
editing, 18-11
list of, 19-15
Accessibility
additional information about, F-1
custom tools and, 17-2
customizing settings for, F-1
for users with disabilities, 2-15
of navigators, 9-18
of outlines, 9-3
of view icons, 7-32
shortcut keys for views, 7-11
ACL
access for Web users, 18-24

access level privileges, 18-2, 18-6


access levels, 18-3, 19-15
agent security and, 10-43
aliases in, 18-16
anonymous access, 18-17
brackets in, 18-10
CGI and, E-32
concurrent changes to, 21-19
consistency, 21-31
copying from template, 3-5
default entries, 18-12, 18-27
ECL and, 18-2
editing, 18-11
effective access and, 18-23
enforcing on replicas, 18-21
entering names, 6-26
examples, 18-28
format for entries, 18-13
group names, 18-12, 18-15, 18-27
LDAP users and, 18-16
monitoring, 18-23
order of evaluation for
entries, 18-19
replica IDs, 18-19
replication and, 21-31
roles, 18-9
server names, 18-14
setting up, 18-2
terminations group, 18-15
troubleshooting, 21-31
URL commands and, E-25
user names, 18-14
user types, 18-20
using to enter names, 6-22
Web previewing and, 3-27
wildcard entries, 18-13
Action bar
described, 10-15
Action bar applet
described, 2-11, 10-15
Actions
built-in, 10-3
copying, 10-12
creating, 10-9 to 10-11
creating hotspots for, 10-4
deleting, 10-12

Index-1

described, 1-15, 10-2


editing, 10-21
examples, 10-3
icons for, 10-10, 10-19
in Notes and Web
applications, 2-5
inserting, 10-17
naming, 10-65
navigator, 9-18
OLE and, 14-17
publishing, 14-2
shared, 3-13, 10-17
simple, 10-2
simulating Notes menus, 10-13
URL commands and, E-3
Web, D-3
Actions field
described, 19-21
Actions menu
described, 10-12
Actions with children
creating, 10-11
ActiveX controls
debugging, 14-5
defined, 14-2
Administration Process
setting up for databases, 18-36
Administration servers
assigning to databases, 18-36
Agent Log
described, 10-49
size limit, 10-53
Agent Manager
described, 10-5
recording less information, 10-52
setting up debugging, 10-47
AgentRunner
described, 10-54
Agents, types of
background or foreground, 10-45
built-in, 10-6
embedded, 10-46
Java and LotusScript, 10-43
local or server, 10-44
public access, 18-43
Agents, uses for
adding fields with, 19-22
editing documents with, 19-22
generating XML with, 15-13
hiding design with, 19-43
in Notes and Web
applications, 2-5
mail, 16-7
mail responses, 16-6

removing field data with, 19-22


removing stored forms
with, 19-23
renaming fields, 19-22
resaving documents with, 19-22
Agents, working with
Agent Manager debugging, 10-51
calling, 10-12
chaining together, 10-56
compared to servlets and CGI
programs, 12-2
copying, 10-37
creating, 10-31, 18-7
debugger settings, 10-49
debugging, 10-46
deleting, 10-37
described, 1-15, 10-5
disabling, 10-37
enabling, 10-35
examples, 10-38
invoking, 12-3
naming, 10-65
renaming, 19-17
restricted operations for
LotusScript and Java, 10-59
restricting, 18-8
running, 10-12
run-time statistics, 10-51
security for, 10-41, 12-41
simulating a run, 10-46
triggering, 10-32, 10-34
viewing, 10-6
viewing the log, 10-49
Web and, D-3
Aliases
choice list, 6-27
converting to full names, 6-28
form names, 5-10
in ACL, 18-16
servlet names, 12-7
view names, 7-9
All by Category view
described, 7-46
Alternate HTML
described, 11-7
Alternate names
in ACL, 18-16
Alternate text tag
for images and Java applets, 2-15
Annotating
applications, 19-7
documents, 5-20
fields, 19-6

Index-2 Application Development with Domino Designer

Anonymity
protecting, 5-13
Anonymous access level
in ACL, 18-17
Anonymous field
on forms, 18-34
Anonymous forms
creating, 5-13
AppletBase
extending, 11-14
Applets
action bar, 10-15
adding to a page or form, 4-20
creating, 10-15
described, 12-1
editor, 6-10
font support and, 7-69
listed, 2-11
outline, 9-16
view, 7-67
Web applications and, 2-10
Application design elements
security, 18-29
Applications
annotating, 19-7
automating, 10-1, 14-17
completing, 19-1
creating bookmarks, 3-8
deploying, 19-9
design tips, 2-2
documenting, 19-3
for mobile clients, 2-12
mail-enabled, 16-2
managing, 20-1
master design copies, 19-9
overview of Domino, 1-1
planning, 2-1
planning for Notes and Web, 2-2
previewing, 3-25
setting launch properties
for, 19-25
testing, 19-16
Archives, database
creating, 21-12
Arguments
setting for Java applets, 11-5
Attachments
creating, 4-21, 5-29
getting details of in formula
language, 7-29
opening with URL
commands, E-19
Attributes
HTML, 6-46

Authentication
for Web users, 18-18
URL commands and, E-25
user names, 18-16
Author access
actions, 18-4
privileges, 18-6
Authors
anonymous, 5-13
displaying names, 7-29
Authors field
creating, 18-32
described, 18-31
restricting read-access with, 18-30
updating, 18-35
Autolaunching
defined, 14-9
examples, 14-11
objects, 14-1, 14-10
Automating
applications, 10-1, 14-17
described, 1-15
formulas for, 10-61
hiding components, 10-66
JavaScript and, 10-62
navigators, 9-23
replies, 16-6
security features and, 10-62
using LotusScript, 10-58
Averages
calculating, 7-38

B
Background processing
on Web pages, E-32
Backgrounds
for pages and forms, 4-19
Billing
forms for, 5-41
reserved fields for, 6-50
Bitmap files. See Graphics
BlindCopyTo field, 6-52
BMP files. See Graphics
Body field, 6-49
described, 19-21
Bold text
in Web applications, 6-9
Bookmark bar
creating bookmarks on, 3-8
creating link to databases, 3-8
enabling keyboard
navigation, F-2

Bookmarks
organizing applications, 3-7
using, 3-9
Borders
for embedded elements, 4-21
for frames, 8-6
Browsers
designing applications for, 2-2
differences, 2-7
hiding paragraphs from, 6-42
launch options, 19-25
proxy settings for, 3-26
setting up for previewing, 3-26
using Print statement to
instruct, 10-58
using with Notes client, 6-11
Button bar
described, 10-15
Buttons
creating, 2-11, 10-22
customizing icon, 3-7
defined, 10-4
deleting, 10-22
editing, 10-22
examples of, 10-24

C
CAB files
described, 11-4
Calculating
cell values, 7-38
field values, 6-11, 7-27
Calendar controls
adding to a page or form, 4-22
creating, 6-18
Web use of, D-4
Calendar views
creating, 7-56, D-4
defined, 7-1
described, 7-4
formatting, 7-57
styles for, 7-59
using with the embedded
scheduler, 5-29
Cascading
form names, 5-11
view names, 7-11
Cascading Style Sheet. See CSS
Categories
adding to views, 7-42
columns, 7-44
documents in, 7-46
field for creating, 6-51, 7-44

generating dynamically, 7-44


naming, 7-44
subcategories, 7-45
user-created, 7-42
Category fields
described, 7-44
cc:ing. See Mail
cc:Mail
mailing to, 6-53
CD-ROM updates
replication and, 20-14
Certificates
SSL, E-25
CGI
defined, E-32
CGI programs
compared to servlets and
agents, 12-2
invoking, 12-3
security for, 12-4
CGI variables
fields and, E-33
table of, E-33
user profiles and, E-32
Character translation file
described, B-2
Check box fields
aliases in, 6-27
in Web applications, D-4
Choice list fields
aliases in, 6-27
creating, 6-22
refreshing, 6-39
views and, 5-41
Choices
displaying in lists, 5-41, 6-22
refreshing, 6-41
Class name
described, 11-3
CLS files
described, B-2
CodeBase property
for Java applets, 11-8
COL files
creating, B-6
defined, B-6
formulas and, B-7, B-10
guidelines, B-7
importing a tabular text file, B-8
keywords, B-8
Collapsing
columns, 7-29
sections, 18-36
views, 7-38

Index-3

Color fields
described, 6-35
views and, 7-52
Color palettes
blending colors, 3-17
changing, 2-9
choosing colors, 4-17
Colors
blending, 3-18
for columns, 7-38
for frame borders, 8-7
for navigators, 9-22
for outline entries, 9-15
for rows, 7-38
for views, 7-25, 7-38
for Web applications, 2-9
unread marks and, 7-49
Column descriptor file. See COL files
Column width
described, B-8
Columns, 7-52
adding to views, 7-8
calculating values in, 7-38
categorized, 7-42
collapsing, 7-29
copying, 7-7
creating, 7-17
date, 7-19
deleting, 7-7, 7-17
displaying custom icons, 7-31
entering names from, 6-26
expanding, 7-29
for Web links, 7-24
formatting, 7-19
hide-when formulas and, 7-23
hiding, 7-38
icons in, 7-31
mapping to fields in views, B-7
numbers, 7-21
programmatic name for,
7-22, 7-52
programming, 7-24
referred to in formulas, 7-55
response, 7-48
setting styles for, 7-18
specifying data type in views, B-7
styling, 7-38
switching to a view, 7-37
testing, 19-14
time, 7-19
titles for, 7-17
user-customizable, 7-52
views and, 1-11, 7-1
width, 7-38, B-9

Combo box fields


aliases in, 6-27
Command keys
defined, F-1
Common Gateway Interface. See CGI
Common name
displaying, 6-21
Compatibility
and views, 7-70
Compatibility with earlier releases.
See Upgrading
Components
sizing, 14-7
using, 14-2
ComposedDate field, 6-49
Computed fields
CGI programs and, E-33
defined, 6-32
examples, 6-38
order of evaluation, 5-9
Computed for display fields, 6-34
Computed text
described, 4-7
Computed when composed
fields, 6-34
Configuring
offline applications, 22-5
Conflict documents
displaying in a view, 7-13
Conflict documents. See Replication
conflicts
Connections
enabling for a database, 13-9
Connectivity
for relational databases, 13-3
Console commands
described, 10-49
Contact printing
example, 5-48
forms for, 5-42
reserved fields for, 5-44
Controls
date/time, 6-18
embedded, 5-28
Cookies
programming for, 12-2
Copy Java applet
described, 11-12
CopyTo field, 6-52
CORBA properties
for Java applets, 11-8
CORBA SSL security
for Java applets, 11-8

Index-4 Application Development with Domino Designer

Count parameter
Domino URL commands
and, E-20
search results and, E-24
Create menu
documents and, 5-11
CreateDocument command
described, E-13
CSS
class and objects, 2-10
defined, 15-6
passing information, 6-51
shared resources and, 4-34
styles applied to objects, 2-10
supported properties, 4-35
XML, 15-5, 15-9
Currency
fields for, 6-11
formatting, 6-12, 7-22
Custom controls
adding to forms, 14-4
described, 14-2
running in Read mode, 14-8
sizing, 14-7
updating, 14-8
Customize subform
using, 22-17
Customizing
column sorting, 7-36
databases, 3-3
icon buttons, 3-7
letterheads, 3-21
templates, 19-28
window titles, 5-20

D
Data access
with @DbColumn and
@DbLookup, 6-26
with Domino Connectors, 13-3
with Lotus Enterprise
Integrator, 13-3
with ODBC, 13-13 to 13-14
with servlets, 12-1
Data Connection Resources.
See DCRs
Data entry
fields for, 6-32
Data types
defined, 6-1
list of, 6-7
listed for choice list fields, 6-23

Database access
access level conflicts, 18-24
troubleshooting, 21-26
Database activity
monitoring, 21-21
reporting, 21-23
statistics, 21-22
Database analysis
of replication events, 21-16
Database cache
performance problems and, 21-27
Database creator
access level, 18-12
Database design
changing, 19-35
replicating, 21-30
templates and, 3-2
Database icons
creating, 19-2
replacing, 19-38
Database libraries
design library template, 19-30
Database performance
troubleshooting, 21-21,
21-25 to 21-26
Database properties
for enabling connectivity, 13-9
Database titles
replicating, 21-30
Databases
access control lists, 18-30
access control log, 18-18
access problems, 21-26
administration servers and, 18-36
as external data sources, 13-6
connecting to, 13-1, 13-3
controlling access to, 18-2
copying to servers, 20-2, 20-4
creating, 3-2, 19-31
creating bookmarks to, 3-8
defined, 1-2
documenting, 19-3
editing with WebDAV, 17-4
encrypting, 20-7, Field help, 18-46
external, 13-13
forcing replication, 20-19
hiding, 19-44
icons, 19-2
importing external records
from, 13-11
Internet security, 18-25
launching, 8-10, 19-25
linking, 19-31
locking design elements in, 19-46

mail features and, 16-5


managing, 20-1
monitoring, 18-23
moving, 21-24
previewing, 19-26
renaming, 19-17
replacing design of, 19-38
replicating, 20-6, 20-18
replication history, 21-16
replication log, 21-18
restricting creation of, 10-43
roles, 18-9
rolling out, 20-2 to 20-3
security, 18-1, 18-20
shared resources across, 3-12
shortcut keys, F-4
size, 21-21
size limits, 20-5
size, controlling, 21-9
soft deletions, 7-74
statistics, 21-21
summary, 19-18
synchronizing, 19-33
templates, 19-33
titles for, 3-3
troubleshooting, 21-25
unlinking, 19-42
unlocking design elements
in, 19-46
URL commands and, E-4
Datalens
ODBC and, 13-14
Date picker
adding to a page or form, 4-22
in Web applications, D-4
Date separator
described, 6-15
Date/Time controls
described, 6-18
Date/Time fields
described, 6-13
examples, 6-20
Date/Time formats
setting for Web applications, E-28
Dates
displaying, 7-19
entering, 6-13, 6-18
formatting, 6-14, 6-17, 7-19
formula language, 6-18
ranges, 6-13
stored as seconds, 6-21
DB2
connecting to, 13-9
integrating with, 2-14

DCRs
creating, 13-6
customizing, 13-7
data sources and, 13-6
described, 13-1
enabling, 13-9
example of, 13-12
fields and, 13-10
importing external records, 13-11
overview of, 13-5
specifying default, 13-10
using on forms, 13-10
Debug_AMgr statement
described, 10-52
DEBUG_OUTFILE statement
described, 10-52
Debugging
agents, 10-46
Java applets, 11-18
NotesLog class, 10-53
Decimal places
in Number fields, 6-12
Decimal symbol
described, 6-12
Decrypting documents
overview, 18-49
DECS
described, 13-1 to 13-2
Default field values
for editable fields, 6-35
Default group
access level, 18-12
DeleteDocument command
described, E-13
Deletion stubs
purging, 20-10, 21-33
DeliveryPriority field, 6-52
DeliveryReport field, 6-52
Deploying
applications, 19-9
Depositor access
actions, 18-4
privileges, 18-6
Design
changing, 19-40
hiding, 3-4, 19-43
linking, 19-31
maintaining, 19-14
preventing changes, 19-9
refreshing, 19-36
replacing, 19-38
replication and, 19-40
templates and, 19-27, 19-41
updating, 19-36

Index-5

Design action buttons


described, 1-5
Design changes
making, 19-35
templates and, 3-3
Design elements
automating, 10-28
copying, 3-11, 19-30
hiding, 19-44
library of, 19-30
linking, 19-32
listed, 1-2
locking, 19-46
multiple selection of, 19-42
previewing, 3-25
protecting, 19-41
templates and, 19-32
unlinking, 19-42
unlocking, 19-47
updating, 19-36
Design library template
described, 19-30
Design properties
setting for multiple
elements, 19-42
Design synopsis
creating, 19-18
Designer
starting, 1-2
third-party tools and, 17-2
work area overview, 1-4
Designer access
actions, 18-4
privileges, 18-6
Designer task
updating databases with, 19-33
Dialog boxes
and Web applications, 2-7
creating, 5-38 to 5-39
designing in formula
language, 5-38
shortcut keys, F-5
Dialog forms
described, 5-38
Directory catalogs
offline, 22-22
offline applications and, 22-22
Discussion template
described, 3-2, A-1
Disk space
saving, 18-7 to 18-8
DocBase property
for Java applets, 11-8

Document archiving tool


described, 21-12
Document keys
opening documents with, E-15
Document Library template
described, A-1
Documenting
applications, 19-3
databases, 19-3
fields, 19-6
Documents
accessing, 5-6, 18-29
annotating, 5-20
anonymous, 5-13
archiving, 21-12
calculating age of, 6-21
categorizing, 7-46
conflict, 5-13
copying, 3-5, 10-54
creating, 5-11, 7-50, E-13
decrypting, 18-47, 18-49
deleting, 7-5, 10-55, E-13
deleting from views, 7-73
displaying, 7-14, 15-11
editing, 7-50, 19-6, 21-19, E-13
encrypting, 18-47, 18-49, 18-57
footers, 5-16
forms and, 5-5
headers, 5-16
hiding, 14-14
launching, 19-4
launching into framesets, 8-10
linking in workflow
applications, 16-3
locking/unlocking, 3-24
modifying, 6-46
moving, 10-56
opening, E-15
previewing, 19-26
read/unread status, 7-49, 10-55
replication conflict, 21-19
saving, 6-53
security, 10-43, 18-29 to 18-31,
18-41, 18-49
selecting in views, 7-15
selecting in Web applications,
7-69
shortcut keys, F-6
signing, 18-38, 18-60
sorting, 7-14
storing forms with, 6-51
summary of, 10-57
tracking, 5-41
tracking versions, 5-18

Index-6 Application Development with Domino Designer

unread, 7-49
updating, 19-20, 19-22
Web and, 5-11, E-13
Documents, mailing, 10-57, 16-4
DOLMKINF utility
creating filesets with, 22-16
DOLRES.NTF
copying design elements
from, 22-2
DOLS. See Domino Off-Line Services
Domains
searching, E-20
Domino
security, 18-1
Domino Connectors
described, 13-3
Domino Directory
accessing, C-3
entering names, 6-26
offline, 22-22
Domino Directory Server document
servlet manager settings, 12-5
Domino Enterprise Connection
Services. See DECS
Domino Global Workbench
described, 2-19
Language Synchronizer, 2-20
Domino Java Virtual Machine
(JVM), 12-5
Domino Off-Line Services
described, 22-1
design elements, 22-17
developer tasks, 22-2
forms, 22-2 to 22-3
installing, 22-4
overview, 22-1
replicating databases, 22-14
URLs and, 22-14
Domino security
application design
elements, 18-29
Domino URL commands
authentication and, E-25
count parameter, E-23
explicit, E-16
implicit, E-16
opening documents by key, E-15
server commands, E-4
ServerRequest, E-27
start parameters, E-23
syntax, E-2
Domino-generated fields. See
Reserved fields

DominoObject
in URL commands, E-2
DTD
defined, 15-6
Duration controls
creating, 6-20
in Web applications, D-4
setting separator for, 6-45
DXL
described, 15-3
transforming, 15-17

E
ECL
described, 18-2
setting up for secure Java applet
access, 11-13
Edit mode
for forms and documents, 5-14
hidden data in, 2-14
Editable fields
defined, 6-32
EditDocument command
described, E-13
Editing
concurrent, 21-19, 21-34
documents, 19-22
documents from a view, 7-50
fields, 18-43
forms, 19-20
images with the editor
applet, D-6
navigators, 9-19
restricting, 18-31
URL commands and, E-14
window titles, 5-20
Editor access
actions, 18-4
privileges, 18-6
Editor applet
described, 2-11
using, 6-10
Editors
anonymous, 5-13
embedding in a form, 5-33
sections and, 18-36
tracking, 18-34
Effective access. See ACL
E-mail. See Mail
Embedded controls
date picker, 4-22
embedded scheduler, 5-29
file upload control, 5-29

forms and, 5-28


group scheduler, D-4
Embedded editors
creating for a form, 5-33
Embedded elements
borders for, 4-21
embedded scheduler, 5-29
keyboard accessibility and, 2-17
pages and, 4-21
reserved fields for, 6-50
Embedded objects
autolaunching, 14-10
Embedded scheduler
using, 5-29
Embedded views
setting display properties, 7-63
Embedding
defined, 14-2
editors, 5-33
error message, 14-5
folders, 7-61
navigators, 7-60, 9-27
objects, 14-1
outlines, 9-5
views, 7-60 to 7-61
Encapsulated documents, 6-53
Encrypt field, 6-52
Encryption
database, 18-45 to 18-46
default, 18-57
defined, 18-48
described, 18-45
document, 18-47
examples, 6-29, 18-50
field, 18-47, 18-49
levels, 18-46
views and, 18-57
Encryption keys
changing, 18-56
creating, 18-50
defined, 18-47
distributing, 18-51
examples, 18-55
exporting, 18-52
fields for, 6-50, 18-54
listing, 18-54
mailing, 18-52
managing, 18-50
merging, 18-53
password fields and, 6-29
secret, 6-51
Entry helper button
described, 6-23

ERP systems
connecting to, 13-1
Error executing agent
error message, 10-53
Error handling
on forms, 5-49
Error messages
customized forms for, 5-49
OLE objects and, 14-5
Events
agent, 10-9
calendar view, 10-8
click, 10-9
database, 10-7
described, 10-6
examples, 10-29
field, 10-9
form, 10-8
page, 4-37
programming, 10-6, 10-28
view, 10-7
Examples
access control, 18-33
access control sections, 18-38
actions, 10-14
agents, 16-6
autolaunching, 14-11
automating navigators, 9-24
buttons, 10-24
choice list field generation, 6-27
columns, programming, 7-25
computed fields, 6-38
customizing window titles, 5-21
Date/Time fields, 6-20
DCRs, 13-12
default value formulas, 6-37
displaying documents in a
view, 7-13
encryption, 18-50
encryption keys, 18-55
events, 10-29
exchanging data, 14-20
fields, 14-20
fields that control mailing
options, 6-55
hiding, 14-16
hotspots, formula pop-up, 10-27
hotspots, text pop-up, 10-25
inheriting information, 6-48
input translation formula, 6-37
links, 4-15, 10-21
password fields, 6-29
replication, 20-16
restricting access, 18-40

Index-7

servlet, 12-9
servlets.properties file, 12-9
templates, 19-29
Excel files
importing from and exporting
to, B-1
Exchanging
field data, 14-19
Execution Control List. See ECL
Expanding
columns, 7-29
sections, 18-36
views, 7-38, E-5
Exponential notation
described, 6-12
Exporting
files, B-1
Java applets, 11-12
views, B-11
Extended accelerator keys
enabling, F-1
Extended ACL
described, 18-2
External database access
with Domino Connectors, 13-1
with Lotus Enterprise
Integrator, 13-1
with ODBC, 13-13 to 13-14
ExternalData parameter
in Java applets, 11-16
Externalization for Java applets
described, 11-16

F
Field data
deleting from documents, 6-2
exchanging, 14-19
shared fields and reassigning, 6-4
Field formulas
creating, 6-33
described, 6-35
Field help
writing, 19-6
Field label
defined, 6-6
Field names
described, 6-6
requirements for, 6-6
Field types. See Data types
Field values
calculating, 6-33, 7-27
default for editable fields, 6-35
displaying, 7-24, 19-21

Field-exchange. See Notes/FX


Fields
authors, 18-32
DCRs and, 13-10
described, 6-1
encrypting, 18-47, 18-49
in Notes and Web
applications, 2-4
readers, 18-32
Fields, types of
category, 7-44
checkbox, 6-23
choice list fields, 6-23
color, 6-35
combobox, 6-23
computed, 5-9, 6-32
computed for display, 6-34
computed when composed, 6-34
data entry, 6-32
date/time, 6-13
dialog list, 6-23
editable, 6-32
embedded elements, 6-50
formula fields, 6-30
hidden, 5-14
HTML, 6-46
list box, 6-23
mail-enabling, 6-50
Names, 6-21
Numbers, 6-11
password fields, 6-28
radio button, 6-23
reserved, 6-50, 6-56, 19-21
rich text, 6-7
rich text lite, 6-7
shared, 6-3
text, 6-7
time zone, 6-35
Fields, working with
adding to existing
documents, 19-22
annotating, 19-6
CGI variables and, E-33
copying, 6-2
creating, 6-1, 14-19
default active, 6-41
default values for, 6-11, 6-36
defined, 5-3
deleting, 6-2
described, 6-1
disabling field input, 6-36
editing, 18-43
enabling field input, 6-36
encrypting, 18-48 to 18-49

Index-8 Application Development with Domino Designer

examples, 14-20
exchanging data in, 14-2
formatting for the Web, 6-46
formulas, 6-36
hiding, 4-12, 6-42
HTML attached to, 6-46
inheriting documents in, 6-48
inheriting values in, 6-47
layout regions and, 6-44
modifying, 10-55
naming, 6-6
recalculating computed, 6-34
renaming, 6-6, 19-22
replacing field values, 10-56
resizing, 6-45
setting input validation
formula, 6-36
setting translation formula, 6-36
shared resources as, 3-13
signing, 18-38
testing, 19-11
Web and, D-4
File field
described, 19-21
File formats
importing from and exporting to
views, B-1
sharing, 3-13
File resources
creating, 3-14
opening with URL
commands, E-12
shared, 3-14
File sets
custom, 22-15
File upload control
described, 5-29
Files
attaching to documents,
4-21, 5-29
opening with WebDAV, 17-7
Flat style outline
described, 9-12
Floating point arithmetic
described, 6-12
FolderOptions field, 6-57
Folders
adding documents to, 6-51
copying design elements
into, 3-11
copying documents to, 10-54
creating, 18-7
creating bookmarks in, 3-10
creating in a database, 3-10

default, 7-9
defined, 7-9
described, 7-2
embedding, 7-61
launching into framesets, 8-11
limiting access, 18-40
MAPI Folder Interface and, C-2
organizing applications, 3-7
removing documents from
without deleting, 10-54
security, 18-41
shortcut keys, F-10
trash, 7-74
Web, 7-9
Fonts
applying to text, 4-6
changing in a form, 4-8
in view applet, 7-69
Footers
creating, 5-16
Foreign language applications
designing for, 2-19
Foreign symbols
translating, B-2
Form access list
creating, 18-30
Form elements
listed, 5-2
Form processed confirmation
described, 5-48
overriding, 6-51
Formatting
HTML, 6-46, 7-66
numbers, 7-21
text, 4-6
views, 7-66
Web applications, E-28
Forms
accessing, 18-30
adding XML to, 15-8
autolaunching, 14-9, 14-12
autolaunching objects, 14-10
changing, 19-17, 19-20
compared to pages, 4-1
copying, 5-7
creating, 5-1, 5-7, 14-9, 18-44
DCRs and, 13-10
defaults, 4-8, 5-7
deleting, 5-8, 19-23
described, 5-1
designing for Notes and Web, 2-3
DOLS Offline Configuration, 22-2
to 22-3
encryption property, 18-48

for replacing dialog boxes, 2-7


headers/footers, 5-16
hiding, 5-12
in Notes and Web
applications, 2-7
layers on, 4-26
naming, 5-9 to 5-10
replication and, 5-13
storing, 19-23
storing with documents, 5-6, 6-51
testing, 5-60, 19-10
Web applications, 5-12, D-5
Forms, types of
anonymous, 5-13
billing, 5-41
contact printing, 5-42
customized results forms, E-23
dialog, 5-38
Domain Search forms, 5-50
version tracking, 5-18
Forms, working with
choices on, 5-41
designing prompts, 5-40
dialog boxes as, 5-38
displaying as Web page, E-12
displaying documents with
forms, 5-5
displaying without editable
fields, E-12
edit mode, 5-14
embedded controls on, 5-28
embedded editors on, 5-33
embedded navigators and, 9-28
embedding objects in, 14-3
examples, 14-20
field-exchange in, 14-2
improving performance of, 5-59
launching an OLE object, 14-11
linking objects in, 14-3
navigators and, 7-65
objects and, 14-1
OLE and, 14-4
securing, 18-30, 18-41, 18-43,
18-47
templates and, 6-49
window titles, 5-20
Formula fields
described, 6-30
programming, 6-31
Formula pop-ups
creating, 10-26
defined, 10-4
deleting, 10-26
editing, 10-26

Formulas
automating applications, 10-61
COL files and, B-10
columns and, 7-24
entering in the Script area, 1-6
examples, 10-27
field, 6-33
input translation, 6-32
input validation, 6-32
literalizing, 6-31
lookup, 7-55
named elements and, 9-8
prompting users, 5-40
Forwarding
documents, 16-4
restricting, 18-43
Frames
borders for, 8-3
described, 8-1
in Web applications, D-7
naming, 8-4
sizing, 8-6
specifying a target frame, 8-9
Framesets
content for, 8-4
creating, 8-2
defined, 1-14, 8-1
keyboard accessibility and, 2-17
launching automatically, 8-10
launching on Web, 7-66
opening, E-10
outlines and, 9-17
From field, 6-49

G
getCodeBase
in Java applets, 11-21
getDocumentBase
in Java applets, 11-20
GIF files. See Graphics
Global Workbench. See Domino
Global Workbench
Graphical date/time controls
described, 6-18
Graphics
adding an editor to Designer, 17-2
adding to navigators, 9-20
adding to outline entries, 9-9
alternate text for, 2-15
backgrounds, 4-19
bitmap, 4-17
changing, 4-18

Index-9

changing when moused


over, 3-22
choosing colors for, 4-15
copying, 9-20
creating, 4-17
customizing letterheads, 3-21
database management and, 3-17
design tools for, 9-20
dynamic, 3-21
importing, 9-20
JPEG, 4-17
navigators and, 9-20
pasting, 9-20
PCX, 4-17
shared resources, 3-12
text over, 6-44
TIFF, 4-17
Gray scale
blending colors, 3-18
Gridlines
displaying in views, 7-38
Group calendars
in Web applications, D-4
Group names
ACL, 18-12
Guides. See Navigators, Outlines

H
Handheld devices
designing for, 2-12
Headers
creating, 5-16
Headlines database
described, 6-30
subscriptions and, 3-11
Help
context-sensitive, 19-5
databases, 19-8
displaying for Lotus
components, 14-4
for fields, 19-6
forms, 19-7
overview, 19-3
Hide-when conditions
CGI fields and, E-33
columns and, 7-23
field settings, 6-43
options, setting, 2-13
Web use and, E-14
Hide-when fields
in Notes and Web
applications, 2-4

Hiding
automated components, 10-66
button hotspots, 10-23
columns, 7-38
databases, 19-44
design elements, 2-13, 19-44
designs, 3-4, 19-43
documents, 14-14
elements from mobile clients, 2-12
examples, 14-16
fields, 4-12, 6-42 to 6-43
formula pop-ups, 10-26
Java applets, 11-9
menu choices, 9-27
objects, 14-16
outline entries, 9-9
paragraphs, 6-42
section titles, 18-36
servlet names, 12-8
subforms, 5-22
text pop-ups, 10-25
views, 7-10, 7-70, 9-27
Hierarchical names
displaying as common name, 6-21
Hierarchy. See Response
documents
Home pages
creating, 4-1
defined, 4-5
launching, 4-5
specifying, 19-8
URLs, 19-8
Horizontal rules
creating, 4-8
in Web applications, D-8
Host forms
described, 5-38
Hotspots
action hotspot, 10-27
button hotspot, 10-22
creating, 9-22
defined, 1-15, 9-22
examples, 10-4
imagemaps and, 9-30
navigators and, 9-22
pop-ups, 10-25 to 10-26
Web applications and, D-8
HTML
adding, 4-23
adding an editor to Designer, 17-2
attributes, 6-46, 11-7
core attributes, 2-9
defined, 15-6

Index-10 Application Development with Domino Designer

displaying information with Print


statement, 10-58
formatting, 6-46, 7-66
generating for hidden fields, 5-14
on pages and forms, 4-23
passing to server, 6-51
referencing objects with
JavaScript, 2-10
tag attributes, 2-9
viewing frameset source, 8-3
views and, 7-66
XML and, 15-5
HTML editor
using, 4-24
HTML field, 6-46
HttpSession instance, 12-6

I
Icon buttons
customizing, 3-7
Icons
creating database, 19-2
custom icons in views, 7-31
displaying in columns, 7-31
download, 22-2 to 22-3
identity, 22-17
Image files
described, E-19
Image resources
creating, 3-17
customizing letterheads, 3-21
deleting, 3-20
described, 3-12
dynamic graphic, 3-21
opening with URL
commands, E-12
renaming, 3-19
Image set
described, 3-21
Imagemaps
compared to outlines and
navigators, 9-1
described, 9-30
Images. See Graphics
Imperial measurement
described, 6-12
Importing
column format, B-2
documents, B-2
files into views, B-1, B-10
foreign characters and symbols
into views, B-2
graphics, 9-20

Java applets, 11-3


lines per page, B-5
navigators, 9-29
Indenting
documents, 7-27
response documents, 7-47
Indexes
updating, 21-24
Indexes, full-text
updating, 21-24
Indexes, view
refreshing, 7-71
Info field
described, 19-21
Inheriting
creating fields for, 6-47
documents in fields, 6-48
field values, 6-36
related documents, 5-17
subjects in a response
hierarchy, 6-49
Input Enabled property
enabling field input, 6-36
Input forms
described, 5-38
Input translation formulas
defined, 6-36
example, 6-37
settings for field, 6-36
Input validation formulas
defined, 6-36
Instant messaging
adding to an application, 3-27
International characters
displaying on Web, 6-10
in Web applications, D-6
Internet
SSL security and, 18-25
InViewEdit
described, 7-51
Italic text
in Web applications, 6-9

J
JAR files
described, 11-4
Java
Web applications and, 2-10
Java agents
restricting, 18-8
Java applet properties
CodeBase, 11-8
CORBA classes, 11-8

CORBA SSL security, 11-8


DocBase, 11-8
Size, 11-8
Java applets
adding to an application, 11-2
alternate text for, 2-15
compared to servlets, 12-1
copying, 11-12
debugging, 11-18
deleting, 11-12
described, 11-1
Domino, 2-11
enabling on workstation, 11-2
exporting, 11-12
hiding, 11-9
importing, 11-3
linking to, 11-5
pages and, 4-20
parameters, 11-5
persistence for, 11-15
refreshing, 11-12
running, 11-6
security, 11-13
selecting, 11-11
serialization, 11-17
setting HTML attributes, 11-7
shared resources, 3-13, 11-10
starting, 11-11
stopping, 11-11
storing files for, 11-1
troubleshooting, 11-18
Java compiler, 12-4
Java Debug Console
described, 11-18
Java programs
editing and the Reference tab, 1-6
restricting use in agents, 10-43
servlets, 12-1
storing, 3-13
using for data access, 13-2
Java servlets
XML, 15-15
JavaScript
automating applications
with, 10-62
editing, and the Reference tab, 1-6
table of supported objects, 10-63
JavaScript code
passing, 6-51
JavaScript header
for pages and forms, 4-38
JDBC
using for data access, 13-2
JPEG files. See Graphics

K
Keyboard shortcuts. See
Shortcut keys
Keys, encryption. See
Encryption keys
Keywords
COL files and, B-8

L
Labels
fields, 6-6
Language preference
setting, 2-17
setting for Web applications, E-28
Languages
sort order, 22-23
Launching
databases, 19-25
databases into framesets, 8-10
documents, 19-4
documents or pages into
framesets, 8-10
home pages, 4-5
links, 19-26
objects, 14-1
pages, 19-26
target frames and, 8-9
views or folders into
framesets, 8-11
Layer tree
hiding layers, 4-27
Layers
anchors, 4-27
background color, 4-31
content, 4-26
copying, 4-27
creating, 4-26
deleting, 4-27
hiding, 4-27
HTML properties, 4-30
Layer Tree dialog box, 4-27
position properties, 4-28
tile patterns, 4-32
Layout regions
changing, 5-26 to 5-27
defined, 5-25
described, 5-25
fields on, 6-44
read access, 2-14
unsupported features, 6-23

Index-11

LDAP directories
authenticating Web users
with, 18-16
Legacy applications
XML and, 15-4
Legacy databases
connecting to, 13-1
Legend
embedded scheduler, 5-32
LEI
described, 13-3
Letterhead
customizing, 3-21
Levels. See Response documents
Limits
size, 2-23
Linking
databases, 19-31
design elements, 19-32
designs, 19-31
documents, 16-3
mail, 16-3
objects, 14-1
templates and, 19-31 to 19-32
Links
creating on Web, 6-10
database, 19-31
defined, 10-4
displaying in views, 7-24
launching automatically, 19-26
sending, 16-3
target frames and, 8-10
URL, 4-13
Links field
described, 19-21
List box fields
aliases in, 6-27
Lists of choices
displaying, 5-41
LocalDomainServers group
access level, 18-12
Locking
WebDAV and, 17-10
Locks
document, 3-24
Log file
replication events, 21-18
Login
argument, E-25
Login command
described, E-4
URL guidelines, E-3
Logout command
described, E-4

Lookup formulas
described, 7-55
Lookups
creating, 5-41
in multiple Domino
Directories, C-1
name, 6-22
Lotus components
using, 14-2
Lotus Translation Components
Domino Translation Object, 2-21
Translation Services
Gateway, 2-21
LotusScript
application automation, 10-58
debugger, 10-47
OLE and, 14-2
restricted operations in
agents, 10-59
restricting use in agents, 10-43
storing programs, 3-13
using for data access, 13-2
Web and, D-3
LotusScript agents
restricting, 18-8
LotusScript browser window, 1-6
LotusXSL Processor
downloading, 15-17
LS:DO
using for data access, 13-2

M
Macros. See Agents
Mail
agents, 16-6
applications, 16-2
automating, 16-3
changing default font of, 4-8
customizing letterhead, 3-21
delivery, C-2
fields, 6-50, 6-52
fields for automatic, 6-51
forwarding, 16-4
linking, 16-3
MAPI classes and methods, C-5
sending, 16-3
workflow applications, 16-2
Mail option fields
examples, 6-55
Mail queue, C-2
Mail router, C-2
Mail Send dialog box, 6-51
MailFormat field, 6-52, 6-54

Index-12 Application Development with Domino Designer

Mail-in Database
agents and, 16-6
creating, 16-5
Mail-in Database documents
described, 16-5
MailOptions field, 6-52
Main class name
described, 11-3
Manager access
actions, 18-4
privileges, 18-6
MAPI. See Messaging application
progam interface (MAPI)
Master design copies
creating, 19-9
Menu bar
described, 1-5
Menus
actions, 10-12
displaying, 14-4
hiding choices, 9-27
shortcut keys, 10-65
simulating for Web users, 10-13
Messaging
adding Sametime to an
application, 3-27
Messaging application program
interface (MAPI)
Address Book provider, C-1
classes and methods, C-5
Message Store provider, C-2
Message Transport provider, C-2
platforms, C-3
requirements, C-3
service providers, C-1 to C-2
spooler, C-2
Metadata
passing, 6-51
Metric measurement
described, 6-12
Microsoft files
importing from and exporting
to, B-1
Microsoft Internet Information
Server (MIIS), E-2
Microsoft Office Library template
described, A-2
Mobile applications
designing, 2-12
hiding elements from, 2-12
Multilingual applications
designing for, 2-19
URL commands, E-30

N
Named elements
formulas for, 9-8
Names
displaying, 6-21
entering from a list, 6-22
Names dialog box
displaying, 6-22
Names fields
described, 6-21
in Web applications, D-4
Naming
ACL entries, 18-13
categories, 7-44
forms, 5-9
frames, 8-4
framesets, 8-3
views, 7-9
Navigating
Web sites, 7-60, 9-27
Navigation
in Notes and Web
applications, 2-5
Navigator templates
forms as, 7-65
Navigators
accessibility of, 9-18
actions in, 9-18
adding objects to, 9-18
color, 9-22
creating, 9-19
designing, 9-17
displaying, 9-26
editing, 9-19
embedding, 9-27
examples, 9-24
formulas and, 9-24
graphics and, 9-20
highlighting, 9-22
hotspots and, 9-22
imagemaps and, 9-30
importing, 9-29
opening, 9-26
programming, 9-18
renaming, 19-17
scripts and, 9-24
styling, 9-22
templates and, 7-65, 9-28
testing, 9-30
text on, 9-22
Web, D-8
WebQuerySave events, 7-65

No access
assigning, 18-4
privileges, 18-6
Note ID
finding documents by, 21-27
Notes
hiding views, 7-70
Notes applications
planning, 2-1 to 2-2
running on Web, 2-2
Notes Browser
previewing in, 3-25
Notes classes
setting up applet access to, 11-13
Notes client
Web applications and, 2-8, 6-46
NOTES.INI file
Default_Index_Lifetime_Days,
7-71
recording debugging
information, 10-52
Notes/FX
enabling, 14-20
using, 14-19
Web applications, D-4
NotesFlow
actions, 14-2
applications, 14-1
field-exchange, 14-2
NotesLog class debugging
setting up, 10-53
NSF files
creating, 3-6
NTF files
creating, 19-14
defined, 3-2, 19-27
Designer, A-1
Number fields
described, 6-11
Numbering
documents, 7-24
Numbers
columns for, 7-21
formatting in Number fields, 6-12

O
Object parameter
in Java applets, 11-18
Objects
drawing, 9-20
embedding, 14-2
enhancing, 9-22
hiding, 14-16

hotspot, 9-22
launching, 14-1, 14-9, 14-13
linking, 14-2
referencing with JavaScript, 2-10
resizing, 14-6
updating, 14-8
viewing properties and events
of, 1-6
Objects tab, 1-6
OCX. See Custom controls
ODBC
connecting to, 13-9
data sources, 13-14
Datalens and, 13-14
described, 13-1
using, 13-13
views, 13-15
Offline Subscription Configuration
profile document
creating, 22-5
editing, 22-3, 22-5
Offline subscriptions
overview, 22-1
OLE
actions and, 14-17
applications, 14-1
autolaunching objects, 14-12
automating, 14-17
connecting to, 13-9
custom controls, 14-2
exchanging data, 14-19
launch properties, 14-11
launching in-place, 14-12
LotusScript, 14-2
property sheets and, 14-7
publishing actions using, 14-18
resizing, 14-6
Web and, 14-1
OLE custom controls. See Custom
controls
OLE DB
connecting to, 13-9
OLE objects
autolaunching, 14-10
debugging, 14-5
launching, 14-13
opening with URL
commands, E-19
Online chat
adding to an application, 3-27
OpenAbout command
described, E-9
OpenAgent command
described, E-10

Index-13

OpenDatabase command
described, E-4
OpenDocument command
described, E-14
OpenElement command
described, E-19
OpenFileResource command
described, E-12
OpenForm command
described, E-10
SearchDomain and, E-20
SpecialAction argument and, E-25
OpenFrameset command
described, E-10
OpenHelp command
described, E-9
OpenIcon command
described, E-9
OpenImageResource command
described, E-12
OpenPage command
described, E-17
OpenServer command
described, E-4
OpenView command
described, E-4
optional arguments, E-7
Ordered lists
in Web applications, D-6
OtherDomainServers group
access level, 18-13
Outline applet
described, 2-11
using, 9-16
Outline entries
adding graphics to, 9-9
customizing, 9-7
customizing twisties, 3-24
described, 9-3
displaying as a hierarchy, 9-10
hiding, 9-9
named elements and, 9-8
styles for, 9-15
Outline views
described, 7-2
Outlines
accessibility of, 9-3
creating, 9-3
described, 1-12
displaying in framesets, 9-17
embedding, 9-5
imagemaps and, 9-1
public access for, 9-7

styles for, 9-15


using aliases with, 9-3
Overriding
default form selection, 5-7
Form processed confirmation,
5-48, 6-51
proxy settings for previewing,
3-26

P
Page breaks
in views, 7-40
Pages
adding XML to, 15-8
backgrounds for, 4-19
compared to forms, 4-1
creating, 4-3
deleting, 4-4
described, 4-1
displaying, 4-5
elements on, 4-1
embedding controls on, 4-21
events for, 4-37
fonts in, changing, 4-8
graphics on, 4-17
HTML and, 4-23
Java applets and, 4-20
JavaScript and, 2-11
launching, 19-26
launching into framesets, 8-10
layers on, 4-26
links and, 4-13
opening, E-17
programming, 4-37
styling text in, 4-6
Palettes
blending colors, 3-17
choosing colors, 4-15
Panes
shortcut keys, F-10
Password fields
described, 6-28
Passwords
URL commands and, E-25
PCX files. See Graphics
Percentage
calculating, 7-38
formatting numbers as, 6-12
Performance
computed fields and, 6-33
forms and, 5-59
lookups and, 6-26
Web, 2-12

Index-14 Application Development with Domino Designer

Perl script
Web applications and, E-31
Persistence
Java applets, 11-15
session, 12-6
Personal Address Book
using to enter names, 6-26
Personal agents. See Private agent
Personal Journal template
described, A-2
Pictures. See Graphics
Pop-up calendar controls, D-4
Pop-ups
creating, 10-25 to 10-26
Precision
in Number fields, 6-12 to 6-13
Predefined fields
list of, 6-50
Preferences
colors in a view, 7-52
PreFormat
described, E-8
Preview buttons
described, 1-5
Previewing
applications, 3-25
databases, 19-26
documents, 19-26
framesets, 8-3
hiding information during, 6-42
setting up, 3-26
Printing
headers and footers, 5-16
hidden information, 2-14, 6-43
restricting, 18-43
Private agents
controlling, 10-42
Web users and, 10-42
Private keys. See Encryption keys
Private views
customizing, 7-6
described, 7-5
Privileges
access level, 18-6
Profile documents
creating, 5-37
defined, 5-36
view columns and, 7-52
Profile forms. See Profile documents
Programmable tables
described, 4-9
Programming
columns, 7-24
navigators, 9-18

Perl script in Web


applications, E-31
tables, 4-9
views, E-4
Programs
creating for events, 10-28
Prompts
creating, 5-40
Properties
action hotspots, 10-27
changing, 19-24
changing database and design
element, 19-24
for Java applets, 11-8
setting for OLE objects, 14-7
Properties boxes
shortcut keys, F-5
Property sheets
using with OLE objects, 14-7
Protecting
design elements, 19-41
designs, 19-41
Proxy settings
for previewing in browsers, 3-26
Public access
agents, 18-43
assigning, 18-8
defined, 18-43
documents, 18-43
forms, 18-43
framesets and, 8-3
outlines, 9-7
style sheets, 18-43
views, 18-43
Public documents
access to, 18-8
creating, 18-43
Public keys
document encryption, 18-48
PublicAccess field, 18-43
Purge interval
deletion stubs and, 20-10

R
RANGE statement
described, B-8
Read access
restricting, 18-42
Read access list
described, 18-41
forms, 18-41
Reader access
actions, 18-4

privileges, 18-6
Readers field
creating, 18-32
updating, 18-35
Readers fields
checking, 19-21
creating, 18-30
ReadExternalData parameter
in Java applets, 11-16
ReadForm command
described, E-12
ReadViewEntries
described, E-6
Records
importing, 13-11
Redesigning
forms, 19-20
templates, 19-28
Redirect command
described, E-4
domain search and, E-20
Reference list
using, 6-33
Reference tab, 1-6
Refreshing
choice list field values, 6-41
defined, 19-36
designs, 19-38
field values, 6-33
Java applets, 11-12
views, 7-71
Relational databases
accessing with ODBC, 13-13
connecting to, 13-1
Renaming
agents, 19-17
databases, 19-17
fields, 6-6, 19-22
forms, 19-17
navigators, 19-17
shared fields, 6-4
views, 7-9, 19-17
Replace Design command
defined, 19-38
Replica IDs
assigning access by, 18-19
Replica stubs
defined, 21-31
troubleshooting, 21-32
Replicas
conflicts, 5-13, 21-19
controlling changes, 18-14
copying to servers, 20-2
creating, 20-6

deletion stubs in, 21-33


deletions, 20-10, 21-32 to 21-33
limiting content, 20-10, 20-14
settings for, 20-7
size of, 21-30
Replication
CD-ROM updates, 20-14
commands, 20-7, 20-19
customizing, 20-8
database design and, 21-30
disabling, 20-13, 20-18, 21-32
document size and, 20-11
editing conflicts and, 21-34
enabling, 20-18
encryption and, 20-7
enforcing consistent ACL, 18-21
examples, 20-16
forcing, 20-19
forms and, 5-13
history, 21-16
log file, 21-18
monitoring, 21-16
non-document elements, 20-12
planning, 20-6
purge interval for, 20-10
selective, 20-10
settings, 20-7 to 20-8, 20-15
specifying dates, 20-11
templates and, 19-40
troubleshooting, 21-28 to 21-33
Web applications, 22-14
WebDAV and, 17-10
Replication conflicts
merging, 5-13
Replication formulas
using, 20-11
Replication history
clearing, 21-17
displaying, 21-17
specifying dates, 20-11
Replication or save conflicts
consolidating, 5-13, 21-20
described, 21-19
preventing, 21-20
Replication priority
assigning, 20-13
Replies
automating, 16-6
Reserved fields
$Anonymous, 18-34
$PublicAccess, 18-43
$UpdatedBy, 18-34
$VersionOpt, 6-56
billing, 5-41

Index-15

Categories, 6-51
contact printing, 5-44
FolderOptions, 6-51, 6-57
HTML, 6-51
list of, 19-21, 6-50, 6-56
SecretEncryptionKeys, 6-51
Reserved form names
for navigator or view
templates, 7-65
Response documents
columns for, 7-48
displaying, 7-29
indenting, 7-47
inheriting subject, 6-49
limits on, 7-4
Response forms
testing, 5-60
Response hierarchy
creating, 5-17
Restricted LotusScript/Java
operations
in agents, 10-59
Restricting
copying, 18-43
design changes, 19-9
editing, 18-31
forwarding, 18-43
printing, 18-43
RestrictToCategory
OpenView and, E-6
ReadViewEntries and, E-8
ReturnReceipt field, 6-52
Review requests
in workflow applications, A-1
Revision tracking
described, 5-18
Revisions field
described, 19-21
RGB colors
for views, 7-27
Rich text fields
described, 6-7
on Web, 6-9
Rich text lite fields
described, 6-7
Roles
assigning in ACL, 18-9
creating, 18-10
Rounding
in Number fields, 6-12
Route. See Navigators, Outlines
Routing
automatic, 16-2

Rows
opening to, 7-40
spacing, 7-38
styling, 7-38

S
Sametime
adding to an application, 3-27
Save conflicts
consolidating, 21-20
described, 21-19
SaveDocument command
described, E-15
SaveOptions field, 6-53
Schedules
coordinating, 5-29
Scientific notation
described, 6-12
Screen-reader software
designing for, 2-15
Script area, 1-6
Script libraries
defined, 3-13
Scripts
creating, 10-28
deleting, 10-28
Search forms
described, 5-50
Search results
displaying, E-20
navigating, 5-57, E-24
SearchDomain command
described, E-20
SearchEntry command
described, E-21
SearchFuzzy command
described, E-21
Searching
domains, E-20
URL commands and, E-20
SearchSite command
count parameter, E-23
described, E-21
optional arguments, E-21
start parameter, E-23
SearchView command
count parameter, E-23
examples and syntax, E-21
optional arguments, E-21
start parameter, E-23
Secret encryption keys. See
Encryption keys

Index-16 Application Development with Domino Designer

Sections
access to, 18-36
collapsing, 18-36
creating, 4-12, 18-36
defined, 5-4
editors and, 18-36
hiding titles, 18-36
signing, 18-60
Secure Sockets Layer. See SSL
Security
agents, 10-41,12-4
CGI programs, 12-4, E-32
database, 18-20
database encryption, 18-45
decrypting data, 18-56
described, 18-1
documents, 18-29
electronic signatures, 18-60
encryption, 18-45
folders, 18-41
for automation, 10-62
for Notes and Web
applications, 2-3
hidden fields and, 6-42
Java applet access to Notes
classes, 11-13
servlets, 12-4, 12-8
signatures and, 18-57
SSL certificates, E-25
URL commands and, E-25
Selection formulas
for views, 7-15
SendTo field, 6-53
Server certificate request
creating, E-27
Server commands
OpenServer, E-4
Redirect, E-4
Server tasks
Designer, 3-2
Updall, 7-71
ServerRequest command
examples, E-27
fields, E-28
syntax, E-27
Servers
access levels for, 18-3
console commands, 10-49
restricting creation of databases
on, 10-43
Service providers
installing, C-3
Servlet API, 12-4

Servlet classes
loading, 12-6
Servlet manager, 12-5
Servlets
compared to agents and CGI
programs, 12-2
example, 12-9
security for, 12-4
WebSphere and, 2-14
XML, 15-15
servlets.properties file
example, 12-9
sessdata.ser, 12-6
Sessions
tracking, 12-6
SGML
defined, 15-7
Shared actions
creating, 10-17
defined, 10-2
editing, 10-21
inserting, 10-17
Shared agents
controlling, 10-42
defined, 10-5
Shared databases
described, 16-2
Shared fields
converting, 6-2, 6-4
copying, 6-2
creating, 6-3
deleting, 6-4
inserting, 6-3
multilingual, 6-5
renaming, 6-4
stored forms and, 5-6
Shared graphics. See Image resources
Shared resources
across databases, 3-12
deleting, 3-16
described, 3-12
exporting, 3-16
files, 3-14
for Java applets, 11-10
non-NSF files as, 3-13
refreshing, 3-15
Shared views
described, 7-5
Shortcut keys
cursor, F-8
databases, F-4
defined, F-1
Designer, F-3
dialog boxes, F-5

documents, F-6
enabling, F-1
folders, F-10
form names, 5-11
menu choices, 10-65
panes, F-10
properties boxes, F-5
text, F-7
text properties, F-9
tools, 17-2
views, 7-11, F-10
Sign field, 6-53
Signatures
attaching to documents, 18-60
defined, 18-38
storing, 18-58
Signing
documents, 18-60
Simple actions
defined, 10-2
table of, 10-54
Simple agents. See Agents
Simple functions
for columns, 7-29
Site map. See Navigators, Outlines
Size
attachments, 20-11
database, 20-5, 21-9
replica, 20-10, 21-30
Size property
for Java applets, 11-8
SmartIcons
toolbar, 3-7
Soft deletions
described, 7-74
Sort order
columns, 7-36
in subscriptions, 22-23
in views, 7-33
SpecialAction argument
described, E-25
SSL
creating user certificates, E-26
Internet security and, 18-25
server certificate request, E-27
URL commands and, E-25
Start parameter
search results and, E-24
Statlog task
database activity reporting, 21-21
statistics, 21-22
user activity reporting, 21-23
Status tracking
described, 7-48

Stop Java applet


described, 11-11
Storing
files for Java applets, 11-1
forms with documents, 5-5, 6-51
Java code, 3-13
LotusScript programs, 3-13
programs, 12-3
Structured text files
defined, B-5
exporting to, B-12
importing into views, B-5
Style editor applet. See Editor applet
Style sheets
public access, 18-43
XSL, 15-9
Style sheets, cascading. See CSS
Styles
CSS, 2-9
Stylesheets
DXL, 15-3
Styling
columns, 7-38
frames, 8-6
horizontal rules, 4-8
navigators, 9-22
rows, 7-38
titles, 7-17
views, 7-38
Subcategories
described, 7-45
Subforms
creating, 5-22
defined, 3-13, 5-4
described, 5-22
examples, 5-24
inserting, 5-23
layers on, 4-26
securing, 18-30, 18-41, 18-43,
18-47
Subject field, 6-49
Submit button
on Web, 2-12
SubmitCert command
examples and syntax, E-26
fields, E-27
Subscription documents
storing, 6-31
Subscription forms
creating, 3-12
Subscriptions
described, 6-30
enabling, 3-11

Index-17

Subscriptions, offline
overview, 22-1
Symbols
currency, 6-13
Symphony files
importing into views, B-3
Synopsis. See Design synopsis
System actions
creating, 10-12

T
Tab order
specifying for fields, 6-39
Tabbed tables
described, 4-9
Tables
creating, 4-3
in editor applet, D-6
in Web applications, D-8
programmable, 4-9
Tabular text files
COL files and, B-8, B-11
defined, B-4
exporting to, B-11
importing into views, B-4, B-11
Target frames
order of precedence, 8-9
specifying, 8-9
TeamRoom template
described, A-2
Templates
agents and, 19-28
changing, 19-27, 19-35
customizing, 19-28
defined, 3-2, 19-27
design changes and, 3-3
Designer, A-1
examples of, 19-29
fields in, 6-49
linking to, 19-31 to 19-32
master, 3-2
navigator, 9-28
redesigning, 19-28
replacing design and, 19-38
replication and, 19-35, 19-40
server, 3-3
unlinking, 19-42
unlinking design elements
from, 19-41
updating databases with, 19-33
Terminations group
adding names to, 18-15

Testing
applications, 19-16
design, 19-11
forms, 5-60, 19-10
navigators, 9-30
response forms, 5-60
views, 19-12
Text
computed, 4-7
fields, 6-7
graphics with, 6-44
navigators and, 9-22
styling, 4-6
Web, D-10
Text files
exporting, B-11
importing to a view, B-4 to B-5
Text pop-ups
creating, 10-25
defined, 10-4
deleting, 10-25
editing, 10-25
Text properties
shortcut keys, F-9
Thousands separator
setting, 6-12
TIFF files. See Graphics
Time
displaying, 7-19
entering, 6-14
formatting, 6-14, 6-17, 7-19
formula language, 6-18
ranges, 6-14
Time controls
creating, 6-19
in Web applications, D-4
Time zones
fields, 6-35
setting for Domino Off-Line
Services subscriptions, 22-23
setting for Web applications, E-28
Title field
described, 5-6, 19-21
Titles
database, 3-3
frameset, 8-3
window, 5-20
Toolbars
customizing, 3-7
Tools
customizing, 17-1 to 17-2
organizing on the Tools menu,
17-3
shortcut keys, 17-2

Index-18 Application Development with Domino Designer

Totals
calculating, 7-38
Tracking
document status, 7-48
editors, 18-34
server usage, 5-41
sessions, 12-6
unread documents, 7-49
versions, 5-18, 6-56
TranslateForm argument
described, E-26
Translation
applications, 2-19, 6-27
Domino Global Workbench, 2-19
foreign symbols and
characters, B-2
Translation formulas
defined, 6-32
setting for fields, 6-36
Trash folders
creating, 7-74
designing, 7-73
in Web applications, 7-74
soft deletions and, 7-74
Tree style outline
described, 9-10
Troubleshooting
agents, 10-46
calendar views, 7-58
database access, 21-26
database design changes, 21-30
database performance, 21-25
documents in log file, 21-27
fields, 19-21
framesets, 8-10
Java applets, 11-18
OLE object error, 14-5
replication, 21-28 to 21-33
Truncation
in imported text, B-4
Twisties
customizing, 3-24

U
Underline
in Web applications, 6-9
Unlinking
design elements, 19-41
templates and databases, 19-42
Unread marks
color, 7-49
displaying, 7-49
Domino 5 users and, 7-49

Updall task
described, 7-71
UpdatedBy field
described, 19-21
tracking edits, 18-34
Updating
designs, 19-36
documents, 19-20
Java applet files, 3-13
objects, 14-8
views, 7-71
Upgrading
framesets and, 8-1
Java applets and, 11-1
URL commands
authentication and, E-25
count parameters, E-23
explicit, E-16
for opening resources, E-12
for setting user preferences, E-28
for Web applications, E-1, 3-28
guidelines, E-2
home page, 19-8
implicit, E-16
opening documents by key, E-15
searching and, E-23
server commands, E-4
ServerRequest, E-27
start parameters, E-23
syntax, E-2
XML and, E-6
URL links
pages and, 4-13
URLs
generating, E-3
servlet, 12-3
Use value as color option
described, 7-52
User activity
reporting, 21-23
statistics, 21-21
User names
aliases, 18-16
Web, 18-26
wildcards in, 18-13
User preferences
setting for Web applications, E-28
User types
assigning to ACL, 18-21
Users
access levels, 18-2
terminated, 18-15
Using Database document
creating, 19-3

inheriting from template, 19-29


opening, E-9

V
Values
recalculating for computed
fields, 6-33
refreshing, 6-41
Version control
conflict documents as, 5-13
field for, 6-51
forms for, 5-18, 6-56
tracking, 5-18, 6-56
VersionOpt field, 6-56
View applet
described, 2-11, 7-67
font support, 7-69
view properties and, D-11
View indexes
updating, 21-24
View lookups
choice list aliases and, 6-27
choice list fields and, 6-26
Names fields and, 6-22
View menu
working with framesets and, 8-4
View templates
defined, 7-60
forms as, 7-65
Views
@username and, 7-6
accessibility of icons in, 7-32
adding background images, 7-38
adding trash folder, 7-73
aliases and, 6-28, 7-9
All by Category, 7-46
allowing document selection on
Web, 7-69
calendar, 7-1, 7-4, 7-56
cascading, 7-11
categories and, 7-42
character sorting rules, 7-33
character translation file (.CLS)
and, B-2
COL files and, B-10
collapsing, 7-38
columns in, 1-11
compatibility, 7-23
copying, 7-7 to 7-8
creating, 7-7
creating documents, 7-50
creating trash folder, 7-74
customizing twisties, 3-24
database performance and, 21-27

default, 7-9, 7-50


defined, 1-11, 7-1
defining columns, 7-17
deleting, 7-7, 7-9
designing, 7-7
displaying, 7-40
displaying conflict
documents, 7-13
displaying gridlines, 7-38
displaying on the Web, 7-61
displaying with XML, 15-11
documents and, 7-12
Domino 5 users and, 7-49
editing documents, 7-50 to 7-51
embedding, 7-60 to 7-61
encrypted data and, 18-57
entering names from columns
in, 6-26
exporting, B-1, B-11 to B-12
formatting, 7-66
hide-when formulas and, 7-23
hiding, 7-10, 7-70, 9-27
hierarchy in, 5-17
HTML and, 7-66
icons in, 7-31
importing, B-1 to B-2
importing tabular text into, B-4
in Notes and Web
applications, 2-5
indenting in, 5-17
indexes, 7-71
InViewEdit event, 7-51
launching into framesets, 8-11
launching on Web, 7-66
limiting access, 18-40
limits on, 7-4
lookups in, 5-41
mapping imported columns to
fields, B-7
naming, 7-9
OBDC access, 13-15
opening, 7-40
page breaks and, 7-40
private, 7-5
programming, 7-12
public access, 18-43
refreshing, 7-71
renaming, 7-9, 19-17
searching, E-20
selecting documents to include
in, 7-12
setting column colors, 7-27
setting design for documents
in, 5-7

Index-19

setting line counts, 7-64


shared, 7-5
shortcut keys, F-10 to F-11
Simple Search conditions, 7-15
single category, 7-64
specifying field types of imported
columns, B-7
styling, 7-38
switching, 7-37
testing, 19-12
troubleshooting, 7-58
types of, 7-1
unread marks, 7-49
updating, 7-71, 21-24
URL commands and, E-4
user-customizable, 7-41, 7-52
Web, 7-3, D-10
Vision-impaired users
designing for, 2-15

W
Web
@commands and, 2-11
@functions, D-2
access levels, 18-3
actions, D-3
agents, D-3
authentication and, 18-18, E-25
CGI variables, E-32
creating forms for, D-5
displaying views, 7-61
documents, 5-11
example of agents, 10-38
fields and, D-4
file attachments on, 5-29
folders, 7-9
hidden fields and, 5-14
hiding design elements, 19-44
hiding views, 7-70
improving performance on, 2-12
LotusScript and, D-3
mailing features, 16-5
navigating, 7-60, 9-27
navigators, 7-65, 10-21, D-8
Notes/FX and, 14-2
Perl script, E-31
previewing requirements for, 3-27
private views and, 7-7
selecting documents in
views, 7-69
Server document and, 19-8
simulating Notes menus
for, 10-13

tables, D-8
text, D-10
unsupported features, D-1,
Shortcut keys, 6-22
views, 7-3, D-10
Web agent scripts
DocumentContext property, E-33
Web applications
color for, 2-9
designing, 2-8
displaying text in, 4-6
enabling for offline use, 22-1, 22-3
home pages for, 4-5
Notes client and, 3-1, 6-11
planning, 2-1, 2-8
programming, E-1
replacing dialog boxes, 2-7
replicating, 22-14
running on Notes, 2-2
URL commands, 3-28, E-1, E-12
Web control page
Domino Off-Line Services,
22-2, 22-4
Web elements
date picker, 4-22
embedding on pages, 4-21
Web links
displaying in views, 7-24
Web pages
home pages, 4-5
in frames, 8-5
Web users
access to forms, 5-12
access to outlines, 9-16
attaching files, 5-29
authenticating, 18-16
controlling access, 18-25 to 18-26
designing for Notes and, 6-47
Domino applets for, 2-11
WebDAV
configuring, 17-4
described, 17-1
editing databases with, 17-4
replication and, 17-10
WebQueryOpen events
agents and, 12-3
described, 10-38
WebQuerySave events
agents and, 12-3
described, 10-38
WebSphere
integrating with, 2-14
Width
columns, 7-38

Index-20 Application Development with Domino Designer

Window tabs
described, 1-5
Window titles
described, 5-20
WindowTitle field
described, 19-21
WKSCOL statement
described, B-8
Work area, Designer
described, 1-4
Workflow
applications, 14-1, 16-2
defined, 16-1
features, 16-3
overview, 16-1
Worksheet files
COL files and, B-6, B-8
exporting to, B-11
importing into views, B-3
WriteExternalData parameter
in Java applets, 11-16
WriteObject parameter
in Java applets, 11-18

X
XML
adding to forms and pages, 15-8
adding to views, 15-11
cascading style sheets and, 15-5
defined, 15-1, 15-7
exporting, 15-17
formatting with style sheets, 15-9
generating with an agent, 15-13
HTML and, 15-5
in Domino applications, 15-4
Java servlets, 15-15
tags, 15-4
terminology, 15-6
transforming, 15-17
viewing, 15-17
XSL
style sheets, 15-3
XML, 15-9
XSLT
defined, 15-7

Z
ZIP files
described, 11-4

You might also like