Académique Documents
Professionnel Documents
Culture Documents
Student Guide
Notices
DISCLAIMER: You may not copy, reproduce, translate, or reduce to any electronic medium or machinereadable form, in whole or in part, any documents, software, or les provided to you without prior written consent of IBM Corporation, except in the manner described in the documentation. While every reasonable precaution has been taken in the preparation of this manual, the author and publishers assume no responsibility for errors or omissions, nor for the uses made of the material contained herein and the decisions based on such use. Neither the author nor the publishers make any representations, warranties, or guarantees of any kind, either express or implied (including, without limitation, any warranties of merchantability, tness for a particular purpose, or title). Neither the author nor the publishers shall be liable for any indirect, special, incidental, or consequential damages arising out of the use or inability to use the contents of this book, and each of their total liability for monetary damages shall not exceed the total amount paid to such party for this book. TRADEMARK NOTICES The following terms are trademarks or service marks of International Business Machines Corporation in the United States, other countries, or both: DB2, Domino, Domino Designer, Domino.Doc, Everyplace, ibm.com, K-station, LearningSpace, Lotus, Lotus Discovery Server, Lotus Enterprise Integrator, Lotus Notes, Lotus Workow, Mobile Notes, Netnity, QuickPlace, Rational, Sametime, Tivoli, VisualAge, WebSphere, Workplace, Workplace Messaging, and WorkPlace Shell. Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc., in the United States, other countries, or both. Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. Intel, Intel Inside (logos), MMX and Pentium are trademarks of Intel Corporation in the United States, other countries, or both. UNIX is a registered trademark of The Open Group United States and other countries. Linux is a trademark of Linus Torvalds in the United States, other countries, or both. Copyright 2007 IBM Corporation.
Lotus software, IBM Software Group One Rogers Street Cambridge, MA 02142
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. All rights reserved. Licensed Materials - Property of IBM US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corporation. You must purchase one copy of the appropriate kit for each student and each instructor. For all other education products you must acquire one copy for each user or you must acquire a license for each copy provided to a user.
Table of Contents
Fundamentals of IBM Lotus Domino 8 Application Development Lesson 1: Exploring Applications in IBM Lotus Domino 8
Topic A. Identify Application Types and Data Sources. . . . . . . . . . . . . Lotus Domino Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . Domino Application Types . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Topic B. Examine the IBM Lotus Domino Architecture . . . . . . . . . . Lotus Domino Infrastructure . . . . . . . . . . . . . . . . . . . . . . . . . . Clients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Application Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lotus Domino Application Structure . . . . . . . . . . . . . . . . . . . Access Document Properties . . . . . . . . . . . . . . . . . . . . . . . . . Topic C. Examine IBM Lotus Domino Application Components . . Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Task Automation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Security Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Topic D. Investigate Replication and Application Design Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Replication Considerations . . . . . . . . . . . . . . . . . . . . . . . . . .
2 3 4 4 4 5 6 7 11 15 19 19 19 19 19 20 20 21 24 24
Topic E. Extend IBM Lotus Domino Collaboration Capabilities . . . Lotus Domino Extended Products . . . . . . . . . . . . . . . . . . . . . IBM Workplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other Products and Technologies . . . . . . . . . . . . . . . . . . . . .
24 25 27 27
32 34 34 34 36 36
40 42 42 43 44 47 47 49 49 49 49
54 55 55 55 56 56 57 57 58 60 60 60 61 62 64 64 64 64 67 68 69 75 77 77 79 79
88 89 91 92 94 96 96 97 98 98 99 99
List Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Name Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Numeric Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Date/Time Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Topic C. Hide Form Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 The Hide/When Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Conditions for Using Hide/When . . . . . . . . . . . . . . . . . . . . . . 110
Topic B. Add View Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 View Columns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 View Column Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 View Column Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Topic C. Organize Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Document Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Sorted Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Categorizing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Topic D. Format Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 View Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Topic D. Compute and Compare Values . . . . . . . . . . . . . . . . . . . . . . . . 161 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Computed Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Order of Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Comparison Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Topic E. Work with @Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 @Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Common @Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Conditional Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Topic F. Explore Formatting and Comments . . . . . . . . . . . . . . . . . . . . . 168 Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
Topic C. Work with Field Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Input Translation Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Text Formatting Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Input Validation Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Validation Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Examples of Input Validation Formulas . . . . . . . . . . . . . . . . . 187 Topic D. Work with Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 List Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 List Choices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 The @DbColumn Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 Topic E. Prompt Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 The @Prompt Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Topic F. Create Reusable Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Reusable Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Reusable Code Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Topic G. Implement Error Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Run-Time Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 The @StatusBar Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Error Generation and Reporting . . . . . . . . . . . . . . . . . . . . . . . 199 Error-Handling Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Topic C. Display Icons In a View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 Displaying Icons In a View . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 Creating a Column Icon Formula . . . . . . . . . . . . . . . . . . . . . 216 Predened Icon Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 Adding a Custom Icon to a View Column. . . . . . . . . . . . . . . 218
Topic D. Enable Inheritance in Forms and Documents . . . . . . . . . . . . . 236 Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Enabling Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 Topic E. Create Related Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 Related Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 Designating a Form as a Response . . . . . . . . . . . . . . . . . . . . 243 Document Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 Inheritance and Related Documents . . . . . . . . . . . . . . . . . . 245 Threaded Discussions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 Topic F. Enable AutoSave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 The AutoSave Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 The Autosave Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 Topic G. Implement IBM Lotus Sametime Instant Messaging in Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Instant Messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Online Status Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 Instant Messaging Contact List . . . . . . . . . . . . . . . . . . . . . . . 253
Topic E. Create Views for the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 View Display Considerations . . . . . . . . . . . . . . . . . . . . . . . . . 274 Embedded Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 View Display Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 Displaying an Embedded View using the View Applet . . . . 275 Displaying an Embedded View using HTML . . . . . . . . . . . . . 277 Using View Properties to Control the Display of Embedded Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 Exploring View Display in the Web Browser . . . . . . . . . . . . . . 279 Link Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Topic C. Control the Display of Actions . . . . . . . . . . . . . . . . . . . . . . . . . 295 Sub Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Action Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Hiding Actions and Action Buttons. . . . . . . . . . . . . . . . . . . . . 297 Action Buttons, Split Action Buttons, and Right-click Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 Action Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 Web Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 Topic D. Create Action Hotspots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 Hotspots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Appendix B: The Worldwide Corporation Infrastructure Plan Appendix C: Extend IBM Lotus Domino Software Appendix D: Certication and Exam Competencies Appendix E: Instructor Preparation Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Course Description
Target Student
The target audience for this course is application developers who are new to developing Lotus Domino applications and who need to acquire the fundamental skills to develop and modify single-database applications in IBM Lotus Domino Designer 8.
Course Prerequisites
The prerequisites for this course include experience using the IBM Lotus Notes client, Web browser or both to access applications. Experience in developing one or more applications using other application development tools is recommended.
Introduction
As a Review Tool
Some of the information covered in class may not be relevant to your environment immediately, but it may become important later on. For this reason, we encourage you to spend some time reviewing the topics and activities after the course. The course can also be used in preparation for Lotus certication exams.
As a Reference
The organization and layout of the book make it easy to use as a learning tool and as an after-class reference. You can use this book as a rst source for denitions of terms, background information on given topics, and summaries of procedures.
ii
Introduction
Course Objectives
After completing this course, you should be able to: Receive an overview of application types, data sources, and how they are deployed in the IBM Lotus Domino architecture. Explore the IBM Lotus Domino Designer user interface and accessed design elements. Create an original application structure, an application structure copied from a previously designed application, and an application structure based on a template. Create pages and populate them with text, images, and tables. Create forms and insert form elements in them. Create formatted views. Create formulas and learn about programming languages that can be used in conjunction with Domino. Use formulas in conjunction with forms. Select and manipulate data for use and display in views. Work with layers, subforms, instant messaging, and autosave features. Work with hierarchical views, response data, shared columns, and instant messaging features related to views. Work with actions to automate tasks. Work with agents to automate tasks. Receive an overview on application security. Receive an overview on how to deploy an application.
Introduction
iii
Course Requirements
Hardware
Primary Classroom Server
The following list details the minimum hardware necessary for the setup of the primary classroom server: At least 1 GB of RAM per CPU. However, for optimal performance, you might need to use 2 GB or more. A Pentium class (or higher) processor and compatibles. A Pentium 4, 2.6 GHz, processor is recommended. An SVGA (or better) video card and monitor. Support for 256 colors, 800 x 600 resolution. At least 4 GB (per partition) of free hard disk space. 8 GB of free disk space is recommended. For disk swap space, at least twice the amount of installed RAM. A mouse or other pointing device. A CD-ROM drive or access to a network le server for installation.
iv
Introduction
Software
Primary Classroom Server
The following software is required for the primary classroom server. Please note that proper licensing for all software is required and is the responsibility of the training organization. Microsoft Windows Server 2003 (Standard or Enterprise Edition) (the latest Service Pack is recommended, but not required) or Microsoft Windows 2000 Server (or Advanced Server) with Service Pack 4. IBM Lotus Domino 8.
Class Setup
Domino Naming Used in This Course
This course uses the following hierarchical naming scheme. Table 0-1: Domino naming scheme
Naming Component Organization certier Domain Instructor server Classroom Implementation /WWCorp WWCorp Hub/SVR/WWCorp
Introduction
WWCorp certier ID le
wwcorp.id
Hub/SVR/WWCorp servers ID le
hub.id
dnotes.id
dnotes.nsf snd##.nsf
vi
Introduction
Practice application. This application is used mainly in guided activities. Instructor Demo application. Although its use is primarily for your instructor to demonstrate tasks and features, you will occasionally access this application during the course. Policies and Procedures application. You will create this application by completing the practice activities in this course.
The following table describes the course data les. Table 0-3: Course data les
File Name Instructor_D8510.nsf Policies7Start.nsf Policies10Start.nsf Policies12Start.nsf Policies14Start.nsf PoliciesACL.nsf Practice_D8510.ntf PoliciesFinal.nsf PracticeFinal.nsf D8510_Graphics.zip PagesForms.exe Replication.exe Function Instructor demonstrations Helpful lab starter les to be used as necessary
Lesson 14 lab le Student activity practice template Completed lab les Completed activity les Instructor les
Introduction
vii
The IP addresses can be any convenient value, consistent with the existing network conguration. Congure the network for the TCP/IP protocol, using the following settings: IP address: 192.168.1.100 Subnet Mask: 255.255.255.0
Follow these steps to install the Lotus Domino server software on the classroom server. Table 0-6: Install Lotus Domino server software on the classroom server
Step 1 Action Run the Lotus Domino 8 server install program, Setup.exe, from a CD-ROM or other installation medium. On the Welcome screen, click Next. Read the Software License Agreement, and then click I accept the terms in the license agreement to agree with the terms. Click Next. Accept the default location for the installation les. Click Next.
2 3
viii
Introduction
6 7 8
Task 2: Install the Required Client Software on the Instructor and Student Machines
Follow these steps to verify settings on the instructor and student clients. Table 0-7: Verify the settings on the instructor and student client computers
Step 1 Action Prior to starting the installation, verify the appropriate data and time settings are congured for your locale. The IP addresses can be any convenient value, consistent with the existing network conguration. Congure the network to use the TCP/IP protocol, with the following settings: IP address: 192.168.1.200 through 192.168.1.213 Subnet Mask: 255.255.255.0
Follow these steps to install the Lotus Notes, Lotus Domino Administrator, and Lotus Domino Designer software on the instructor client. Table 0-8: Install software on the instructor client computer
Step 1 Action Run the IBM Lotus Notes 8 client install program, Setup.exe, from a CD-ROM or other installation medium. On the Welcome screen, click Next. Read the License Agreement. Select I accept the terms in the license agreement, and then click Next. Accept the default folders to change the location to install Lotus Notes. Click Next.
2 3
Introduction
ix
6 7
Follow these steps to install the Lotus Notes and Lotus Domino Designer client software on the student clients. Table 0-9: Install software on the student client computers
Step 1 Action Run the Lotus Notes 8 client install program, Setup.exe, from a CD-ROM or other installation source. On the Welcome screen, click Next. Read the License Agreement. Select I accept both the IBM and the non-IBM terms, and then click Next. Accept the default folders, or click Browse to change the location to install Lotus Notes. Click Next. On the Features Setup screen, select Domino Designer, and click Next. Verify the installation summary screen and click Install. When the Install Wizard completes, click Finish.
2 3
5 6 7
Task 3: Install Supplied Files to the Classroom Server and Instructors Client Computer
Follow these steps to install the needed les for the classroom server. Table 0-10: Install the classroom les on the classroom server
Step 1 2 3 Action Insert the course CD-ROM in the classroom server. On the course CD-ROM, explore the D8510 folder. Open the Data folder.
Introduction
Introduction
xi
Action On the Choose your organization name screen: Select I want to use an existing certier ID le. Click Browse and navigate to the wwcorp.id le, and then click Select. Click Customize, and select I want to use an existing organizational unit certier ID le. Click Browse and navigate to the svr.id le, and then click Select. Click OK. In the Enter Password dialog box, type lotusnotes, and click OK. Click Next. In the Enter Password dialog box, type lotusnotes, and click OK.
8 9
For the Domino domain name, type WWCorp and click Next. On the Specify an Administrator name and password screen complete these steps: Select I want to use an existing Administrator ID le. Click Browse and navigate to the dnotes.id le, and then click Select. Click Next.
In the Enter Password dialog box, type lotusnotes and click OK.
11
For Internet services, select Web Browsers (HTTP services) and Directory services (LDAP services), and click Next. Review the default enabled port drivers and host name. To change these settings: Click Customize. Disable the NetBIOS over TCP/IP port driver. Type the fully qualied Internet host name for the server, hub.wwcorp.com. Click OK. Click Next.
12
13
On the Secure your Domino Server screen, accept the defaults and click Next. Review the information selected during this session. To conrm setting up the server with this information, click Setup. When setup completes, click Finish.
14
15
xii
Introduction
17 18
Modify the notes.ini le to by adding Create_R8_Databases=1 To start the server from Windows, click StartAll ProgramsLotus ApplicationsLotus Domino Server. Verify that Start Domino as a Windows service is selected and click OK. Note: The server may take several minutes to initialize. Wait for initialization to complete before attempting to connect to the server.
Select I want to connect to a Domino server, and click Next. 4 If necessary, select Set up a connection to a local area network, and click Next. If necessary, for the Domain server name, type Hub/SVR/WWCorp Select TCP/IP as the network type, and enter 192.168.1.100 or an assigned IP address. Click Next.
Introduction
xiii
7 8 9
10 11 12
From the Preferences list, select Notes Ports, and clear LAN0 and COM1. Click OK to close Preferences. Click OK in the warning dialog box. Changes will take effect once Lotus Notes is restarted. Exit Lotus Notes.
13
Follow these steps to set up the student workstations. Table 0-13: Set up the student workstations
Step 1 2 Action Click StartAll ProgramsLotus ApplicationsLotus Notes 8. On the Welcome screen, click Next.
xiv
Introduction
Where ## is the student number assigned to each student (0112) Domino server: Hub/SVR/WWCorp Select I want to connect to a Domino server, and click Next. 4 5 If necessary, set up a connection to a local area network, and click Next. If necessary, for the Domain server name, type Hub/SVR/WWCorp Select TCP/IP as the network type, and 192.168.1.100 or an assigned IP address. Click Next. If the ID is not found in the Domino Directory, the setup program will request the location of the Notes ID le. To locate the Notes ID le: a. Click Browse, select Student##.id, and then click Open. b. Click Next. c. Click Yes to copy the ID le to the local data directory. If the user ID is stored in the Domino Directory, the setup program will copy the ID le to the local data directory automatically. 7 On the Additional Services screen, it is not necessary to select any additional services for this course. Click Next. When the Lotus Notes setup is complete, click OK. Click FilePreferences and click Basics Notes Client Conguration. In the Additional Options section, select the following options if not already selected, and then click OK. Enable Java applets Enable JavaScript Use Web palette
8 9 10
11 12 13
From the Preferences list, select Notes Ports, and clear LAN0 and COM1. Click OK to close Preferences Click OK in the warning dialog box. Changes will take effect once Lotus Notes is restarted. Exit Lotus Notes. Copy the graphic folder and all its les to Lotus/Notes/Data.
14
Introduction
xv
Course Icons
The following table explains the icons used in this course. Table 0-14: Course Icons
Icon Description An activity is a student-centered learning process that allows students to learn by performing a task. Activities can be instructor-led or completed independently. Scenario information is used to introduce an activity problem or goal. Scenarios use ctitious people and organizations to present details, problem statements, and parameters that are used to complete the activity or lab exercise. Caution statements are included in the courseware to make students aware of potential negative consequences of an action, setting, or decision, that are not easily known. Tips and notes provide additional information, guidance, or a hint about a topic or task. An Instructor Note is a special comment to the instructor regarding delivery, classroom strategy, classroom tools, exceptions, and other special considerations. The Instructor Note is included in the Instructor Guide only. Display Slide provides a prompt to the instructor to display a specic slide. The Display Slide icon is included in the Instructor Guide only.
xvi
Introduction
Topic A: Identify Application Types and Data Sources Topic B: Examine the IBM Lotus Domino Architecture Topic C: Examine IBM Lotus Domino Application Components Topic D: Investigate Replication and Application Design Considerations Topic E: Extend IBM Lotus Domino Collaboration Capabilities
Introduction
After completing this lesson, you should be able to: Identify the types of applications you can create with IBM Lotus Domino Designer, and where the data with which to create these applications can come from. Examine the IBM Lotus Domino architecture. Identify the security layers that protect Lotus Domino applications. Describe the considerations involved in replicating applications. List other products and technologies that extend your Lotus Domino applications.
Description Synchronizes applications and mail, server-to-server and client-to-server communication, and mobile communication, and provides a calendar, task management features, a personal journal, and document libraries. Acts as a repository for the distribution and easy lookup and search of information. Provides a trail of, and prompts for, actions in a business process. Allows for layered conversation between workgroup members on specic subjects. Allows access to large data stores of nonLotus Domino data.
Broadcast/Reference
Tracking/Workow
Discussion
Front end
Data Sources
Data sources for Lotus Domino applications include those listed in the following table.
Description Applications can be developed to work with data from a single Lotus Domino database or from multiple Lotus Domino databases. Lotus Domino 8 supports the ability to utilize the DB2 relational database as an alternative storage mechanism for data. You can expose Lotus Domino data in DB2 views, making that data available to DB2 applications, including IBM Workplace and IBM WebSphere Portal applications. You can use SQL to build new Lotus Domino applications that blend collaborative services with relational data that is stored in DB2 databases. Web services are technology that allows programming-independent and platform-independent communication between applications. The advantage of using Web services is that the technology is based on open standards such as Extensible Markup Language (XML) and Simple Object Access Protocol (SOAP). Web services can handle data more easily and allow a variety of software to communicate more freely than any one proprietary application or environment.
Web services
Figure 1-1: A conceptual diagram of the Lotus Notes/Lotus Domino architecture An example of the Lotus Notes/Lotus Domino environment would consist of a combination of the following or similar client/server components.
Function A Lotus Domino server is a computer that runs the Lotus Domino server program and stores Lotus Notes databases. A Lotus Domino server runs services that manipulate Lotus Notes data. Depending on what the request is and who the client is, the server can pull information from a variety of sources, including the object store, the le system, a relational database, or a combination of all three. Lotus Notes clients can access Lotus Domino data both on servers and locally, providing portable access to data. Web clients can access Lotus Domino data on the server to display in a browser.
Note: You can also use a browser to access Lotus Domino data stored locally. For instance, a mobile user accesses Lotus Domino data with a browser instead of a Lotus Notes client. The application could still be replicated to the mobile user and he or she would access it via a browser.
Clients
The following table outlines some of the Lotus Notes client types available with Lotus Domino servers.
Function Allows users access to Lotus Notes databases on a Lotus Domino server, mail, calendar, contacts, and Web browsing. Supports the creation and development of Lotus Domino databases or applications.
The following table outlines some of the Internet client types available with Lotus Domino servers.
Function Provides on- or offline access to Lotus Domino core messaging, collaboration, and PIM functions through a Web browser. Supports Lotus Domino applications, mail, and calendar access for Web browsers. Allows mail access to a POP3compliant server. Supports mail access to an IMAPenabled server.
Web client
POP3 client
IMAP client
Application Access
Lotus Domino applications are client-server applications. The client communicates with the application using a proprietary remote procedure call mechanism. The Lotus Notes Remote Procedure Call (NRPC) transmits the client request to the Lotus Domino application and returns the results. Lotus Domino authenticates users when they access applications on the server. Other Lotus Domino services are called upon depending on the specics of the application.
Stage 1 2
Description User makes a request to open, read, or save data in the application. Lotus Domino authenticates the user making the request and provides authentication information about itself to the user. This occurs when the client rst accesses the server. Lotus Domino veries the rights of the user making the request. This occurs every time a request is made. Lotus Domino executes the request and responds to the client.
Figure 1-2: The Lotus Notes client accessing a Lotus Domino application
Stage 1 2
Description User makes a request to open, read, or save data in the application. Depending on the server setup and the database ACL, Lotus Domino authenticates the user making the request and provides authentication information about itself to the user. If both server and database allow Anonymous access, no challenge is issued to the client and the user is not authenticated. The result is that the user is identied as Anonymous. Lotus Domino veries the rights of the user making the request. Lotus Domino translates the HTTP request. Lotus Domino executes the request.
3 4 5
10
The following gure illustrates how a Web browser accesses a Lotus Domino application. In this example, data is also accessed from DB2.
11
Figure 1-4: The Lotus Domino database containment model As the containment model shows, to access a database, you must rst access the le system.
12
Notes Storage Facility (NSF) maintains the data and design elements of the application. Notes Index Facility (NIF) builds and maintains lists for locating data in the application.
13
Note types
A Lotus Domino database contains database header, ACL, and design notes. It also contains data notes once the users of the application create them. Some notes are created by users and developers, and other notes are maintained by Lotus Domino to track and control information in the application. Data is stored in a specic kind of note, referred to as either a data note or a document. Both terms are used interchangeably throughout this course. You can create and access documents in many ways.
Purpose Stores data values used in the application. For example, a data note may contain customer prole information, such as the customers name, address, and phone number. Stores data used to process or affect the presentation and functionality of the application. For example, a design note may contain instructions for how Lotus Domino displays information to a user.
Design
Purpose The ACL stores a list of names and options for controlling access permissions to the database. Lotus Domino stores information about the database in a database header note. The database header contains information such as the version of Lotus Domino used to create the database, the title of the database, and the database ID.
Database header
14
Open the application in the Lotus Notes client. Select the document you wish to examine. Open the Document Properties box.
Choose FileProperties. Right-click the document and choose Document Properties. Click the Properties button. Or, press Alt+Enter.
4.
Use the tabs of the Document Properties box to view the structure of the data note.
Properties boxes
All Lotus Domino elements have Properties boxes associated with them, from entire applications down to individual text elements.
15
Information Displayed Data about the document that Lotus Domino maintains; for example: When it was created. When it was last modied. Who last modied it.
Fields
A list of the items in the document and the data each item contains. Selecting an item in the left pane displays its value and metadata in the right pane. Metadata includes the data type and special ags Lotus Domino uses when dealing with this data. The unique ID of the document.
Document IDs
16
5. 6. 7. 8. 9. 10. 11.
Double-click Instructor Demo. Click OK to accept the Welcome To The Database message. Click OK to accept the You Have Manager Access message. Close the About Instructor Demo page. Click Customers to open the Customers view. In the Customer list, choose a customer. Choose FileProperties.
17
14.
15.
18
Forms
Forms contain elds where users can enter values. Those values are stored in documents. You can use forms to gather and display information.
Views
Views index and display lists of documents contained in an application. You can use views to organize information.
Navigation
Hotspots, framesets, outlines, and image maps are the most common navigation elements used in Lotus Domino applications. You can use these elements in conjunction with each other to enable users to move around the application quickly and easily.
Task Automation
Lotus Domino provides a number of elements for automating tasks such as actions. Actions, which can appear in views, documents, pages, and the Action menu, trigger tasks such as creating or saving a document. The Create menu also contains elements that can run a script when a user selects it.
19
Security Layers
Lotus Dominos layered security model, shown in the following diagram, provides increasing renements to the security of the network, the Lotus Domino server, applications, and elements within each application.
Figure 1-7: Lotus Dominos layered security model Each of the layers in the model is described in the following table.
Layer Physical
Description Access to the equipment used to log on to the network and store backed up data. This refers to access to the server over the wire. The process of establishing trust between the server and that which is trying to access the server. This refers to the restrictions available in the servers Server document. This refers to the levels of access controlled by the Access Control List (ACL) in a specic database. This refers to anything from reading access lists to controlling who can see a particular design element based on who they are.
Network Authentication
20
Field Security
21
It allows users to work with an application offline, and then add (or replicate) their changes when reconnected to the network.
22
Replica databases
Replica databases are databases that share the same replica ID. The replica ID is generated automatically when a database is created. Replication can only occur between Lotus Domino databases that have the same replica ID. The names of two database replicas can be different, and they can contain different documents or implement different designs. However, if their replica IDs are the same, they can replicate with each other.
Build a list of document, design element, and ACL changes since the last replication. Transfer the changes to the replica databases. Lotus Domino only replicates the items that have changed, not the entire document or design element. Before the servers transfer changes, they check the ACL of the replica databases. Lotus Domino can only transfer those changes permitted by the ACL.
View and FullText indexes File system information (for example, the application le name and path)
23
Replication Considerations
Some of the things you should take into account when considering replication include: Security settings can cause two people to see different elements in the same application. For example, if users are not allowed to read a specic type of document, then those documents are not visible to those users when they replicate the application.
Servers that are doing the replicating must have access to the application elements. There are different levels of control on this. Frequency and timing of replication should be driven by the business need and application design. Additions and deletions of data affect business, and replication affects what users see in the different replica copies. When performed too infrequently, replication can result in reappearance of deleted data as well as information not being shared. Frequency of replication will affect network traffic. The timing of replications can create a situation where the data that one user sees is not the same as what another user sees. Therefore, if the data is time-critical, replication must happen more frequently. This, in turn, will impact network traffic. Multiple users can simultaneously edit the same document in one copy of a application or edit the same document in different replicas between replication sessions. When these situations occur, Lotus Domino stores the results of one editing session in one document and stores the results of additional editing sessions as individual documents that are named Replication or Save Conict. In most cases, you will want to reconcile the differences between the original document and its conict document(s) by editing one, and then deleting the other(s).
24
Description Provides a combination of instant messaging and Web conferencing capabilities. Can be added to a Lotus Sametime deployment (in a Windows environment) to support high-volume Web conferencing environments, as well as to optimize load balancing and failover for enterprise-class deployments. Manages the complete life cycle of office documents, from collaborative authoring to archival. It allows teams to work together more effectively through collaborative document management. Lets users instantly create a team workspace to gain access to timely information and to seamlessly bring together geographically and organizationally dispersed team members. Works on top of Lotus Domino and speeds the creation and deployment of workow-oriented applications. It allows organizations to standardize and streamline timeconsuming, people-based activities, and track their progress. A standards-based development tool used by script developers, Visual Basic developers, Lotus Notes application designers, and others to create components for IBM WebSphere Portal. Provides functionality that allows disparate business processes to communicate, process, and share common data.
IBM Lotus Sametime Enterprise Meeting Server IBM Lotus Domino Document Manager IBM Lotus QuickPlace
Component Designer
25
Provides additional search capability throughout the enterprise. Provides connectivity between Notes data and hand-held and other non-stationary devices. Provides a suite of office productivity products within the Lotus Notes environment.
IBM Workplace
IBM Workplace is a family of products, solutions, and technologies used for creating innovative, adaptive work environments based on users roles or skill levels, or both. The Workplace family includes: Portal technology
Collaboration tools Content management tools Development tools Workow capabilities Solutions on which a users workspace is built
Description Delivers fully integrated, servermanaged collaboration to the end users desktop. The Lotus Notes application plug-in allows users to run native Lotus Notes applications within the context of the IBM Workplace Managed Client product.
Managed Client
26
Component Designer
Note: For more detailed information on this family of products, use a search engine to locate information on the products listed in the previous table.
27
Description Runs on the Mozilla Foundations Firefox and Mozilla browsers, meeting the growing demand for additional client options for Linux desktop users. In addition to creating and verifying digital signatures, Lotus Domino Web Access 8 provides S/MIME support for reading and creating security-rich, encrypted mail. Delivers Lotus Domino services to Microsoft Outlook users. Organizations currently using Microsoft Exchange for their messaging infrastructure can move to security-rich, scalable, reliable IBM Lotus Domino server software, without changing from familiar client software on the desktop and without having to retrain users. Provides integration with Microsoft Office 2003, XP, and 2007 software. Users of Microsoft software can access Lotus Notes Mail using Smart Tags, a Microsoft Office capability, to recognize certain types of text, such as proper names. Unied Messaging represents the convergence of voice mail, e-mail, and fax so that all messages are stored in a single location and can be accessed from a variety of devices, including telephones and PCs. Unied Communications (UC) takes Unied Messaging a step further by extending message access to additional devices and technologies, such as mobile phones, pagers, PDAs, and browsers. In addition, UC provides notication features that will alert subscribers in different ways when they receive a message that meets certain criteria.
Microsoft Office
28
Lesson Summary
In this lesson, you received an overview of application types, data sources, and how they are deployed in the IBM Lotus Domino architecture. By gaining a high-level understanding of what applications are and how they work, you can more easily grasp how particular application components t into the overall picture.
29
Topic A: Explore the IBM Lotus Domino Designer User Interface Topic B: Access Design Elements
Introduction
After completing this lesson, you should be able to: Explore the Lotus Domino design environment. Explore the different design elements in Lotus Domino Designer.
32
Choose StartAll ProgramsLotus ApplicationsLotus Domino Designer. Click the Open and Domino Designer icons from within the IBM Lotus Notes client. Choose ViewDesign from a database open in the Lotus Notes client. If you do not have the access rights to modify the design of a database, the Design option is not available in the View menu.
Open Lotus Domino Designer. Choose FileOpenLotus Notes Application. In the Look In eld, enter the location of the application (server name). In My Computer, select the application from the list, or enter it in the File name box (directory and le name). Click Open.
33
Description Includes the Design list for the application. This consists of the list of design elements and the Design bookmark icons, which point to the most recent applications on which you have worked. Lists everything in the current application for the selected design element. Across the top of the Work pane are Design action buttons, which perform actions on the currently displayed elements (such as creating a new form). Each item that you are currently working on has its own tab that, when clicked, takes you to the window that the tab represents.
Work pane
Window tabs
34
Design Elements
Pages contain text, images, applets, and other objects. Users cannot enter information into pages. Forms contain elds where users can enter values. The values are stored as a document. Views index and display lists of documents contained in the application.
Automate tasks
Actions and agents can run scripts. They can be triggered programmatically or manually. Hotspots, framesets, outlines, and image maps, when used in combination, allow users to move around the application quickly and easily.
Control navigation
To Automate Tasks
Use Programming languages, that enable you to: Calculate or modify information. Validate inputs before saving.
35
36
Function Lists all areas (objects and events) in the current design element where you can add code. Code is added in the Script area. When you click an item on the Objects tab, the Script area changes to show the code that describes the object. The Reference tab reects the language or languages that you can use in the Script area. Lists elds and functions that can be used to write code for the object. Designers can paste from the list or from the context-sensitive Help into the Script area. Used to write code for the element selected using the Objects tab.
Reference tab
Script area
Function Provides details on: Using Lotus Domino Designer Designing Lotus Domino applications
Context-sensitive Help
37
Lesson Summary
In this lesson, you explored the IBM Lotus Domino Designer user interface and accessed design elements. By becoming familiar with Designer, you can begin the process of using it to build applications tailored to your companys needs.
38
Creating Applications
Topic A: Create a New, Blank Application in IBM Lotus Domino Designer Topic B: Create a Copy of an Existing Application Topic C: Create an Application from a Template Topic D: Organize the IBM Lotus Domino Designer Environment
Introduction
After completing this lesson, you should be able to: Create a new, blank application in Lotus Domino Designer. Create a copy of an existing application. Create an application from a template. Organize the Lotus Domino Designer interface by using folders and bookmarks.
40
Create an application from a template. Create a new, blank application. Copy an existing application.
Templates
A template is an application that contains the structure for a particular application, but does not contain any data. Lotus Domino includes a number of standard templates that let you easily set up a discussion application, a personal journal, a collaborative team application, and many others. You will work with templates later in the course.
41
Choose FileApplicationNew. The New Application dialog box appears. Accept the default of Local to create the application on your local computer. Enter a title for the application. Enter a le name for the application.
42
43
Open the application to copy. Choose FileApplicationNew Copy. In the Server eld, do one of the following:
To store the new application on your local hard drive, leave Local selected. For new applications that multiple people will be designing, select or enter a server name to store the new application on a server.
4.
If desired, in the Title eld, enter a title for the new application. The title can have a maximum of 96 characters.
Note: IBM Lotus Domino Designer automatically gives the copied application the same title and le name as the original application. You have the option to change it. The length limit of the applications le name depends on your operating system. The copied application le name must end with the .nsf le extension. If the application will be used as a template, use the le extension .ntf.
5. 6. 7.
In order to copy just the design and not the documents within the application, select Application design only. Deselect Access Control List so that the original applications ACL will not be copied to your new application. Click OK.
44
If necessary, to prevent the copied application from inheriting future template design changes, choose FileApplicationProperties, select the Design tab, and clear the Inherit design from master template check box.
45
9.
10.
46
47
5.
6. 7. 8. 9.
48
Folders
One way to help organize your design work is by using folders. You can create folders: As a way of organizing and structuring the design elements in your application.
On the Bookmark bar for easy access to frequently used items. Within a folder in a application. Within a folder on the Bookmark bar.
Bookmarks
Bookmarks are used for easy access to frequently used applications and application. You can drag and drop the following items to the Bookmark bar or to a folder on the Bookmark bar: An application shortcut from your desktop.
A program executable le from Windows Explorer. An application icon from the Design pane. An application window tab.
In the Design pane, click the new folder icon. If the Design pane is not open, right-click the Recent Databases folder on the Bookmark bar and select New Folder. In the Folder name eld, type a folder name. In the Select a location for the new folder list box, select the location in which you want to create the folder and click OK.
2. 3.
49
Note: Lotus Domino Designer places the folder on the Bookmark bar. You can now populate this folder with applications and other folders.
Procedure Reference: Creating an application bookmark from the Lotus Domino Designer menu bar
Follow these steps to create an application bookmark from the Lotus Domino Designer menu bar.
1. 2. 3. 4.
Choose FileApplicationOpen. Select the application you want to bookmark. Click Bookmark. In the Add to list box, do one of the following:
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 application by clicking the icon on the Bookmark bar or in the folder.
50
Activity 3-3: Create a Folder and Bookmark for the Practice Application in Lotus Domino Designer
Scenario You are interested in managing your work more efficiently and would like to see what the Bookmark bar can do, so you decide to create a folder on the Lotus Domino Designer Bookmark bar that contains a bookmark for your copy of the Practice application. Follow these instructions to create a folder and bookmark.
Step 1. 2. Action If necessary, open Lotus Domino Designer. Click the New Folder icon above the Design pane. Result: The Create Folder dialog box opens. 3. 4. 5. Name the new folder Fundamentals In the Select a location for the new folder eld, select the Folders location. Click OK. Result: The folder appears on the Bookmark bar. If you move the cursor over the folder, its name appears as pop-up text. 6. 7. 8. Now, to create a bookmark within the folder, choose FileApplication Open. Select the name of your Practice application. Click Open. Result: The application is opened in Lotus Domino Designer. 9. Drag the application icon to the Fundamentals folder. Result: A bookmark for the Fundamentals Practice application is created in the Fundamentals folder.
51
Lesson Summary
In this lesson, you created an original application structure, an application structure copied from a previously designed application, and an application structure based on a template. By learning how to create an application structure by using a variety of methods, you can approach a design problem with knowledge of the tools needed to leverage existing work effort.
52
Creating Pages
Topic A: Explore Page Content, Layout, and Navigation Basics Topic B: Create Pages Topic C: Add Text to Pages Topic D: Use Tables to Lay Out Pages Topic E: Add Images to Pages
Introduction
After completing this lesson, you should be able to: Explore the basics of page content, layout, and navigation. Create a page and set its properties. Add text to a page, and format text on a page. Use tables to lay out pages. Add shared images to a page.
54
Description Static data such as a company name. Images such as GIF, JPEG, and BMP les. (For graphic types other than GIF or JPEG, refer to Lotus Domino Help for advice on how to treat the graphics for optimum presentation.)
Description Information organized in rows and columns. Collapsible and expandable areas that can include text, graphics, and objects.
55
Programmable Elements
The following programmable elements can be used on pages.
Element Applets
Description Small programs such as an animated logo or self-contained application. Hypertext Markup Language, which can be written directly on the page or imported from another source. A place for storing and sharing common JavaScript programs and code. You can insert an existing JavaScript library into a page, form, or subform. Buttons or hotspots that automate tasks for a user. Links or objects that represent data in another application. Generates dynamic text based on formula results. Styling instructions that can be used to format HTML pages.
HTML
JavaScript libraries
Actions
OLE objects
Computed text
Navigational Elements
The following navigational elements can be used on pages.
Element Imagemaps
Description A graphic or collection of graphics, overlaid with programmable hotspots. Hotspots, in the form of pop-up text, actions, links, and formulas, perform an action when clicked by a user.
56
Use these elements alone or combine them to control how users navigate through your application.
As part of a frameset. As a link from a form, subform, outline, or another page. From an action. As an outline entry that displays the page.
If the Goal is to Display static information such as company data and background information Collect and store information from end users
Note: You will work extensively with forms later in the course.
57
Design Element Layout regions Subforms Fields Shared elds Embedded elements: File upload Scheduler Editor No No No No No
Form
58
Result: The Page Properties box changes to display properties of the selected element. 6. Close the Page Properties box and the First Look page. Do not save change if prompted.
59
Create the page. Set the page properties. Add the required elements.
In the Design pane, click Pages. In the Work pane, click New Page. Choose DesignPage Properties. Enter a name in the Name eld. Close the Page Properties box. Add appropriate elements to the page. Save the page.
Properties boxes do not need to be closed after each modication. They change to reect the latest element selected as selections are made. Changes are applied immediately.
60
Figure 4-1: The Page Properties box Use the Page Properties box to specify attributes of a page such as: Page name and alias.
Page Names
Page names within the same application must be unique. They can contain:
Page names are also case-sensitive. Although the name itself is limited to 64 bytes, the size limit increases to 256 bytes if there is a name alias.
61
Aliases
An alias is simply another name for a page or other design element. Aliases are a short way to refer to the page. If an alias exists, it is used to: Refer to the page programmatically.
Consistently refer to the page, even if the name of the page changes.
Aliases are an internal reference to the page, or other element with which they are associated.
Open the page. Choose one of the following methods to open the Page Properties box:
Choose DesignPage Properties. Right-click the page and choose Page Properties.
3.
In the Name box, enter | (pipe symbol) and your alias name after the existing page name. For example: pageName | pn
Note: Press Shift+\ for the pipe symbol.
4. 5.
62
63
Static text, for example, the page title, graphic labels, or explanatory text. Dynamic text, for example, text that is computed.
Text Formatting
Use the Text Properties box to modify text on your form. Using the Text Properties box, you control: Font
Paragraph Alignment Paragraph Margins Paragraph Border Paragraph Hide When Paragraph Styles
Previews
To determine how your work looks and behaves in the target client, preview your work in the supported Web browsers as well as in the IBM Lotus Notes client.
64
The Preview toolbar contains links to each browser on your computer. Clicking a browser icon previews the current design element in the associated browser. The following gure shows the Preview toolbar.
In IBM Lotus Domino Designer, open the design element you wish to preview. Either choose the appropriate menu commands or click one of the Preview buttons. The menu commands are as follows: Choose DesignPreview in Notes.
Result: You are prompted to save any changes to the design element. Then, the design element is opened in the selected client.
3.
Close or minimize the preview program and return to Lotus Domino Designer.
Browser previews
Security settings can affect the display of Lotus Domino applications in Web browsers. If a server or application is not set up for Anonymous access, you will need to authenticate to be able to preview.
Note: You will work more extensively with access control lists later in the course.
65
Scenario The page you have been developing is alright, but it is not visually engaging. You take steps to add formatting to some of its elements. Follow these steps to add formatted text to your page.
Step 1. 2. Action If necessary, open Practice Page in your copy of the Practice application. Enter the following text: Practice Page Result: The text appears in the top left corner of your page. 3. Highlight the text you just entered and open the Text Properties box by choosing TextText Properties. Result: The Text Properties box opens to the Font tab. 4. On the Font tab, click Arial 24 points.
66
Result: A border appears around your text, running the length of the page.
7. 8. 9. Close the Text Properties box. Save your page. Preview your work. Result: The page preview is quite different in Lotus Notes than it is in the Web browser.
67
Lotus Domino Designer provides ve types of tables. The following table describes these types.
Display Basic
Description Displays data organized into rows and columns. Looks like a grid or spreadsheet. Displays each row of data as a separate tab. Users view information displayed in the rows by selecting a tab. Displays one row of the table at a time based on a specied time interval. Animated tables are not supported on the Web and are not designed for data entry on forms. Similar to a tabbed table, but users click captions instead of tabs. Similar to a tabbed table, but users click an action or link. Displays a different row of the table based on an action or eld. Yes
Use on Web
Tabbed
Animated
No. For the Web, an alternate programming technique is required to show an animated table.
Caption
Programmed
68
Table Properties
The Table Properties box contains a number of tabs and settings. The tabs include: Table Layout
Cell Borders Table/Cell Background Table Borders Table Margins Table Rows Table Programming
Result The table lls a given body size, from margin to margin. This is useful when nesting tables within one another. The width of the table will ll the margins, regardless of the frame size. A measured column width is set for the table, regardless of the size of the window.
Fit to window
Fixed width
69
Figure 4-4: The Table Layout tab On the Table Layout tab, the Width and Position properties also render to the Web. The following table lists the results of the individual property settings in the Web page.
Property Width
Web Function If left xed, keeps the individual column (cell) that particular width, regardless of content. The Width property will generate an HTML width attribute as either a percentage or as pixels, based on the selection. Affects the horizontal positioning of the table within the Web page. The Position property will create an HTML align attribute.
Position
70
Figure 4-5: The Cell Borders tab The Cell Border Thickness setting dictates whether or not a border appears. Setting all of the borders to 0 will cause the border to be invisible. Setting the border width to a value of greater than 0, will display a border for the table. Setting a 0 border is useful when the table is only used for positioning and the borders would detract from the page appearance. For the Web, the only attribute that applies from the Cell Borders tab is Cell Border Thickness.
71
Figure 4-6: The Table/Cell Background tab The Table/Cell Background tab of the Table Properties box deals with table color, cell color, and cell image. Most of the properties render to HTML. The following table relates properties of the Table/Cell Background tab to their corresponding HTML attributes.
Web Function Sets an overall color for the table, it generates an HTML bgcolor attribute on the <td> (Table Data) tag. Generates an HTML bgcolor attribute for an individual cell tag. A table cell is dened in HTML with a <td> tag. The Style attributes do not have a corresponding HTML style. Translates to the Web as a background image attribute for the <td> tag. Lotus Domino Designer does not provide the capability for a background graphic for the entire table. However, you can accomplish this using HTML.
Cell color
Cell image
72
Figure 4-7: The Table Borders tab The properties of the Table Borders tabs have no effect on any of the translated HTML attributes. The HTML language does not currently provide for margin settings or text wrapping attributes.
Figure 4-8: The Table Margins tab The properties of the Table Margins tabs have no effect on any of the translated HTML attributes. The HTML language does not currently provide for margin settings or text wrapping attributes.
73
Figure 4-9: The Table Rows tab The Table Rows tab allows you to modify the Lotus Domino table type attributes, which allow you to modify the overall table settings.
74
Figure 4-10: The Table Programming tab Use the Other eld of the Table HTML Tags or Cell HTML Tags to add attributes to the <table> or <td> tags.
Open a page in Lotus Domino Designer. Choose CreateTable from the menu. Specify the number of rows and columns for the table. Specify the table width. Select a table type by choosing one of the options. Click OK. Save and preview the page.
75
76
Import an image from a le. Insert a shared image from the shared resources area of the Lotus Domino application. BMP (Bitmap) CGM JPEG GIF Lotus PIC PCX Tiff 5.0 PNG (Portable Network Graphic)
Open a page in Lotus Domino Designer. Place the cursor where you want the graphic to appear. Choose one of the following:
4.
Select the images le type. Result: The Create Picture dialog box displays only image le types. File Import displays all le types that can be imported into a Lotus Domino Designer page or form.
77
Select or enter the le name. Click Import. Result: The image is inserted onto the page.
Picture properties
A picture, like other elements, has properties which are modied using the Properties box. Once a picture is added, the Picture Properties box becomes available. Use properties to specify attributes or aspects of a picture such as: Size
78
Shared Resources
A shared resource is an element, such as a graphic le, stored within a Lotus Domino application. Each application can contain a library of its own shared resources. Shared resources let you reference a resource multiple times throughout a application, while only having to maintain the resource in one location. Each application can contain a library of shared resources consisting of: Images
Using shared resources reduces application maintenance. If a resource is changed, all occurrences of the shared resource are automatically updated. A major advantage of shared resources is that they are a part of the application; if the application is moved, copied, or replicated, so are its shared resources. To use a shared resource, it needs to be imported to the Lotus Domino application. Its native format is maintained during this process.
79
Click Shared Resources in the Design list. Click Images. In the Work pane, click the New Image Resource button. In the New Image Resource dialog box, do the following:
Select the le type. Navigate to the correct directory and select the le name. Click Open.
Source le information
80
Create a new, or open an existing, page in Lotus Domino Designer. Move the cursor to where you want to the image to appear. Choose CreateImage Resource from the menu. If necessary, choose the type of image (GIF, JPEG, All Images) to display the desired image type. Click the le name listed in the list box. Result: A thumbnail view of the image displays in the dialog box.
6.
Click OK.
Figure 4-13: Source information for an imported picture The following gure shows the source of an image that is a shared resource.
81
82
Lesson Summary
In this lesson, you created pages and populated them with text, images, and tables. By learning how to insert important design elements in pages, you can create application components that look professional and get the job done.
83
Build a new application. Create shared images. Create a page. Modify the Information page.
Logo WW1.gif, and the company address 123 Worldwide Blvd. Metropolis, PA 45555 in a table.
84
85
Creating Forms
Topic A: Create Forms Topic B: Add Fields to Forms Topic C: Hide Form Elements
Introduction
After completing this lesson, you should be able to: Create a form. Work with date/time data. Hide form elements.
88
Static elements, such as text, graphics, and tables used to control appearance and user interface. Programming to act on data.
89
Application notes
A form is a design note stored inside an IBM Lotus Domino application. The design note contains the design elements and code that make up the form. Lotus Domino applications contain four different types of notes. The following table briey describes the four note types stored in a application and their function.
Function Contains information about the application itself, such as its name, size, and creation date. Each application has a single header note. Stores the access control list, a list of names and permissions associated with the application. Each design element, such as a form, view, or page is stored in the application as a design note. The form design note acts as a template used to create new documents or display information. A data note holds the information entered using a form, as well as system data used by Lotus Domino for management purposes. These are also known as documents.
ACL Note
Design Note
Data Note
Function Display information or pictures on all documents using the form. Display data from documents. Save data to a document. Compute a value. Control attributes of the form. For example, a background color is a form property. Offer additional tools to the designer, often enhancing interactivity or efficiency of the form.
Fields
Properties
90
Form Design
There are three phases in creating a form: 1. 2. 3. Design the appearance. Create the form. Test the form.
In this section, you will investigate the rst phase: form design. When designing a form, consider the following questions: What should this form do?
What kind of information is needed from the user? Should any of this information be automatically generated? What process(es) should occur once the form is submitted? What client(s) will be used to access the form?
Decide the purpose of the form. Determine the information the form will collect. Determine required elements for the form. Create the form. Add the required elements to the form. Save the form. Test the form in various clients.
91
Open the application in Lotus Domino Designer. In the Design pane, click Forms. Result: In the Work pane, the list of existing forms appears. The New Form button appears on the button bar.
3. 4. 5. 6. 7. 8.
In the Work pane, click New Form. Choose DesignForm Properties. Enter a name in the Name eld. Close the Form Properties box. Add elements to the form. Save the form.
Form Properties
To examine information about a form, use the Form Properties box. The following gure shows the Form Properties box.
92
Use the Form Properties box to specify attributes of a form such as:
Form name and alias Background color Header and footer text
Form names
Form names within the same application must be unique. Form names may include: Characters
Form names are also case-sensitive. Although the name itself is limited to 64 bytes, the size limit increases to 256 bytes if there is a name alias or cascading menu option. As with pages, forms can have aliases.
93
Static text in a form can be the forms title, eld labels, or explanatory text. Dynamic text in a form can be computed text.
Text and other content in forms can also be organized by using tables, just as in pages.
94
95
Modify the content of documents. View data in documents. Calculate data through formulas.
Add the eld to the form. Name the eld. Specify the data type. Specify how the eld is populated. Set additional eld properties. If necessary, program eld contents. Save the form. Test the form in various clients.
96
Place the cursor at the desired location on the form. Choose CreateField from the menu, or right-click the form and choose Create Field. Result: Lotus Domino adds a eld to the form and opens the elds Properties box.
Note: Like many applications, there can be several options for performing a task. In this course we use the menu bar option for consistency. However, feel free to choose whichever method you are most comfortable with.
3. 4.
Enter a name for the eld on the Field Info tab in the Properties box. Specify the eld type on the Field Info tab in the Properties box.
Field Names
Each eld in a form must have a unique name in that form. Use the following rules and guidelines when naming elds. Field names cannot: Exceed 32 bytes.
97
What type of information the eld can contain. How the eld is populated.
Field Values
When you indicate the type of data a eld contains, you also indicate how the eld gets its value. The following table lists the eld value options and their purpose.
Value Is... Entered by the user. There can be a default entry based on a formula. Created as the result of a calculation. Fields are calculated when: Saving Refreshing Changing modes
Computed
Created as the result of a calculation. Lotus Domino does not store the result with the document. It calculates the value each time users refresh the document. Created when the document is created. If the eld is added to a form, after documents have been created, the value is calculated the next time one of these documents is opened.
98
The type of data that you want to capture (text, number, date, etc.). Logical position of elds on the form (consider data entry ow). How to identify to users the purpose of the eld (for example, eld labels). How the data should appear to the reader. How to identify the eld for yourself when designing the application (eld name). Whether or not there are dependencies on the content of other elds.
Lotus Domino processes forms from the top-left to the bottom-right. Keep this in mind if you create elds whose calculations are dependent upon other elds on the form.
Text Data
Lotus Domino Designer allows you to specify the type of text data a eld will store. The types of text data include: Text
Text elds
A text eld is editable by default. Users can enter and view alphanumeric data in this type of eld. One example of a text eld is a eld used to collect or display a customer name. Text elds have the following characteristics: The display format is dened by the eld on the form.
The eld length is not xed. The eld content can be displayed in a view.
They can store formatting with the data. They cannot display in a view.
99
Native OS style
Native OS is a style selected on the Field Info tab in the Field Properties box. The Native OS style has a user-friendly interface for text elds. For example, editable text elds appear on the document as a xed-sized outlined box instead of as a blank space marked off by brackets.
100
Result: The FirstName eld is created. 6. Place the cursor in the third cell of the table. Enter the following text: Last Name: Result: The text appears in the table cell. 7. Place the cursor in the fourth cell. Choose CreateField to create a eld with the following characteristics:
Result: The LastName eld is created. 8. 9. Save the form. Preview the form in Lotus Notes.
101
List Fields
List elds present users with a list of pre-dened choices. Some types of list elds allow the selection of a single choice, multiple choices, or choices not in the list. The following table describes the list types available and when to use them.
If You Want the User to Select One or more choices from a pop-up dialog box, or to add a choice not in the list. One or more choices from a short list. Only one choice from a short list. One or more choices from a scrolling list. One choice from a drop-down list, or to add a choice not in the list.
102
Place the cursor at the desired location on the form. Choose CreateField from the menu. Enter a name for the eld and choose one of the list eld types. Click the Control tab. Select one of the list choices:
Enter either the list choices or a formula. Save and preview the form.
103
Open the form in the Designer. Select the list eld. In the Programmers pane, click the Objects tab.
The eld object with the list elds name should appear at the top of the object list. Default Value should be highlighted. If not, click once on Default Value to select this event.
4.
In the Script area, enter the default value surrounded by quotation marks. Click the check mark. Result: A value surrounded by quotation marks displays in the Script area.
Note: This value must exactly match one of the list values spelling and case.
5.
104
Activity 5-4: Create and Set a Default Value for a List Field
Scenario Because you want to be careful that the small number of choices for a certain data item be entered consistently, you build functionality in a data gathering component that reduces chances for data entry error. In this activity, you will create several list elds and set default values for them. Follow these steps to create and set a default value for a list eld.
Step 1. Action If necessary, open the Employee Information form in your copy of the Practice application in Domino Designer. Result: The form appears in the Work pane. 2. Add the following eld label below the table: Employment Status Result: The text is inserted. 3. Add a eld next to the text. Result: A new eld is inserted. 4. Open the Field Properties box. Add the following characteristics on the Field Info tab.
Result: The name and eld types are set. 5. On the Control tab, type the following choices:
Result: The list choices are set. 6. From the Objects tab in the Programmers pane, select the Default Value object. Result: Just above the Script area, the text EmploymentStatus (Field) : Default Value displays.
Note: Be sure that your use of quotation marks is correct in Step 7.
105
Choices: Administration, R&D, Manufacturing 9. 10. 11. Add an editable date eld named DateCreated and set its default value to Today. Add a number eld and label called Salary to the Employee Information form. Save and test the form.
Name Fields
Lotus Domino differentiates text that represents names by using a special category of elds to store names. Because Lotus Domino uses systemspecic ways to identify users and servers, consider using a Name eld when dealing with names. The following table describes the three types of elds that deal with names.
Used to... Insert or display the name of a user or server. Restrict read access to the document. A value in a Readers eld will restrict read access to those names specied in that eld or in any other Readers elds in the document. Grant read access to the document and grant edit authority to any name that is also specied as an Author or higher authority in the Access Control List (ACL).
Authors
An Authors eld is a type of eld that works in conjunction with the Author access level in the databases Access Control List (ACL). Authors elds do not override the setting in the ACL. They offer developers more control over which users can edit data in the application. Entries in Authors and Readers elds cannot give a user more access than is specied in the ACL; they can only further restrict access.
Note: You will work more extensively with Readers and Authors elds later in the course.
106
Numeric Data
Create a Number eld when the data that users will enter is numeric. Lotus Domino can use data in a Number eld to perform mathematical calculations. Number elds recognize the following: Numerals 0 through 9
Plus (+) and minus (-) signs Decimal point (.) Scientic notation (E)
Number elds can be editable, computed, computed for display, or computed when composed.
Create the eld. In the Basics tab of the Fields Properties box, select Number as its type. Click the Control tab to set the style.
Date/Time Data
When the data users enter or manipulate refers to dates or times, use a Date/Time eld. Date/Time elds represent time using a set of numbers and punctuation. Lotus Domino stores date/time values as the number of seconds after a base date. There are many formatting options available for displaying dates and times. Although the default time format is MM/DD/YY HH:MM:SS, the operating systems regional settings could affect how dates are displayed. Date/Time elds can be editable, computed, computed for display, or computed when composed.
107
Create the eld. In the Basics tab of the Field Properties box, select Date/Time as its type. Click the Control tab to format the eld.
108
Fields Graphics
The following table details the options available for hiding elements.
Option Previewed for reading Previewed for editing Opened for reading
Description The hidden information is not visible when users read documents in the document Preview pane. The hidden information is not visible when users work on documents in Edit mode in the document Preview pane. The hidden information is not visible when users open documents in Read mode. A eld that cannot be read cannot be printed or copied to the clipboard. The hidden information is not visible when users work on documents in Edit mode. The hidden information is not visible on printed documents. The hidden information is not visible when information is copied to and pasted from the clipboard. The hidden element is not visible when the document is an embedded document. A formula determines the circumstances in which information is hidden.
109
Note: It is important to note that the Hide/When option is not a security feature.
For example, Worldwide Corporation has a standard form lled with information about their employees. When a manager opens an employees prole, they do not need to see all the company departments, just the one to which the employee belongs. On the other hand, when new employees are added, or an existing employees information is updated, it would be helpful to see all the departments. The following table outlines conditions to hide information.
Then Hide information that is useful only when users create or edit documents. Hide information that is useful when users read documents.
In the previous example, the Department eld is a list eld. In order to view the list eld while editing and the resulting data when reading, create the following two elds: A list eld containing all the Worldwide Corporation departments.
110
Procedure Reference: Displaying the selected value of a list eld in Read mode
Follow these steps to set Hide/When options for a list eld.
1. 2.
Create an editable list eld. Set the properties on the Paragraph Hide/When tab so that the list eld is hidden when the document is: Previewed for reading.
3. 4.
Create another eld and set the Field type to Computed for display. Set the properties on the Hide/When tab so that the computed eld is hidden when the document is: Previewed for editing.
5. 6. 7. 8.
In the Programmers pane, select the Value object for the computed eld from the Objects tab. In the Script area, enter the name of the list eld. Save the form. Test the form.
111
Label text: Employment Status Field Name: DEmploymentStatus Field Type: Text, Computed for display
Result: The new eld is created. 2. To set the value of DEmploymentStatus, click the eld. In the Script area of the Programmers pane, enter EmploymentStatus Result: The value for the new eld is set to the value of the EmploymentStatus eld. 3. To set Hide/When properties for the new eld, click the eld. In the Field Properties box, click the Paragraph Hide/When tab. Select Previewed for editing and Opened for editing. Result: The eld will only display when the form is in Read mode. It will not display when the user is editing the document. 4. To set the Hide/When properties for the EmploymentStatus eld, click the eld. Open the Field Properties box. Click the Paragraph Hide/When tab. Select Previewed for reading and Opened for reading. Result: The eld will only display when the form is in Edit mode. It will not display when the user is reading the document. 5. Save and test the design changes. Create four or ve documents using this form. Result: The EmploymentStatus eld displays in Edit mode. The DEmploymentStatus eld displays in Read mode.
112
Lesson Summary
In this lesson, you created forms and inserted form elements in them. By learning how to create forms, you can provide application users with the means to enter information into the application.
113
1. Open the Policies and Procedures application that you created earlier in
the course.
2. Create a new form in the Policies and Procedures application. Name the
5. Use a table to organize the elds and eld labels that will be included on
this form.
6. Add the following eld labels and eld names to collect and/or display
Policy Title: PolicyTitle Effective Date of the policy: EffectiveDate Policy Description: PDescription Policy Category: Category (The categories are Office Guidelines, Benets, Holidays, and Grievance Procedures.)
114
all the categories should be visible when the document is in Edit mode.
8. Test the form. Create several documents from the new form to see if the
correct information is gathered and displayed. Close the document and reopen it to test the Category eld functionality.
Note: The application will contain a default view. All of the documents you create will appear in this view. You will create a customized view later in the course.
115
Creating Views
Topic A: Create Views Topic B: Add View Columns Topic C: Organize Documents Topic D: Format Views
Introduction
After completing this lesson, you should be able to: Create views. Add columns to display information about the documents in a view. Describe document categorization. List ways to format views.
118
Characteristics of a view
The following list describes some of the characteristics of views:
A view is a list of documents in a application. Each row in a view represents a document in the application. Each column displays information from or about the document in that row. A view may include all documents or a subset of documents based on selection criteria. Users read the information in the view to locate specic documents. Excessive numbers of views and poorly designed views can have a serious impact on application performance. Views should be designed early in the application development process.
119
Stage 1 2
Description The application developer creates the view design. Lotus Domino pulls information from documents according to the design and builds a view index. Lotus Domino displays the information to users.
120
Figure 6-3: How Lotus Domino builds the collection and index
Update the index. Locate notes within an index. Locate index entries. Update collections.
121
The following gure shows the Click on column header to sort property.
122
View Design
Effective views allow users to nd information quickly and easily. As a developer, you must understand the needs of the users. When designing a view, consider the following: Which documents to include in the view.
What information to display in the columns of the view. How to sort and/or categorize the documents. Whether the view will be for shared or private use. How to format and display the information.
123
Create the view. Select documents for the view. Add columns to the view. Sort and categorize the documents. Format the view display.
Note: These tasks will be discussed in more detail later in the lesson.
View Creation
When designing a view, start by creating an initial view design. The initial view design includes: Creating the view.
Naming the view. Determining the view type. Controlling how the view will appear in the view list. Setting the view selection conditions.
124
In the Design pane, click Views. In the Work pane, click New View. In the Create View dialog box, set the initial view properties. Click OK. Result: Lotus Domino creates the view and adds it to the list in the Work pane.
Guidelines Use a short, descriptive name indicating how the view organizes documents.
Type
Select Shared, to create a view many users will access. Select Shared, contains documents not in any folders, if the user typically stores documents in folders and wants to nd all others quickly. Select Shared, contains deleted documents for users to drag out of the trash to a folder, or undelete, if the soft deletions option has been activated. Select Private to create a personal view for a single user. Select Shared, private on rst use views to distribute views that begin as shared, but change to private once a user has accessed and saved the view. Select Shared, desktop private on rst use to distribute views that begin as shared, but that change to private once a user saves a copy to the desktop.
Note: You cannot change the type once you create a view. Location Use up to two levels in a hierarchy. Group views that include the same documents together. Create a cascaded list of views.
Note: Entering a backslash (\) after a views name with a new name accomplishes the same cascaded view menu. Copy style from Use the design of another view in the current application as a template.
125
Guidelines Leave the condition blank to include all documents in the application. Click Add Condition and use the Search Builder to specify criteria for including a subset of documents in the view. Change the selection conditions after you create the view.
Note: It is better to have one well-designed view than a dozen poorly-designed views.
View Aliases
Using an alias is a good habit to practice. Design elements such as views can be referred to by an alias when you reference them in a formula or any kind of programming. If a design element has an alias and that alias is used in any coding, the name of the design element can be changed without the need to also change formulas or code.
Open the view in Lotus Domino Designer. Open the View Properties box. On the Basics tab, enter an Alias and Comment.
Open the view in Lotus Domino Designer. In the Object list of the Programmers pane, click View Selection.
126
In the Programmers pane, ensure that the default is Simple Search. Result: An Add Condition button is displayed at the bottom of the script area in the Programmers pane.
4.
In the Script area, click Add Condition. Result: The Add Condition dialog box opens.
5. 6.
In the Add Condition dialog box, create a condition. Click Add. Refresh the view index in Lotus Domino Designer. Result: Lotus Domino Designer rebuilds the view index with the new selection condition.
127
To Find Documents Whose author is or is not a specied user or users. Documents must have an Authors eld. That were created or modied: On, after, before, or not on a specied date In the last, in the next, older than, or after the next specied number of days Between or not between a specied range of dates
By Date
By Field
That have a eld that contains or does not contain a specied value. Whose form eld contains the specied form name. Whose form eld contains the specied form name and whose elds have matching conditions. Only ll the elds that are relevant to your search. In the specied folder. That have any, or all, of up to eight terms, words or short phrases. Note: This condition uses signicant system resources and can adversely impact the response time of a large application. Use it sparingly, and only if Fill out example form is not suitable.
Note: Add Condition is a tool used mainly by end users to simplify setting view conditions. It does not replace formulas. Developers should use the SELECT statement as it is more efficient. Formula building will be discussed later in the course.
128
View name: Employee Information View type: Shared Location: Views Copy style from view: Blank (default) Selection conditions: Leave blank
Click OK. Result: A new blank view is created and displayed in the listing in the Work pane. 5. Double-click to open the view you just created. Result: A blank view opens in the Work pane; and the View Properties box opens. 6. In the View Properties box, on the View Info tab, type the following:
7. 8. 9. 10.
Close the View Properties box. On the Objects tab, click View Selection. In the Programmers pane, above the Script area, verify that Simple Search is selected. Beneath the Script area, click the Add Condition button.
129
Condition: By form Search for documents which use form: Employee Information
Click Add. Result: The condition appears in the Programmers pane. 12. Preview your changes. Click Yes to save the view. Result: Only documents created using the Employee Information form should appear. 13. Close the view. Result: Your new view, its alias and comment appears in the Views list in the Lotus Domino Designer window.
130
Specify a value for the column to display. Format the view column. Format the view column values.
Click an existing column. To add a column to the left of the one selected, choose CreateInsert New Column. To add a column to the right of the right-most column, choose CreateAppend New Column from the menu.
131
Purpose Displays the value stored in a specied eld for each document in the view. Note: View columns cannot display information from computed for display, rich text, and encrypted elds. Returns information about documents that Lotus Domino stores automatically. For example, simple functions can return: A list of attachments in a document. The size of the attachments. The name of the documents author.
Simple Function
Formula
Displays multiple eld values in a single column or creates new values using the Formula language. Note: Attempting to access data from computed for display, rich text, or encrypted elds in a view formula will result in a null value.
Select
And Click a eld from the list. Note: Fields that cannot be used in a view do not appear in the list. Click a function from the list.
Simple Function
132
Displaying multiple elds in a single view column will be discussed later in the course.
Set Properties to Specify general display characteristics, including column title and width. Specify text formatting options for the column title, including font, size, and style. Note: you can change all existing column titles by clicking the Apply to all button. Specify a name for the column to use when accessing the column programmatically. This is similar to giving a form or view an alias name. Indicate if the values in the column should appear as links when the view appears on the Web.
Title
Advanced
Set Properties to Specify the font, size, and style of text for displaying the column value. Specify special options if the column value is a number. Specify special options if the column value is a date-time value. Note: Date/time values always contain both a date and a time, because of how they are stored internally.
133
Result: The First Name column appears to the left of the Last Name column. 6. Append a column to the right of the Last Name column with the following features:
Result: The Department column appears to the right of the Last Name column. 7. Append a column to the right of the Department column with the following features:
Result: The Salary column appears to the right of the Department column.
134
135
When you sort or categorize a column, you are changing the order in which the view displays the documents to users.
Sorted Columns
A sorted column displays documents in a specic order. The following table describes how a view sorts different types of values.
If the column being sorted contains text, there are two other options that could be useful: Case-sensitive sorting: Sorts lowercase letters before uppercase letters. For example, ab sorts before Aa.
Accent-sensitive sorting: Sorts accented characters after nonaccented characters. For example, ab sorts before a.
136
Select the column you want to sort. Open the Column Properties box. Click the Sorting tab. Select None, Ascending, or Descending. Set optional properties to rene the sort:
User-sorted columns
The sort column feature allows end users to click on the column header to change the columns sort order. This option is available in the Sorting tab of the Column Properties box. The following table describes the different end user sort control options.
Option Ascending
Function An upward-pointing triangle appears in the column header. Users click the header to sort in ascending order or revert to the original order. A downward-pointing triangle appears in the column header. Users click the header to sort in descending order or revert to the original order. A two-headed triangle appears in the column header. Users click the header to cycle between ascending, descending, and the original sort order. Designate a second column to sort the view further. For example, if the primary sort column is last name, the secondary could be the rst name. Note: This column can be sorted in either ascending or descending order only. Using a column as an entry point to another view, which gives users an easy way to see additional, related information that doesnt t in the initial view. Users click such a column to open another view.
Descending
Both
137
138
The following is the available property in the Column properties dialog box.
139
140
Categorizing
A categorized column groups related documents together in a view based on the column value. The following gure shows a categorized view.
Select the column whose value will categorize the documents. Open the Column Properties box. On the Sort tab, select Categorized.
Why The column values appear in the view and should be self-explanatory. A column title would be redundant. However, there are instances where a column title is needed, such as when you need to display more than one date. This helps save room in the view to see more data. This simplies expanding and collapsing different categories for end users.
141
142
Tab Options
Set Properties to Open the view by default when the database opens. Specify this view as the default for all new views. Specify how the view displays the documents when it opens.
Style
Apply an image to the views background. Display alternate rows in different colors. Display totals in the column. Set row spacing.
Advanced
Determine when Lotus Domino refreshes the view index. Set colors for links in a Web browser.
Security
Note: This option does not prevent users from seeing data in the documents displayed in the view. Users could select to display the same documents in another view or folder that they create.
143
Lesson Summary
In this lesson, you created formatted views. By learning how to create and format views, you can provide application users with the means to obtain information in a meaningful way from data stored in an application.
144
Display the title of the policy and its effective date (in that order). Organize the documents by the type of policy (Guidelines, Holidays, and so on).
145
Introducing Formulas
Topic A: Identify Programming Languages Supported by IBM Lotus Domino Topic B: Identify Formula Components Topic C: Identify Event Triggers Topic D: Compute and Compare Values Topic E: Work with @Functions Topic F: Explore Formatting and Comments
Introduction
After completing this lesson, you should be able to: Identify programming languages supported by Lotus Domino. List syntax rules for formulas. Describe the order of eld evaluation on a form. Describe how to compare values by using comparison operators. Describe conditional statements. Identify ways to make formulas more readable.
148
Does the code run on a client? If so, which client? Where does the data reside? What are the programming skills of the developer? What functionality is required?
Just as important as where the code is written is where it is executed. The location of execution, namely, server versus client, can affect how the data is accessed, as well as the security provisions that are taken to protect the data.
149
150
Is An ODBC driver that makes Lotus Domino databases accessible to an SQL tool or application interface.
Use It When You Require Read/write access to Lotus Domino data using any application that supports ODBC. For example, an application that produces reports in Lotus Notes using Business Objects Crystal Reports or Microsoft Access. Access to Lotus Domino data using any JDBC-enabled application. For example, when your application is a servlet on an HTTP server.
A Type II JDBC driver that makes Lotus Domino databases look like another relational back-end source to an SQL tool or application interface.
151
Element Form
Property/Event Window Title WebQuerySave PostOpen (can also execute LotusScript) Value or Default Value Input Validation Input Translation Hide/when View Selection Form Formula Column Formula
Field
View
LotusScript
IBM LotusScript is an embedded basic scripting language that offers access to Lotus Domino data and services beyond the capabilities of the Formula language. It is much more efficient than Formula language for accessing multiple documents and performing operations on those documents.
Element Form
152
Agent
Advantages
Limitations
Java
Internally, Lotus Domino only supports the use of Java in agents. However, external Java programs can access Lotus Domino applications. The Lotus Domino Designer IDE provides a basic Java editor in the Agent Builder, which includes color formatting and reference Help for the standard Java language and the Lotus Domino classes.
153
Advantages Powerful object-oriented language. Remote access and networking support. Extensive class library (beyond Lotus Domino). Multi-threaded.
Limitations Internally, Lotus Domino only supports its use in agents. Complex program development requires third-party development tool with debugger.
JavaScript
JavaScript is integrated in Lotus Domino Designer to allow Lotus Domino applications to support users with Web browsers. The Lotus Notes client interprets JavaScript and, therefore, benets from its unique characteristics. This functionality is critical in building applications for mixed clients.
And others
Field or button
154
Advantages Object-based language Web standard Cross-platform compatibility Runs in Lotus Notes clients and Web browsers
Consider Choosing LotusScript, Java, or JavaScript Formula language, LotusScript, or JavaScript LotusScript, Java, or Formula language Formula language LotusScript or JavaScript LotusScript, Java, or Formula language
Access to Lotus Domino data Calculations with simple results A series of scripted activities Data access efficiency
155
1.
You are designing a form with a number of elds. Some elds on the form require an initial value that is changeable by the user. Other elds require a computed value. Some actions may need to be hidden from certain users. a) LotusScript b) JavaScript c) Formula language d) Java
2.
The application that you are designing requires that you get some of the input from dialog boxes. a) Formula language b) JavaScript c) LotusScript d) Java
3.
The application you are creating requires access to documents in applications other than the one in which it is saved. a) Formula language b) LotusScript c) JavaScript d) Java
156
5.
The application that you are developing involves an extensive amount of interaction with the user. You will need to validate eld contents, position the cursor, and perform other actions in the user interface. a) Formula language b) LotusScript c) JavaScript d) Java
6.
You are working on a process that involves complex ow control, including loops and multiple conditional branches. You have no idea, as you are writing this process, how many times it will need to be executed. a) Formula language b) LotusScript c) JavaScript d) Java
7.
An application is not performing as well as users would like. In analyzing the application, you nd that while it is very user friendly, some of the formulas are performing very poorly. Which languages would you use to replace the formulas to improve the performance of the user interface? a) Formula language b) LotusScript c) JavaScript d) Java
157
Statements
Formulas consist of one or more statements, which are made up of a combination of the components described in the following table.
Description Can be elds or temporary variables. Something whose value does not change. Constants can be text, numeric, or time-date. Assign values, modify values, and combine values into new values. Built-in formulas that perform a particular calculation and return a value. Reserved words within the Formula language that perform special functions.
Operators
@Functions
Keywords
158
Syntax Rules
All programming languages have rules. The Formula language is no exception. A formula must conform to the general rules described in the following table.
Rule Description Separate multiple statements using a semicolon; for example: @If(@IsNewDoc; True Statement, False Statement) Any number of spaces, including none, can be used between operators, punctuation, and values. Keywords and functions, however, must be separated by at least one space. Case is not signicant except within text constants. By convention, keywords are usually upper case, and @function and @commands are usually written in mixed upper and lower case. Two values must be separated by at least one operator.
Case
159
Events
Code executes in response to an event in a Lotus Domino object. Events include opening a database, opening a view, opening a document, moving the cursor into or out of a eld, and so on. The following table describes several common objects, some of their related events, and what triggers their execution.
Object Database
Event and Timing Postopen is triggered after a database, view, or document is opened. Queryclose is triggered when a view, document, or database is being closed. onHelp is triggered when Help is selected (when F1 is pressed). onLoad is triggered when the form or page is loaded. Postrecalc is triggered after the object is refreshed (and values are recalculated). Default Value is triggered when a document is created. Input Translation is triggered when a document is saved, recalculated, or refreshed. onBlur is triggered when a eld loses focus. onFocus is triggered when a eld gets focus. Click is triggered when the button is clicked.
Page or form
Field
Button
160
161
Constant Text
Numeric
Specify the sign of the number using a plus or minus sign as the rst character, if necessary. Use E for scientic notation.
10 -6.37 37E6
Date-Time
Enclose a date or time in square brackets. Use AM and PM to represent time in a 12-hour format.
Variables
This section will familiarize you with both eld values and temporary variables.
162
You can use the name of the eld as a variable in the formula.
Then, use that variable in other statements of the same formula. For example:
@Sqrt(x);
You can also reuse a temporary variable within a formula by assigning a different value to it.
Operators
Operators enable you to manipulate values. Combining and comparing values are common examples of using operators in formulas.
Computed Values
You can only combine values of the same type. For example, you cannot add together text and number values. The following table describes how to use operators to combine values.
Example 10 + 2.37 + 15 6.05 - 2.35 TotalScore / Quantity TotalPrice * DiscountRate Welcome, + FirstName
Text values
+ or &
163
Order of Evaluation
When creating formulas that compute values, keep the following information in mind.
Order Parentheses
Description Using parentheses, you can explicitly force the order of evaluation. Operations within parentheses occur rst. Example: (5-3) * (6-4) = 4 Operations not in parentheses occur in order of precedence. Example: 5 - 3 * 6 - 4 = -17 Operation of equal precedence occur from left to right. Example: 8/4*2=4
Precedence
Left to right
Comparison Operators
This section describes how to compare values in formulas.
Evaluates to True If The values of A and B are equal. The value of A is less than the value of B.
Evaluates to False If The values of A and B are not equal. The value of A is greater than or equal to the value of B. The value of A is greater than the value of B.
A<B
A <= B
The value of A is less than or equal to the value of B. The value of A is greater than the value of B. The value of A is greater than or equal to the value of B.
A>B
The value of A is less than or equal to the value of B. The value of A is less than the value of B.
A >= B
164
A is less than B and B is less than C. A is less than B or A is less than C. A is not less than B.
B is less than or equal to A or C is less than or equal to B. B and C are both less than or equal to A. B is less than or equal to A.
Note: A and B represent values and can be constants, variables, or combinations of constants, variables, and operators.
165
Modifying values. Acting on a condition. Formatting text strings. Calculating numeric values or values in a list.
Syntax
@Functions contain the name of the function, followed by any arguments. The general format of an @function is:
@FunctionName(argument1; argument2; argument3);
Common @Functions
The following table describes some of the @functions that return data about the application.
Which Returns The date-time value for when the document was created. True (1) if the document is new, or False (0) if the document is not new. The title of the current view. The server and le name of the current database. The current users name.
@IsNewDoc
View
@ViewTitle
Database
@DbName
User
@UserName
166
Web client
@BrowserInfo
Examples of @functions
The following table contains common examples of formulas.
This Formula @Adjust ([10/11/05]; 0; 1; -4; 0; 0; 0) @Text (10) @ProperCase ("hello world.") @Trim (" ") hello world.
The text value, 10 The text value, Hello World The text value, hello world
Conditional Statements
The @If function executes one statement or another depending on whether a logical value is true or false. The @If statement has an odd number of parameters, with a minimum of three. The parameters are: Condition, which is the rst parameter that is checked.
True statement, or the action to perform if the condition is true. False statement, or the action to perform if the condition is false.
@If statements are evaluated from left to right. The rst true condition evaluated causes its corresponding True statement to be processed. Subsequent conditions in that @If statement are not processed. If an @If statement contains two conditions, the syntax is:
@If(condition1; TrueStatement1; condition2; TrueStatement2; FalseStatement)
167
This Conditional Statement @If (3<10; "True"; "False") @If (Author = @UserName; "My document"; "Not mine") True
Returns
My document if the Author eld contains the name of the current user.
168
Now look at the same formula written following simple formatting rules:
@If(Invoiceamount>POamount; @If (Invoiceamount-POamount>1000.00; @Mailsend(Vendor:Approver;"";"";"Rejection";"Invoice"+ invoiceno+ " has been rejected"); @Mailsend(Approver;"";"";"Invoice overage";"Invoice"+ invoiceno+"has been submitted")); @Mailsend(Vendor:Approver;"";"";"Processed";"Invoice"+ invoiceno+" for purchases made under PO#"+Pono+"))
The formula has been formatted so that the conditions and the True and False statements start on separate lines. The statements related to a condition are indented under that condition.
169
Comments
The formula gets even easier to understand when you add comments.
Include a REM statement at the beginning of each line of explanatory text in a formula. The following example contains several lines of explanatory text before the formula starts. It also contains REM statements inside the formula to further document what the code is doing.
REM {An invoice amount is checked against}; REM {its corresponding Purchase Order to see if the invoice }; REM {exceeds the amount of the PO. If it does exceed the PO }; REM {amount by more than $1,000, an e-mail is sent that }; REM {indicates the invoice has been rejected. If the invoice }; REM {amount is over the PO amount but under $1,000, an e-mail }; REM {is sent indicating that an invoice over the PO amount }; REM {has been submitted. Finally, if the invoice is less }; REM {than the PO amount, an e-mail is sent indicating the }; REM {invoice has been processed.}; REM ; REM {This statement checks to see if the invoice is less than }; REM {the PO amount.}; @If(Invoiceamount>POamount; REM {Is the difference greater than $1,000? }; @If (Invoiceamount-POamount>1000.00; REM {Reject the invoice}; @Mailsend(Vendor:Approver;"";"";"Rejection";"Invoice"+ invoiceno+ " has been rejected"); REM {Notify approver that invoice has been submitted}; @Mailsend(Approver;"";"";"Invoice overage";"Invoice "+ invoiceno+"has been submitted")); REM {Process the invoice.}; @Mailsend(Vendor:Approver;"";"";"Processed";"Invoice"+ invoiceno+" for purchases made under PO#"+Pono"))
170
Based on the information in the scenario, determine the result for each of the following formulas.
1.
FirstName:
2.
LastName:
3.
FirstName + LastName:
4.
LastName + , + FirstName:
5.
FirstName = Susan:
6.
7.
8.
9.
@Text (10.22):
171
172
Lesson Summary
In this lesson, you created formulas and learned about programming languages that can be used in conjunction with Domino. By learning how to build and borrow scripting and programming for use in an application, you can deploy functionality that can leverage data that could not otherwise be processed into a form that meets users needs.
173
Topic A: Create Window Titles Topic B: Work with Computed Values Topic C: Work with Field Values Topic D: Work with Lists Topic E: Prompt Users Topic F: Create Reusable Code Topic G: Implement Error Checking
Introduction
After completing this lesson, you should be able to: Identify the characteristics of and uses for the @IsNewDoc function. List the elds that can be used to store values in a document. List the steps to write a eld input validation formula. Identify the characteristics of and uses for the @DbColumn function. Identify characteristics of and uses for the @Prompt function. List @functions that can be used to create reusable code. List @functions that can be used to handle run-time errors.
176
Calculate ending dates based on start dates and lengths. Enter the document creation date. Populate a list of options. Ensure that users do not save the document with specied elds left empty. Format user entries to be consistent in all documents.
Form Programming
Each element of the form, including the form itself, is an object. The Programmers pane provides access to the programmable properties and events of objects on the form.
177
On the form in the Work pane. Or, from the Objects tab in the Programmers pane.
Result: IBM Lotus Domino Designer highlights the object on the Objects tab and displays the programmable properties and events of the object.
2.
Select the property or event to which you want to add a formula. Result: Lotus Domino Designer highlights the property or event.
3.
At the top of the Script area, select Client and Formula. Result: The Reference tab lists the application elds and @functions that can be used in the formula.
4.
Enter the formula. Result: Lotus Domino Designer highlights different elements of the formula with colors.
5.
Save the formula. Result: Lotus Domino Designer checks the syntax of the formula.
Form Events
Form events are triggered when a document is opened, saved, refreshed, closed, or switched between read and edit mode. You can use formulas in form events to set elds, prompt users, or perform background processing. The following table lists most of the form events and when they evaluate.
When the Event Is Triggered Before a document opens. After a document opens and is drawn onto the screen. Before the document is changed into either edit or read mode. After the document is changed into either read or edit mode.
PostModeChange
178
Window Titles
Both forms and pages contain a property called the window title. You can write a formula to compute a text string to display in the upper-left corner of the client when users open the element. It is good practice to always set the window title when designing forms and pages. If the form or page opens in a Web browser, the window title will not display.
In the Object tab of the form or page, select the window title. Enter a formula that results in a text value. Save the formula. Preview the page or form.
179
The function returns a value of 1 for True if the document has not yet been saved. It returns a value of 0 for False if the document has been saved.
In this case, the phrase New Document displays if the document is new. If the document has been saved, the window title changes to the value in the Subject eld of the document.
180
Use a Computed for Display Field to Display The current time The users name The creation date of a document The value of a list eld when the document is open @Now @UserName @Created WorkType
Example
Computed for display elds require a formula. The formula must evaluate to a value suitable for storage in the eld. For example, if the type of eld is date-time, the formula must result in a date-time value.
Computed Text
Computed text is another element you can add to a form or page to display computed values. It is similar to a Computed for display eld, except that the result of the formula must be a text value and, unlike elds, you may use it on a page. You can format computed text like other text elements using the Computed Text Properties box. The following table describes examples of using computed text.
Example @If ((DueDate < @Today) & (Status != "Complete"); "This is late!"; "") "Welcome, " + @Name([CN]; @UserName)
Dynamic messages
181
Open the form or page in Lotus Domino Designer. Result: The form appears in the Work pane and the Programmers pane opens.
2. 3.
Place the cursor where you want the result of the computed text to appear. Choose CreateComputed Text. Result: The Computed Text Properties box opens. The value property of the new computed text object is highlighted in the Object list.
4.
Enter a formula that evaluates to a text value in the Script area of the Programmers pane. Result: Lotus Domino Designer checks for formula syntax errors.
5.
Set properties to format the text. Result: The result of the formula in Step 4 will display according to the properties you set.
6.
Preview the page or form. Result: The result of the formula displays in the form or view.
This section describes how to use these eld types and set their values. The following table describes Computed and Computed when composed elds.
Field Computed
Calculates a Value... Each time users create, refresh, or save the document.
Example The result of a calculation involving other elds, such as calculating a total.
182
Example The original author A value that never changes The date the document was created
Open the form in Lotus Domino Designer. Select the eld. Under the eld in the Objects tab, select Value. Enter the formula to compute a value suitable for storage in the eld. Test the formula by previewing the form.
Translate or reformat the value when users save documents. Validate or verify the value when users save documents.
183
Function @Trim
Description Removes leading, trailing, and redundant spaces in a text string. Capitalizes the rst letter of each word in a text string. Converts all letters in a text string to uppercase. Converts all letters in a text string to lowercase.
@ProperCase
@UpperCase
@LowerCase
184
Select the eld. On the Objects tab of the Programmers pane, select the elds Input Translation event. In the Script area, write the translation formula. Save the form. Test the formula:
185
If the value is acceptable, continues saving the document. If the value is not acceptable, displays a message to users indicating that the value is not acceptable and aborts the save or refresh operation.
Note: The input validation formula runs after the input translation formula.
Note: Input validation formulas do not apply to rich text elds.
186
Validation Functions
Use the functions @Success and @Failure as the actions in the input validation formula. The following table describes how to use the two functions when validating eld values.
To Continue saving or refreshing the document. Display a pop-up message box directing users to x the problem, and abort saving or refreshing the document.
Not acceptable
@Failure
187
Select the eld. On the Objects tab under the eld, select Input Validation. In the Script area, enter a formula to test the value. Save the form. Test the input validation formula:
Preview the form. Enter appropriate and inappropriate values and refresh the document.
188
List Functions
The following table contains @functions useful for working with lists.
@Function @Elements(list)
Example @Elements(Colors) Returns: The number of elements in the Colors eld. @Explode("Red Green Blue"; " ") Returns: Red:Green:Blue @Implode("Red": "Green":"Blue";"*") Returns: Red*Green*Blue @IsMember("Orange"; "Red":"Green": "Blue") Returns: 0 (False) @Member("I";"A": "E":"I":"O":"U") Returns: 3
@Explode(String; separator)
@Implode(list;separator)
@IsMember(value; list)
@Member(value;list)
189
@Unique(list)
190
List Choices
Previously, you learned about the different types of elds, which include elds that offer a pre-dened list of choices to the user. To dene the list of choices, you can do either of the following: Enter each choice.
In the Properties box of the List eld, click the Control tab. Select Use formula for choices. Enter the formula to create the list of choices. Save the formula. Test the formula by previewing the form.
191
Description Indicates the type of database (class) you are accessing and whether to cache the results. For example, "":"", accesses a Lotus Domino database and caches the results.
server : database
Text list
Species the location and le name of the database. For example,"":"", refers to the current database, on your local machine.
view
Text
columnNumber
Number
192
The view name is In Progress. The view is located in the Tracking database on Server01. The rst column contains the title of all projects currently in progress.
The formula returns a list of all the projects currently in progress (note the use of temporary variables to make the formula more readable):
REM {This formula returns the values in the first column}; REM {of the In Progress view in Tracking on Server01}; source := "Notes": ""; location := "Server01":"Tracking.NSF"; view := "In Progress"; colNumber := 1; @DbColumn (source; location; view; colNumber)
193
Description Indicates the type of dialog box to display. If present, the list of choices is not automatically sorted. The title for the dialog box. The text you want to display in the dialog box. The value to use as a default value. The values to display in the dialog boxs list. The types of les to display when using the LOCALBROWSE style.
194
Triggering @Prompts
Prompt dialog boxes can be triggered in the ways described in the following table.
Description Use @Prompt to prompt the user to enter a value in a eld. @Prompt can be used in buttons to take input from a user. @Prompts are useful in Action buttons and agents. For example, you could prompt the user for a value and set the value of a eld based on what the user enters. In combination with @Password, @Prompt can be used to prompt for a password on a form.
Button formulas
195
You can write code once that you can then cut and paste into multiple elds throughout an application. You do not need to manually revise code every time a eld name changes.
Purpose Returns the value of the current eld. Returns the name of the current eld.
For example, in an input validation formula for a listbox eld that requires more than one selection, you can use @ThisValue to check whether a user has selected more than one list option, and, if not, use @ThisName to prompt the user to select a second option. The formula would look like this:
@If((@ThisValue != "") & (@Elements(@ThisValue) = 1); @Failure("The " + @ThisName + "field must contain more than one choice"); @Success)
196
Types of errors
The following table describes the types of run-time errors application developers encounter.
Description Users should never see these types of errors. You should discover and x all of them before rolling out the application. There are the following two types of development errors: Unexpected errors are mistakes in programming. For example, forgetting a parameter in certain functions will produce the Insufficient arguments for @function error message at runtime, instead of compile time. Unreported errors are incorrect results that do not report an error. For example, using the incorrect data type for a function may not produce an error message, but the function will not operate as you intended.
User
These are errors that users might cause while working in the application. For example, if you ask the user for a le name and the user enters a name that does not exist. A developer cannot prevent these types of errors, but can anticipate them, test for them, and take appropriate actions to handle them so they do not cause other problems.
Note: Functions that have only one signature (xed number of required parameters) are checked at compile time. Those that have multiple signatures (the same function that operates in different ways depending on different numbers of required and optional parameters) are not.
197
The following formula prints the result to the status bar so you can verify that the formula is functioning correctly.
@StatusBar ("result = " + Result);
The custom translation and validation functions fail. This occurs when the user attempts to save the document.
Even though errors occur, Lotus Notes only reports errors when the user attempts to save or refresh the document. Because Lotus Notes does not report the error until the save (or refresh), the developer can use code to correct the error or report an error with a more user-friendly message.
198
Error-Handling Functions
The following table describes common functions for handling run-time errors.
Description Determines if a eld, variable, or expression contains an error. For example, if a user enters text in a number eld. Stops the execution of a formula and returns a specied value. Displays a message when used in a eld input validation formula. Returns 1. Use this in eld input validation formulas for better readability and easier maintenance.
@Return (value)
You can also use the @IsError function to display a custom error message instead of the one Lotus Notes supplies by default. For example, if the user enters text for a number and attempts to save the document, Lotus Notes will display a message box with the Cannot convert text to number error. If you use @IsError in the eld validation formula for the eld, you can use @Prompt to override the supplied message. Below is an example of a eld validation formula that displays a custom error message:
@If (@IsError(@ThisValue); @Failure ("Please enter a number for " + @ThisName + " ."); @Success)
199
Lesson Summary
In this lesson, you used formulas in conjunction with forms. By giving forms added functionality that can only be deployed through the use of formulas, you can not only augment and correct the entry of data into an application, but also interact with the user in situations where changes to data are necessary.
200
play either the title of the Policy or New Policy, depending on the state of the document.
201
Create a eld to capture the date the policy is created. This date should be displayed without the time element. Name it PolicyCreatedDate The effective date should calculate to one month from the date the policy is created in order to account for an internal review process. This date should also be displayed without the time. When a policy is created, the document should not be saved unless it contains a title and category.
Note: The guided solution to this activity can be found in Appendix A, Solutions to Practice Activities.
202
Office Guidelines Benets Holidays Grievance Procedures Security E-mail Etiquette Diversity
Create a view called Categories that only displays the Category documents. Modify the Policy form to perform a lookup to the Categories view to produce the list for the Category eld.
Hint: The view should only display documents created with the Category form.
Note: The guided solution to this activity can be found in Appendix A, Solutions to Practice Activities.
203
204
Display date only Display separate values with new line Hide paragraph if the eld is empty
saved. Write a formula that determines if the eld needs to be modied. Have the formula check if/when the document has been saved, and add todays date to the end of the list of values if the document is being saved again.
4. On the line below the new eld, but in the same table cell, enter "N/A" and hide it when L_ModiedDates=NULL.
5. Revise the formula for the Effective Date eld to use the
L_ModiedDates eld.
205
206
Topic A: Create Selection Formulas Topic B: Concatenate Values in a View Column Topic C: Display Icons In a View
Introduction
After completing this lesson, you should be able to: Create selection formulas. Concatenate values in a view column. Add a custom icon to a view column.
208
Result Selects the documents that the view displays. Prevents users from opening a view in certain circumstances such as from opening a month end view before the twentieth day of the month. Creates a new document or open an existing one. Informs users before a large view refreshes that it could take a while and asks them if they really want to proceed. Prevents users from pasting documents into the database. Changes the value of StartDateTime and EndDateTime in the document when you paste an appointment on a particular day and time slot. Prevents users from closing a view such as when there are still action items in the action item view assigned to them.
PostOpen QueryRecalc
QueryPaste PostPaste
QueryClose
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. OnSelect Occurs when a view is opened, since a row is highlighted at that time; also occurs when a document is selected or deselected using a checkmark or when the user clicks an already selected row.
In addition to the events available for all views, calendar views have specic events. Examples of calendar view events are shown in the following table.
209
Result Creates a new document when users click an area in a calendar view. Prevents someone from dropping an appointment on an inappropriate day or time, such as a weekend day or a time that is after 5:00 PM. Changes the value of StartDateTime and EndDateTime in the document after you drop an appointment on a particular day and time slot.
QueryDragDrop
PostDragDrop
210
Function Includes a document based on the result of the comparison formula. A formula that evaluates to either True (1) or False (0) for each document in the application. It can use constants, elds, operators, and @functions.
Condition formula
Includes All Documents That... Are in the application. This is the default formula for view selection. Were created or last modied using a form named ei. Contain a eld called Price whose value is less than 1000 and a eld called Instock whose value is Yes. Were created or last modied using the form named ei and do not contain a eld named Department whose value equals Accounting.
SELECT (Price < 1000) & (InStock = "Yes") SELECT Form = "ei" & Department != "Accounting"
211
212
You can only concatenate text values. To include other data types in your concatenation, do the following: Convert (also known as normalize) the values to text.
Where:
Value can be a number, time-date, text, or rich text. Format-string is optional. It controls the formatting of the returned text value. For example, if a currency value is converted to text, you might want the new value displayed with the appropriate currency symbols and punctuation.
213
Original Value The Sales eld contains the value 800. The Date eld contains 12/31/2005 11:59:59 PM. The Date eld contains 12/31/2005 11:59:59 PM.
Formula @Text (Sales; "C,2") @Text (Date; "S0D2") @Text (Date; "S1T0") $800.00
Result
12/31
11:59:59 PM.
Procedure Reference: Writing a formula that concatenates multiple values in a view column
Follow these steps to enter a column formula that concatenates multiple values.
1. 2.
In the Object list, select the Column Value property under the view. Write a formula to concatenate the values:
Use functions to convert number and date-time values to text. Combine the converted values using the concatenation operator (+).
3.
214
2. 3.
215
A column formula must be created which evaluates to a number corresponding to the preset list of IBM Lotus Domino icons, or that evaluates to the name (or alias) of a custom icon stored as a Shared Image Resource.
Column properties
Select the Display values as icons option in the Column Info tab of the Column Properties box. The following gure shows this option selected.
If the approved eld contains anything other than the word Yes, then nothing is displayed.
216
Open the view to be modied in IBM Lotus Domino Designer. Choose CreateInsert New Column. Result: A new column is inserted to the left of the selected column.
3. 4. 5.
In the Programmers pane, select Formula. Enter a formula that results in a predened icon value. For example: @If(Approved="Yes";83;0) Choose DesignColumn Properties. Result: The Column Properties box opens.
6. 7.
217
BMP JPG
The recommended size for a custom column icon is 17x17 pixels. You cannot combine a predened and a custom icon in the same column.
218
Open the application in Lotus Domino Designer. Select Shared ResourcesImages from the Design Elements list. Click New Image Resource. Select the image to be added and click Open. Result: The image is added to the Work Pane list. For example: logo.jpg.
5. 6.
Open the view to be modied in Lotus Domino Designer. Choose CreateInsert NewColumn. Result: A new column is inserted to the left of the selected column.
7. 8.
In the Programmers pane, select Formula. Enter a formula to display the shared image. For example:
@IF(Approved="Yes";"logo.jpg";0)
9.
10. Select Display values as icons. 11. Save and preview the view.
219
Lesson Summary
In this lesson, you selected and manipulated data for use and display in views. By learning how to select and arrange view data, you can present information in ways that would otherwise require repetitive and sub-optimal entry of redundant information into an application.
220
10
Enhancing Forms
Topic A: Work with Layers Topic B: Work with Subforms Topic C: Create Shared Fields Topic D: Enable Inheritance in Forms and Documents Topic E: Create Related Forms Topic F: Enable AutoSave Topic G: Implement IBM Lotus Sametime Instant Messaging in Forms
Introduction
After completing this lesson, you should be able to: Work with layers. Insert computed subforms in forms. Work with shared elds. Enable inheritance in forms and documents. Create related forms. Enable the AutoSave feature in Lotus Notes. Embed an instant messaging contact list in a form.
222
Precise positioning to allow for complex layout options. Stacking layers provides great design control and exibility. For example, different layers containing text and images can be stacked for a high-impact page title. Layers can be transparent or opaque, depending upon the type of effect desired.
Content of a Layer
Add content to a layer just as you would add content to a form. You can copy and paste from another form or layer, or type directly in the layer. You can also add graphics.
Open a form, page, or subform in IBM Lotus Domino Designer. Place the cursor where the layer should appear. Choose CreateLayer. Result: A blank layer is inserted onto the form. Selection handles surround the layer, indicating it is selected.
4. 5.
Click inside the layer and add the layers content. Save and preview the form.
223
Layer Anchors
Each layer has an anchor. The layer anchor associates itself with the element closest to where it was inserted, such as a paragraph of text. This is referred to as the parent element. If the layer is moved, 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. The following gure shows a layer and its anchor.
Layer Properties
After you create a layer, you can control the following properties:
Function
Transparent
224
Select the layer. Select LayerLayer Properties to open the Layer Properties box. Click the Background tab To change the layers color, click the drop-down arrow to the right of Color. Choose one of the color options:
6. 7. 8.
Click on the folder, to the right of Image Source, to insert an image resource. Select one of the image repeat values. Save and preview the form.
225
Drag and drop it. Explicitly set its position. Position it relative to other layers on the form.
1 appears above 0. Multiple layers can have the same level. Negative values are placed behind the parent element.
226
Select the layer. Choose LayerLayer Properties. Click the Positioning tab. Enter the appropriate coordinates to align the layer from the top or left edge of the parent element. Enter the appropriate coordinates to change the layers height and width. Enter the appropriate integer for the layers Z-Index. Save and preview the form.
Follow These Steps Select the rst layer. Press CTRL and click the other layer(s).
Result: Selection handles appear around the selected layers. Align multiple layers Select the layers to align. Choose LayersAlign. Select from the available options.
Select the layers to adjust. Choose LayerMake same size. Select from the available options.
227
Hiding Layers
Occasionally, you will want to hide a layer temporarily to make layout adjustments. Like other design elements, layers can be hidden using Hide/When properties. However, for ease of development Lotus Domino Designer provides another method for hiding layers. That method is the Layer Tree.
Choose DesignLayer Tree. Select the name of the layer you want to hide. Click Hide. Result: The layer will not be visible for the current session.
228
229
230
The following gure shows one subform being used in multiple forms.
To add a formatted logo or letterhead. To ensure consistency and standards in form design. To start building new forms quickly.
231
Open the application in Lotus Domino Designer. Choose Shared Code in the Design list. Select Subforms from the Shared Code list. Click New Subform in the Work pane. Result: A new blank subform opens in the Work pane.
5.
Choose DesignSubform Properties to open the Subform Properties box. Note: The Include in Insert Subform dialog option is selected by default.
6. 7. 8.
Name the new subform. Add elements to the subform as you would a form. Save and close the subform.
232
Subform Properties
Like other design elements, subforms have properties you can set, using the Subform Properties box. Use the Subform Properties box to: Give the subform a name and an alias.
Open a form in Lotus Domino Designer. In the Work pane, click where the subform will appear. Choose CreateResourceInsert Subform. Result: The Insert Subform dialog box appears.
4. 5.
Select a subform from the list that appears. Click OK. Result: The subform appears in the specied place in the form.
233
Computed Subforms
You can have subforms appear conditionally, depending on the result of a formula. This is called a computed subform. For example, you might offer users a choice of custom mail forms with different graphics and styles for various types of messages.
Create the subform(s). Decide under what conditions each subform will appear. Write a formula to include the subform(s) based on those conditions. Add the formula to the appropriate form(s).
Open the form. Click where you want to add the subform. Choose CreateResourceInsert Subform. Select Insert Subform based on formula. Click OK. Enter a formula in the Programmers pane that determines which subform to display. Save the form.
234
Maintaining and reusing consistent formulas throughout an application. Providing single point maintenance for a given eld. Standardizing keyword lists.
Expand Shared Code in the Design pane. Click Fields. Click New Shared Field. Enter a name for the shared eld. Assign a Field type and choose Editable or a computed option, if applicable. Close the Field Properties box. Close and save the shared eld.
Open a form or subform and position the cursor where you want the eld to appear. Choose CreateResourceInsert Shared Field. Result: The Insert Shared Field dialog box appears.
235
Select the shared eld you want to use and click OK. To select a shared eld from another application, click the Database list, highlight a application, select a shared eld in that application, and click OK.
Open the form. Click the eld to be shared. Choose DesignShare This Field.
236
Benets of inheritance
The ability to inherit information automatically from one document to another has a number of benets, including: It is more efficient than typing the same information multiple times.
237
Enabling Inheritance
Forms can be designed to inherit information from an existing document. Creating a form to inherit values from another document requires that the developer: Enable the On Create: Formulas inherit values from selected document form property.
Computed when composed eld type Includes a formula that species the source eld
238
Create a form or open an existing form in Lotus Domino Designer. Open the Form Properties box. On the Defaults tab, select On Create: Formulas inherit values from selected document. Specify a Computed Field type for the eld(s) that will inherit information. Write a formula for the inheriting eld(s) that evaluates to the source eld name. Save the form. To test your work, highlight an existing document that contains the eld(s) to inherit, and then create a document with the new or revised form.
Note: Fields that inherit information do not need the same eld name as their source elds; they do, however, need to be the same data type. For consistency sake, an inherited elds name should be kept the same as the original eld if it contains the same information. This allows for more consistent programming methods and view formulas.
239
Result: The InheritFName eld is created. 5. In the Programmers pane for the InheritFName eld, enter the formula: FirstName Result: The FirstName eld is added as a formula. 6. Create a eld with the following characteristics:
Field name: InheritLName Type: Text, Computed when Composed Formula: LastName
Result: The InheritLName eld is created. 7. 8. 9. Create a rich text eld named Comments. Save your changes. Create an Employee Benets view in order to see the new documents you will create.
240
241
Form types
Lotus Domino provides for a main document/response document structure, sometimes referred to as a response hierarchy, by letting the developer designate a forms type. The following table lists the three Lotus Domino form types and how they are used.
Description This document type is the default for Lotus Domino forms. It is used to create the top level in a hierarchy of documents. These documents are sometimes referred to as main or parent documents. This document type is a child to the Document type. It is referred to as a response document. This document type is a child to the Response document type. It is referred to as a response to response document.
Response
Response to response
242
243
Create a form or open an existing form in Lotus Domino Designer. Choose DesignForm Properties. On the Form Info tab, select one of the following:
Response for the form to create responses to main documents. Response to Response for the form to create responses to other responses.
4.
Document Relationships
To properly establish the relationship between a main document and a response document, you must have the main document selected in a view or opened when the response is created.
244
Threaded Discussions
When developers design any type of main document/response document application, sometimes referred to as a threaded discussion, it is good practice to consider how users keep track of the information in the main document. Using Lotus Domino form properties, the developer can design the response form to: Create a link to the main document in a rich text eld.
Copy the contents of the main document as collapsible rich text. Copy the contents of the main document into a rich text eld.
Linking to the main document takes up much less disk space and is generally the preferred method.
245
Result: The new eld is created. 3. Choose DesignForm Properties. Result: The Form Properties box opens. 4. 5. Click the Defaults tab. Select On Create: Inherit entire selected document into rich text eld. Select the ParentDoc eld from the list. Select Link. Result: The form properties are set.
6. 7. 8.
On the Form Info tab, select Response from the Type drop-down list. Save the form. To test your changes, select a document in the Employees view and create an Employee Benets document. Note that there is now a link to the parent document.
246
The user shuts down Lotus Notes improperly. The user loses power.
AutoSave must be enabled in two places: As a Form property by the application designer.
When the AutoSave process is enabled, documents being created or edited are automatically copied to the AutoSave application periodically. The periodic time is set in the users preferences. If Lotus Notes is shut down improperly, the AutoSave application contains the documents that were in process. When the user opens Lotus Notes again, the user is prompted to recover the documents.
247
Open the form in the Lotus Domino Designer. Open the Form Properties box. In the Options section, select Allow Autosave. Save and close the form.
In the Lotus Notes client, choose FilePreferencesBasic Notes Client Conguration. In the Start Up Options section, enable AutoSave for a time frame such as every two minutes. Click OK. Note: It is not necessary to restart Lotus Notes for the change to take effect.
248
You need to complete the following tasks to implement and test the AutoSave functionality. 1. 2. 3. Enable AutoSave on the form. Enable AutoSave in the Lotus Notes client. Test the AutoSave functionality.
11.
12. 13.
Launch the Lotus Notes client, and enter your password. When prompted to recover the 1 unsaved document, click No.
249
15. 16. 17. 18. 19. 20. 21. 22. 23. 24.
250
Figure 10-7: Instant messaging example For users to use instant messaging functionality, they must be connected to a Lotus Instant Messaging server through a Lotus Notes location document.
Note: Instant messaging functionality is not available for Web applications.
251
Note: You will work with Authors and Readers elds later in the course.
Figure 10-8: Enabling instant messaging for a eld When you open a document, if the author is online, the online indicator will appear beside the authors name, as shown in this gure.
252
Open a form in a application in Lotus Domino Designer. Create a Names, Authors, or Readers eld that evaluates to an abbreviated hierarchical name, such as Elizabeth Torrington/East/. Open the Control tab of the Field Properties box, and select the Show Online Status check box. Optionally, enter a Contact List Group label for the users listed in the eld. The label can be either a formula that evaluates to a text string, or you can enter a text string enclosed in quotation marks, such as Sales Team. To test your work, open the application in Lotus Notes. In the view that contains the form, open the document of an active author. You see the online status indicator beside the authors name. Right-click the authors name and click Chat with to open a chat window.
5.
253
In Lotus Domino Designer, in the appropriate application, create a table on a form and set its properties for how the table displays. With the cursor in the appropriate column in which you want to embed an Instant Messaging contact list, choose CreateEmbedded ElementInstant Messaging Contact List. Adjust the properties of the embedded contact list, as necessary to improve the display of the contact list. Save the form. When you test this functionality, you open a document created with this form. When you double-click the document to put it in edit mode, you should see your embedded contact list in the table.
3. 4. 5.
254
Lesson Summary
In this lesson, you worked with layers, subforms, instant messaging, and autosave features. By adding increased functionality in gathering and recording data that might require instant communication or multiple levels of information, you can create components that get the job done without bothering users who would otherwise have to use multiple areas of an application or interrupt their work to communicate with co-workers through other means.
255
Lab 10-1: Create Question and Answer Forms in the Policies and Procedures Application
Note: The guided solution to this activity can be found in Appendix A, Solutions to Practice Activities.
Scenario The Worldwide Corporation wants to make it easier for employees to ask questions and receive answers about company policies. In this activity, you will create Question and Answer forms. The Answer form needs to inherit information from the Question form. Both forms should have a consistent look and feel. This activity has the following parts:
Use a layer and the mod_menu_background.gif le to enhance the look of the forms. Create a subform to provide a consistent header to both forms. Design and create the Question form. Design and create the Answer form.
Later in the course, you will create a view to display the question and answer documents correctly. Perform the following tasks to complete this lab.
256
The Question form needs to gather certain information. The following table describes the information to be gathered and lists suggested eld names and types.
Information to Be Gathered The users rst name The users last name The category that the question falls into. The categories are: Office Guidelines Benets Holidays Grievance Procedure
Suggested Field Name and Type FName, Text LName, Text Category, Dialog List with the following choices: Office Guidelines Benets Holidays Grievance Procedure
The subject of the question The question The date the question was created The display category
DCategory, Text
For the layer, consider setting the Height and Width properties to Auto, to accommodate varying screen sizes. For the subform, consider including the company logo and address. Consider adding a window title to the Question form.
257
The Answer form needs to be designed so that it is a functional form for creating an answer (response) to the questions posed using the Question form. Think about the kinds of information that would be helpful. For instance, would it be helpful to have the subject of the question on the answer form? How about a link to the question? Also, the Answer form should have a similar look and feel as the Question form. Use the same colors and graphics used in the Question form. The following table lists suggested information to gather, along with suggested eld names and types.
Information to Be Gathered The subject of the question The date the question was created A link to the question The answer The date the answer was created
Suggested Field Name and Type QuestionSubject, Text QuestionDate, Date-Time QuestionLink, Rich text Answer, Rich text AnswerDate
4. Challenge
Use tables to create a more pleasing, balanced look and feel for the elds and eld labels. Apply any subform you create in this activity to the Policy form as well.
258
application, add a Names eld that evaluates to an abbreviated hierarchical name. Name the eld ContactPerson, and have it populated by selecting the name from WWCorps address book. Use input validation to make it a mandatory eld.
259
Lab 10-3: Embed an Instant Messaging Contact List on a Form (Optional Lab)
Scenario To further facilitate communication and collaboration between Worldwide Corporation employees, you will embed an instant messaging contact list on the Answer form. Perform the following tasks to complete this lab.
application, create a singlecell (1x1) xed-width table just below the Answered by text in the eld table. Make the cell three inches wide, and remove all of the table borders.
2. Embed an instant messaging contact list in the new table. Make the list
t to window for both width and height, set the background to yellow, and give it a ridge border with a drop shadow.
Note: The solution for this activity can be found in Appendix A, Solutions to Practice Activities.
260
11
Enhancing Views
Topic A: Dene Hierarchical Views Topic B: Display Response Data in Views Topic C: Implement Shared Columns Topic D: Enable IBM Lotus Sametime Instant Messaging in Views Topic E: Create Views for the Web
Introduction
After completing this lesson, you should be able to: Identify the characteristics of hierarchical views. Describe how view selection formulas can be used to display data from more than one form. Implement shared columns. Enable a column for instant messaging. Create a view for the Web.
262
Create a view. Write an appropriate selection formula. Set the Show response documents in a hierarchy View property. Create columns to display the data. Create a responses only column for displaying the response documents. Save and test the view.
263
Responses-Only Columns
A responses-only column displays data from a document only if that document is a response or response to response document. The responses-only column should be positioned to the left of the column under which you want it to indent. The data displayed for a responses-only column starts just to the right of where you position it in the row, and extends to take up the entire row. Note the following about placement of columns: Columns to the left of the responses-only column, such as a date, will display response data (if available in the document) in the row.
Columns to the right of the responses-only column do not appear for response documents; the contents of the responses-only column appear instead.
264
Open the view in IBM Lotus Domino Designer. Create a new column to the left of the column under which responses will indent. On the Basics tab of the Column Properties box:
Leave the column title blank. Set the width to 1. Select Show responses only.
4. 5. 6.
Write a column formula that displays information about the response documents in the column, such as subject, authors, and creation dates. Save the view. Test the view by previewing it in IBM Lotus Notes.
265
On the Lotus Domino Designer menu, click CreateDesignShared Column. Or, in the Design pane, select Shared CodeColumns and click the New Shared Column button.
2. 3.
Enter a name in the Shared Column Properties box. Optionally, enter an alias and comments. In the Properties box, switch to Column and enter a title for the shared column. Make any additional changes, as desired. All standard column properties are available for the shared column. Note: When you rst create a shared column or when you open it for editing, the Shared Column properties will appear by default. You must switch to the Column properties to make changes to properties such as title and style.
4. 5.
In the Objects pane, select Column value. In the Programmers pane click Simple Function, Field, or Formula, then enter the function, eld, or formula to display in the shared column. Note: When you rst create a shared column or when you open it for editing, the Shared Column Properties box will appear by default. You must switch to the Column Properties to change properties such as title and style.
6.
Open the view with the desired column into the Lotus Domino Designer.
266
Select the column to share and choose CreateCopy as shared column or right-click the column and choose Copy as shared column. In the dialog box, enter a name for the new shared column. Click OK to save the column. Note: The column that was used to create the shared column is not affected by any changes to the new shared column.
Open the view where you want to place the shared column in the Lotus Domino Designer. Click an existing column where you want to place the shared column. From the menu, choose CreateInsert New Shared Column or Append New Shared Column. Select the Use Formula Only box if you want to change the formatting of the shared column directly in this view. If selected, any formatting changes you make in this view will not affect other instances of the shared column, and any formatting changes you make to the shared column outside of this view will not be propagated to this instance of the shared column. If you do not select this box at the time of insertion, you will not be able to change the properties of the column inside this view.
In the Design pane, select Shared CodeColumns and double-click the name of the shared column. Make any desired changes to the shared column in the Column Properties box and in the Programmers pane. Save the changes. When you save the changes, any view using the shared column will be updated. Note: If you change the name of a shared column (not the column title) in the Shared Column Properties box, any view that uses the shared column with the old name will not be updated.
267
In the Design pane, select Shared CodeColumns. Highlight the name of the shared column to be deleted and press Delete or choose EditDelete. Note: When a shared column is deleted it is not removed from any views where it is used. The column reverts to a standard or unshared column.
268
269
270
271
Create a column. On the Advanced Format tab in the Column Properties box, from the Style list, click the Names style. Select the following options:
3.
Enter a column formula that abbreviates to a name in the abbreviated form of the full hierarchical name. This name is required as a look-up value to retrieve the instant message status for a user.
Note: To reduce the possibility of ambiguous names, you can create a column that displays a users short name and link that column to a hidden column (using the hidden columns programmatic name) containing the abbreviated hierarchical name.
272
273
Embedded Views
Embedded elements are objects and controls that can be embedded on a page, form, subform, or document. Elements that can be embedded include: Views
When you embed a view on a form, subform, page, or document, you can control the size and appearance of a view, especially on the Web. Embedding a view lets you combine views with other form and page elements (such as styled text) and graphics, including a background image le. The generic navigation graphics and links do not appear so that you can replace them with your own.
274
Select a view from the list in the current application or from any other application on the server. Note: You can also choose the view at run-time via a formula.
Using a Java applet (the view applet) Using HTML Using the views Display property
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 Delete to mark documents for deletion from the application.
Displaying the embedded view using the view applet has advantages and disadvantages. The following table lists some of each.
275
Advantages Select multiple items from the list. Can scroll through large lists of items.
Disadvantages Slow to download. May not execute identically on all browsers. Firewall may prohibit applet download.
276
Embed the view in a page or form. Open the Embedded View Properties box and select the Info tab. Result: The following graphic shows the Info tab in the Embedded View Properties box.
3.
277
Figure 11-5: Display options for an embedded view The width and height do not affect the display of an HTML view. Many of the other display options, such as Show selection margin, will show up in the resulting HTML view.
278
The following gure shows the Advanced tab of the View Properties box.
Is there more data than will t on the screen? Will data columns be too close to each other? Are graphics needed in view columns?
Some of the more useful properties of views are functional when the view is displayed in a Web browser, including action buttons and Click on column header to sort.
279
Link Columns
An important design aspect of a view is to select a link column. This is the column of the view that behaves as a link when displayed in a Web browser. By default, the rst column is the link column. The following gure shows the Show values in this column as links property.
280
281
Lesson Summary
In this lesson, you worked with hierarchical views, response data, shared columns, and instant messaging features related to views. By adding increased functionality in displaying data that might require instant communication or the display of multiple levels of information, you can create components that get the job done without bothering users who would otherwise have to use multiple areas of an application or interrupt their work to communicate with co-workers through other means.
282
1. Create a view that displays the subject eld of the question document,
2. Show the subject of the answer document, along with the date the
283
1. In the Q&A view of your copy of the Policies and Procedures application,
create a column called Whos Online? Place the new column to the right of the Question column, and make the width at least 18 characters.
2. Enter a formula that abbreviates the full hierarchical name of the contact
3. Set the column style to Names, and set the options for the column to
284
12
Topic A: Create Actions Topic B: Create Shared Actions Topic C: Control the Display of Actions Topic D: Create Action Hotspots
Introduction
After completing this lesson, you should be able to: Create instant messaging chat action buttons. Insert shared actions. Describe how Web clients display actions. Create action hotspots.
286
Update information. Simplify the usage of the application. Perform complex calculations. Check for errors. Re-create IBM Lotus Notes menu commands as buttons. For example:
Mail the current document. Calculate complex formulas that do not need to be saved with individual documents.
Dene the purpose of the action. Dene the most appropriate programming language for the action. Dene where the action appears. Dene when the action appears. Dene the actions formatting.
287
Note: Simple actions cannot be customized and are not supported in Web applications.
Action Display
Actions in a view are available to users when the view is opened. Actions in a form are available when a document created with the form is displayed, or a new document is created with the form. Users access actions either from: The Lotus Notes Actions menu command.
The Action bar is a row of buttons across the top of a form or view. To execute an action from the Action bar, users simply click the button.
288
Action Properties
Like other IBM Lotus Domino Designer features, actions are modied using their properties box. The following gure shows the Action Properties box.
289
Type: Button Include action in Action Bar Include action in Action menu
5.
Select the following hide/when options. Hide action when document is:
6. 7.
Ensure that Client and Formula are selected in the Programmers pane. In the Script area of the Programmers pane, type the formula: @Command([EditDocument])
8.
290
System Actions
By default, new forms and views do not contain actions. Lotus Domino Designer provides a set of predened system actions for common tasks. System actions can be added to a form or view. The following is a list of IBM Lotus Domino system actions: Categorize
Edit Document Send Document Forward Move to Folder Remove from Folder
System actions cannot be modied and do not translate to Web applications. You can create your own actions to perform the same functions using the Formula language instead.
Open the form or view in Lotus Domino Designer. Choose CreateActionInsert System Actions. Result: The system actions are added to the Action pane.
3.
291
@Commands
@Commands are special functions that simulate the functionality of Lotus Notes menu commands. For example, use @command ([Compose]) to create a button that creates a new document based on a specic form. The syntax for using @commands is: @Command([command];parameters);
@Command Compose
Function Creates a new document with the specied form. Saves the current document. Closes the current window. Opens the currently selected document for editing.
FileSave
@Command ([FileSave])
FileCloseWindow
@Command ([FileCloseWindow])
EditDocument
@Command ([EditDocument])
Note: To Web-enable all action buttons in a application as well as certain @commands, select the application property Web access: Use JavaScript when generating pages. Without this property set, Lotus Domino recognizes only the rst button in a document and treats it by default as a Submit button that closes and saves the document.
292
Evaluated After All @Functions EditClear EditProle FileCloseWindow FileExit ViewChange Clear
Evaluated Immediately
Description Returns the group names in the instant messaging contact list. Adds a name or names to a personal group in an instant messaging contact list. Initiates a chat with one or more users. Toggles the on/off display of the instant messaging contact list.
@Command([AddToIMContactList])
@Command([SendInstantMessage])
@Command([ShowHideIMContactList])
293
Open the application in Lotus Domino Designer. In the Design pane, click Shared Code. Then, click Actions. Click New Shared Action. The Shared Actions Properties box opens. Create the shared action as you would any action. Save the shared action.
294
In Lotus Domino Designer, open the form or view where you want to use the shared action. If you are designing a view, choose CreateInsert Shared Action from the menu. If you are designing a form, choose CreateActionInsert Shared Action.
3. 4.
Select the shared action you want to insert. Click Insert. Click Done. Result: The shared action is inserted into the Action pane.
5.
295
Sub actions group related actions under a single main menu choice or button. Use sub actions if you have: A long list of actions and do not want to overwhelm users.
Related actions that you want to group together. Very little space left in the Action bar and want to avoid requiring the user to scroll horizontally.
Open the form or view you want to modify. Choose CreateActionAction with Sub Action. Result: An untitled action is created as a placeholder for the new sub action. To name this action placeholder, open its Properties box.
3. 4. 5. 6.
Enter a name for the sub action. Program the sub action. Save and preview the form or view. To add more sub actions, select the placeholder, then choose Create Action.
Action Order
Actions and sub actions appear in the order in which they were created. You can rearrange this order in a more logical sequence.
296
Open the form or view with actions in Lotus Domino Designer. Open the Action pane. Click the action or action header. Click and drag the action to a different position. Save and preview the form or view.
Hide an action that saves a document when the document is in Read mode.
Note: Hide/When formulas execute when the document or view with which the action is associated is refreshed.
Open the form or view. Select the action. Choose DesignAction Properties. Click the Action Hide When tab. Select the appropriate options. Save and preview the form or view.
297
298
Action Bar
The Action bar displays action buttons at the top of a form or view. Lotus Domino gives you the option of changing some of the Action bars properties. To alter the Action bar, you can: Change the Action bars appearance by specifying:
Alignment options for action buttons. Background image or color for buttons on the bar. The style and color of the bottom border.
Enable the Lotus Domino Action bar applet for Web users.
Actions that appear on the button bar use the Action Bar Properties box to set additional characteristics, such as font, color, and button size.
Open the form or view in Lotus Domino Designer. Select any action in the Action pane. Choose DesignAction Bar Properties from the menu. Result: The Action Bar Properties box opens.
4.
Select the button bar alignment. Select how to display the button bar for Web users. Select the button bar size. Select the button bar background color. Select the button bar background image and how it is displayed. Select the button bar border style and effect. Select button size. Select button display options. Select button background color or image.
5.
6.
7.
8.
299
Select the font properties for all buttons on the Action Bar.
Web Access
In the Action Bar Properties box, you can use a Java applet for Web access. The Java applet: Provides a scroll bar, when needed.
Looks like the Action bar in the Lotus Notes client. Supports cascading actions. When the user clicks the main action, the action selections appear as a second row of slightly smaller buttons.
Open the Action Bar Properties box. In the Basics tab, select Using Java Applet under Web Access Display. Close the Action Bar Properties box.
300
Text Graphics
Open a form, subform, or page. Click and drag to select the text or image to be associated with a hotspot. Choose CreateHotspotAction Hotspot. Result: An Action Hotspot Properties box appears.
4. 5. 6. 7.
In the Run area of the Programmers pane, select either Web or Client from the list. Select a programming language from the code list. Enter the code in the Programmers pane. Save and preview the form, subform, or page.
301
Lesson Summary
In this lesson, you worked with actions. By learning what actions are and how to use them, you can automate data entry and processing tasks that would be redundant and inefficient for users to have to undertake.
302
Lab 12-1: Create Instant Messaging Action Buttons in a View (Optional Lab)
Scenario The Worldwide Corporation would like to add buttons to the All Documents view in the Policies and Procedures application to provide users with the ability to contact document authors and to show/hide online status icons.
Note: The guided solution to this activity can be found in Appendix A, Solutions to Practice Activities.
instant messaging chat action button called Chat. Use the @command SendInstantMessage.
3. In the Lotus Notes client, open the Q&A view, and conrm that the but-
303
Create a policy or a question from the Policies view. Edit a policy when the document is open. Create a question or an answer from the Q&A view. Edit a question or an answer either when a document is open or selected in the Q&A view. Save any of the documents by clicking a button instead of using menu commands.
2. Make a list of actions you need to create and where they are to be
used.
4. Create the actions and add them to the appropriate views and forms.
304
13
Introduction
After completing this lesson, you should be able to: Identify the relationship between agents and the documents they can process. Generate agents.
306
Agents are not associated with a specic design element. Agents can be run on a specic server, on several servers, on workstations, or on the Web. Agents can call other agents. Agents can consist of simple actions, formulas, IBM LotusScript, or Java programs. Agents can be distributed easily because they can be replicated. Agents can be shared or private. Agents are often triggered by the server.
You can use agents to set up user-activated or background tasks that run on a schedule. You can use agents to run automated tasks for views, documents, elds, and applications.
Form and view actions work only when the form or view is open. Agents are not restricted to a specic form or view. Use agents to set up user-activated tasks or background tasks in any part of a Lotus Domino application.
Examples of agents
Use agents to:
Update a group of documents. Archive documents. Send messages and documents. Run other agents.
307
Types of agents
There are two types of agents:
Shared agents are agents created by one user and can be run by other users or scheduled to run on the server. Private agents are agents that users create for themselves. Users cannot run another users private agent. Private agents are stored on the machine where the agent is created.
Once an agent is created, its type can be changed from shared to private, and vice versa, at a later date. This could be used to test a new agent on a live application before it is distributed generally.
Parts of an agent
The following table describes the parts of an agent.
Function Species when the agent program should run. Selects documents the agent program acts upon. Species the code to execute.
308
Figure 13-1: The Agent Work pane and the Agent Properties box
Agent Properties
Use options in the Agent Properties box to dene an agent to run:
309
Option Store search in search bar menu Store highlights in document Run in background client thread
Search matches are highlighted in the searched documents. Runs an agent in the background without having to wait until it completes. 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 benet of this feature, the application should reside on a server and the agent must be invoked via the client.
310
Decide what the agent is to accomplish. Decide when it should run. Dene what documents it should run against. Decide where the agent is going to run.
Programming Options
Agents can run any of the following types of programs:
311
The following example selects only documents created using the Employee Information form:
SELECT Form="Employee Information"
If you do not include a SELECT statement in the formula, IBM Lotus Domino Designer appends the following formula to your code:
SELECT @All
Generally, a SELECT statement must be the rst statement in a formula. SELECT @All is the only one that can be placed at the end of a formula.
Field Updates
Agents can add new elds to existing documents or modify existing elds. To do this, use the keyword FIELD in a formula. FIELD is a reserved word used to add a value to a new or existing eld. The syntax for using FIELD is as follows:
FIELD fieldname := value
312
Agent Activation
Once you have decided what the agent will do, you need to determine how you want it activated. The following table describes design options for when the agent runs.
Example By the user via the Actions menu in the Lotus Notes client. If documents have been created or modied.
Agent Events
The following table describes the events that can trigger an agent and examples of when to use them.
When to Use It Before mail is deposited in the mail application; for example, to delete unwanted mail. Once new mail is delivered to the client; for example, to forward mail while a user is on vacation. To update new or existing documents; for example, to change an area code for phone numbers. When copied documents are pasted into the application and need to be modied as they are being pasted; for example, to add the current date to the document. The agent is manually activated by the user or is a Web Query Save or Web Query Open agent. The agent is run only by another agent or is still under development and you need to hide it from the users.
313
Scheduled Events
The following table lists when agents can be scheduled to run.
Used for Critical tasks that are run frequently. Any agent, regardless of how frequently it is run, can severely affect a servers performance. Important tasks that are not as high priority as critical tasks; for example, sending a company-wide e-mail. Routine tasks; for example, calculating a departments sales performance. Low-priority tasks; for example, deleting older documents. Agents that you do not want to run in particular circumstances; for example, agents that run on the Web or agents that are disabled or called by other agents. Regular administrative tasks, such as statistics gathering, that must occur when the server starts.
Daily
Weekly
Monthly
Never
Note: In most circumstances, you should schedule the running of agents based on the business need for having the work accomplished in a proper time frame.
Document Processing
Options for which documents the agent processes depend on when the agent runs.
314
The following table shows examples of which documents different agents can process.
All documents in the application. New documents and documents modied since the last run of the agent.
Note: SELECT statements in Formula language, as well as other statements in LotusScript and Java, can modify all documents in the application.
315
May include letters, numbers, spaces, and punctuation. Should be self-descriptive. Should be short, if appearing as items on the Actions menu.
The names you give to manually run agents appear as options on the Actions menu. Use an alias (an internal name for an agent) when naming an agent. This allows you to change or translate the name that users see without disabling formulas that reference the original name.
Open the application in Lotus Domino Designer. Select Agents under the Shared Code design element. Click New Agent. Name the agent and add a comment, if desired. Select the agent option Shared or Private. Select the agent trigger On Event or On Schedule. Select the appropriate agent trigger option from the list. Select the appropriate documents for the agent to target from the Target option list. Close the Agent Properties box.
10. Select the appropriate programming type from the list. 11. Enter the programs code into the Programmers pane. 12. Save and test the agent.
316
Lesson Summary
In this lesson, you worked with agents. By learning what agents are and how to use them, you can automate data entry and processing tasks that would be redundant and inefficient for users to have to undertake.
317
1. Write a formula that computes the policy number and saves the new
4. Challenge
Modify the Policy form so that it computes a new policy number when a new Policy document is created.
318
14
Securing Applications
Topic A: Explore Application Access Topic B: Implement Roles Topic C: Use Readers and Authors Fields Topic D: Control Access for Anonymous Users
Introduction
After completing this lesson, you should be able to: Describe user types. Use a formula to set the Hide/When property for a eld. Create an Authors eld. Identify access levels for high-security applications.
320
321
Note: Physical security is also an important part of any security plan. You must secure access to the server, the devices that access the server, and any storage media that holds backed-up data.
Is Where the Domino Application Manager Assigns users, groups, and servers their levels of access. Creates user roles. Views a history of the last 20 changes made to the Access Control List. It also tracks who made the changes and what was done. Performs advanced security tasks.
Advanced
322
Privileges No access to the application at all. Depositors can create documents, but cannot read, edit, or delete documents, including those they create. Readers can read documents, but cannot create, edit, or delete documents. Authors can create and read documents, but cannot edit documents unless specied in the document itself. Editors can create, read, and edit all documents unless there are restrictions on specic documents. Designers can perform the same functions as an Editor, except where restrictions exist on specic documents. Designers also can modify the application design, but cannot delete the application or change its ACL. Managers can perform all functions, including creating and modifying the ACL and deleting the application.
Reader
Author
Editor
Designer
Manager
User Identiers
The Lotus Domino Directory is like a phone book of all the users and servers in the Lotus Domino environment. System administrators set up user names and groups of users that developers can use when dening access to applications. The application manager adds individual user names, group names, and server names to the ACL of the application to control access to the application.
323
The Access Control List denes access rights for users in four ways. The following table describes the purpose of each option.
Denes Access for Any user who is not specically listed in the ACL (individually or in a group). A list of people who can all access the same functionality in the application. If a user is a member of two groups, and both groups appear in the ACL, the user receives the higher access level. A specic IBM Lotus Notes or Web user. This will override settings for any group to which the individual belongs. Any unauthenticated Lotus Notes or Web user. If there is no Anonymous entry in the Access Control List, unauthenticated users will use the Default access level.
Groups
Individual names
Anonymous
In Order to Prevent unknown users from accessing the application Grant anyone the ability to read documents Allow all users in the Students group to modify the application Preview your forms in a Web browser, as you are working on the application design
324
Select or open the application in either the IBM Lotus Notes client or IBM Lotus Domino Designer. Choose FileApplicationAccess Control from the menu. Result: The Access Control List dialog box appears.
Access Options
Each access level has up to eight options that Lotus Domino application managers can turn on or off, further rening users privileges. For example, you can control whether users with Editor access can delete documents.
325
The following table describes the default and optional access privileges and which levels they are associated with.
Optional Privileges Read public documents Write public documents Read public documents Write public documents Create private agents Create personal folders/views Create LotusScript/Java agents Write public documents Create documents Delete documents Create private agents Create personal folders/views Create LotusScript/Java agents Write public documents Delete documents Create private agents Create personal folders/views Create shared folders/views Create LotusScript/Java agents Delete documents Create LotusScript/Java agents
Depositor
Create documents
Reader
Author
Editor
Designer
Create documents Create private agents Create personal folders/ views Create shared folders/views Read public documents Write public documents Create documents Create private agents Create personal folders/ views Create shared folders/views Create LotusScript/Java agents Read public documents Write public documents
Manager
Delete documents
326
Enable the read and write public documents options to give users with No Access or Depositor access limited access to specic forms, views, and documents.
User Types
User types specify whether a name in the ACL is a person, server, or group. They can protect your application from the following scenario. Chris Jones opens the ACL to the Policies and Procedures application and notes that Terry Smith has Editor access.
Chris Jones gets access to the server, creates a group called Terry Smith, and adds himself to the group. Chris Jones now has access to the Policies and Procedures application as part of the group Terry Smith.
One way to prevent this is to designate Terry Smith as an individual with the Person user type. The following table lists each user type, to whom it can be assigned, and what it does.
Assigned to An individual user, including individuals on a server workstation. A single server, including a server console and server workstation.
Server
Prevents someone from accessing the application from a Lotus Domino workstation using the server ID. Identies a group of servers that will host replicas of the application. Grants Person access to each user in a group without listing each user in the ACL. Grants the same access to a group of users and servers. Has Lotus Domino look up the user type in the Address Book.
Server Group
A group of servers.
Person Group
Mixed Group
Unspecied
The application manager applies user types to meet the access restrictions.
327
Provide a exible method of restricting access to a specic set of users. Can be used in formulas. Provide a method to dene a set of users within an application. Do not need to be maintained or added as a group in the organizations Lotus Domino Directory. Make it unnecessary to modify the application when users leave or new users join. Can be assigned to multiple groups and users in the ACL, which can simplify application development and maintenance.
Dening Roles
Dening a role in the ACL is a two-step process: 1. Create the role in the ACL. 2. Assign roles to users or groups.
328
Choose FileApplicationAccess Control. Result: The Access Control List box opens.
2. 3.
Click Roles in the Contents pane. Click Add. Result: The Add Roles dialog box appears
4. 5.
Enter a name for the role. The name may be up to 15 characters long. Click OK. Result: The Role name appears in brackets in the Roles list.
Open the application in either the Lotus Notes client or Lotus Domino Designer. Choose FileApplicationAccess Control. Highlight any entry in the Name list. Select a Role from the Roles dialog box. Result: A check mark appears beside the Role selected.
5.
Click OK. Once roles have been assigned to users, you can use them to determine what users can do or see in the application.
Access Control
Incorporate roles into formulas to control access to parts of the application and to dene responsibilities within the application. By using the name of the role in a formula, rather than actual user names, you simplify the construction of the formula and make the application easier to maintain.
329
You can apply roles to further rene control within the application. For example, with roles, you can control who can: Access specic views and folders.
Create documents. Read the documents. Edit the documents. Access portions of a document.
This section shows how to write a formula to determine who can see a specic design element based on a role. This involves capturing the current users role and comparing it in a Hide When formula.
Returns A text list of the roles for the current user. A text list including the current user name, any groups for the current user, and any roles for current user. A list of specic roles on all the desired applications regardless of where the application is located.
@UserRoles
Use the @IsNotMember function to determine if a text string does not match an item in a list. The syntax for using @IsNotMember is:
330
The following table provides some examples of using @IsMember and @IsNotMember.
Returns True, if the current user is assigned the Student role True, if the current user is not assigned the Student role True, if the current user is not assigned the Student role
All roles assigned through the application ACL begin and end with square brackets, as shown in the examples above. There is a system-assigned role, $$Web Client, that automatically appears whenever the user is connected to the application through a Web browser. It does not contain the square brackets. It can be used to affect screen presentation and logic in applications used with both the Lotus Notes client and Web browsers. Roles do not function on a local replica of a application unless the advanced ACL check box Enforce a consistent Access Control List across all replicas is selected.
331
Open the design elements Properties box. Click the Paragraph Hide/When tab. Select Hide paragraph if formula is true. Enter a formula that evaluates to True (1) or False (0).
Caution: Using Hide When to hide the contents of a eld does not provide true security. Users can still see the contents of the eld by using the Document Properties box. Use encryption to secure the data in a eld for Lotus Notes clients.
332
Create access
Form property: Show in Create menu Create access lists Action buttons
This section focuses on using Readers and Authors elds to control document access.
333
Readers Fields
A Readers eld restricts readership of a document to those users and servers that are listed in the eld. It is a special type of multiple-value text eld designed to interact with the Access Control List (ACL). By specically listing users, groups, and roles in a Readers eld, you can control who can read individual documents. This can be very useful in a scenario requiring an approval process. With a Readers eld, you can restrict access to any documents that are not approved; if the documents are approved, the restrictions are unnecessary.
Documents with a Readers eld are only visible to users listed in the Readers eld. Other users do not see those documents. In a categorized view, categories that exist only in invisible documents will not appear if the row check box Dont show empty categories is selected. If the check box is not selected, the category will be displayed, but the documents associated with it will not appear.
Thus, you may not need to alter the view to hide certain documents from general viewing.
334
Specifying Readers
Entries in a Readers eld must compute to a text value. Designers and managers specify readers in a Readers eld by using one of the following methods: Write a formula to compute user names, roles, or groups. This is the most frequently used option, as it allows designers to predetermine the readers. For example:
"[Policy Managers]" : "Suzy Sunshine" : "Managers"
Make the eld editable, so application Authors and Editors can select and change readers.
Open a form in Lotus Domino Designer. Create a eld, selecting Readers as the eld data type. Specify the readers.
Authors Fields
Users with Author access to a application may be able to create and read documents. By default, they cannot edit documents (not even the documents they create themselves). For users with Author access to edit the documents they create, they must be listed in an Authors eld in the document.
335
This section describes how to use an Authors eld to dene editing capabilities for users with Author access to the application. An Authors eld is a type of eld that works in conjunction with the Author access level in the applications Access Control List. Authors elds do not override the settings in the Access Control List. They offer developers more control over which users can edit data in the application. Users with an access level that gives them edit privileges (Editor or higher) can edit any document that they can see, even if their names are not in the Authors eld of a document. Similarly, users with a level of No Access cannot edit a document, even if their names are in the Authors eld.
336
ACL Level
Author Author Author Manager Manager Manager Editor Editor Editor Reader Reader Reader
As with Readers elds, you can compute the value of an Authors eld, or allow the user to select Authors for the document. Use the @UserName function to capture the name of the current Lotus Notes user. You can use this function to dynamically compute the value of an Authors eld.
337
Create a eld on the form from which the documents will be created. In the Field Properties box, on the Basics tab, select Authors as the eld type. Select one of the following to determine when the eld obtains its value:
Editable allows those who create the document to designate who can edit the document. Computed lls in the value based on a formula each time the document is refreshed. Computed when composed will evaluate only if the data does not already exist. This value is computed only once. Computed for display. Because they do not store an item or a value in a note, Computed for display is not appropriate for this type of eld.
4.
Enter a formula to calculate the value of the eld. Note: Computed elds must have a formula. Editable elds can use a formula to calculate a default value that the user can change.
338
Open the application in Lotus Domino Designer. Open the applications Access Control List. Add an entry for the group Anonymous. Assign the access level you want to give to anonymous users.
Web User -DefaultAnonymous Supervisors Maximum Internet name and password access Author Author Editor Editor
Access Level
339
Web User -DefaultAnonymous Authorized readers Contributors Supervisors Maximum Internet name and password access No Access No Access Reader Author Editor Reader
Access Level
340
Lesson Summary
In this lesson, you received an overview on application security. By becoming familiar with the different levels of security, how they interact with each other, and how they together protect data integrity and privacy, you can create applications that are able to manage important information requiring protection from unwanted users.
341
1. Working with the instructor and the rest of the class, plan the ACL. For the Default user type, the used. access control level should be
2.
3.
4.
5.
6.
7.
8. Observe as your instructor modies the ACL for the Policies and Pro-
342
Fundamentals folder on the classroom server (Hub/SVR/WWCorp). Append your student## to the end of the application name and the le name. (Example: For student01, name the application Policies and Procedures 01, and the le Policies ABC.nsf. You will use this copy later in this lesson.
343
1. Determine appropriate roles for the application. You will do this in con-
Role
Description
2. Create the roles in your copy of the Policies and Procedures ## appli-
344
Lab 14-3: Control Access to Documents in the Policies and Procedures Application
Scenario In this lab, you will control access to documents in the Policies and Procedures application based on the following:
All employees should be able to read any document in the application. The people who create documents should be able to edit them. Members of the Managers and Policy Makers groups should be assigned the PWriters role. Only people assigned the PWriters role should be able to create Policy documents. All employees can create Question documents. Only the person who creates a Question should be able to modify it. Only PWriters should be able to create and edit Answers.
Note: The guided solution to this lab can be found in Appendix A, Solutions to Practice Activities.
1. This activity involves making changes to the ACL and the Policy, Ques-
tion, and Answer forms. Determine the changes that need to be made and implement them.
2. Work with other students to help test that your application works as
expected.
345
15
Deploying Applications
Introduction
After completing this lesson, you should be able to: Describe replica creation.
348
A development template, which you use to perform updates and bug xes. Once you nish testing the modications, you replace the production template with the development template. A backup template, which is the previous version of the production template. You want this in case you need to roll back to the previous version. Make a backup of the production template before you replace it with the newer development template. Many sites store multiple versions of the backup template.
A possible workow that involves templates could look something like the following: 1. Development NSF new copy without documents to Development .NTF.
Check for prohibit design check marks before the copy. Add new group ACL entries with square brackets. Fill out template name information to make a template and check the Advanced Template checkbox as appropriate. Resign the database template with a signing ID.
2. 3.
Create a new database from the new template (or replace the design to test an applcation upgrade).
Create any categories needed to get started. Test until satised. Create a new application or replace the design of the existing application, whichever is the more applicable.
4.
349
Create a template out of the new application. Create a new application from the newly created template. Modify the ACL of the new application so that it will be properly secured and replicate correctly. Create a new replica of the application on the server.
Note: You might also need to disable any scheduled agents that can interfere with production or send mail erroneously.
Update the design of the template. Refresh the design of the local application. Test. Replicate with the server to replicate the design changes. Test.
Templates
A template is an IBM Lotus Domino le that contains the design structure for a Lotus Domino application. File extensions differ for applications and templates. The le extension for a Lotus Domino application is .NSF. The le extension for a Lotus Domino template is .NTF. When you use a template to create a application, like you did earlier in the course, the application receives the design elements from the template. IBM Lotus Notes and Lotus Domino ship with several standard application templates. While some are included to provide the design for necessary system applications (log.ntf, catalog.ntf, and so on), others embody the design of valuable business applications. You can create an application from a standard template, customize the standard templates to meet your needs, or create a custom template from scratch. Examples of standard Lotus Domino templates include: Discussion
350
Master Templates
Design templates let you isolate the design and development of an application from the production environment. By managing application design modications using a master design template, you avoid disruption to an application that has been deployed.
Extract the design elements of your application to a new application. Designate the new application as a template. Once the template is created, link your application to the application template.
Select the application in either Lotus Notes or IBM Lotus Domino Designer. Choose FileApplicationNew Copy. Select the location to store the new application. Enter a title. Enter a le name with the NTF extension. Note: The NTF le extension does not make the le a template. It simply causes it to appear as a choice in the list of templates when you create a new application.
6. 7.
Click Specify What to Copy: Database design only. If necessary, uncheck Access Control List. If you do not copy the ACL, any Roles that the application might depend on will be lost.
Select or open the application. Open the Properties box. Click the Design tab. Click the check box to enable the Database le is a master template property.
351
Enter a name for the template. This name is different from the name or title of a application. The template name is the link between the template and the application or applications, and it is a property of the template le.
Select or open the application. Open the Database Properties box. Click the Design tab. Click to place a check mark next to Inherit design from master template. Enter the name of the template.
Replication Control
You were introduced to the replication process and its effects on applications earlier in the course. This section describes the following three ways of controlling the data that replicates: Controlling server access to the application
352
Effect on Replication
No replication occurs. No documents ow with depositor access. The server cannot send new documents because it cannot see which documents are new. Server can receive changes, but cannot send changes. Server can send the following changes: New documents created since last replication. Modications to documents that list the replicating server (or user) in an Authors item. If the server is replicating changes, and it has Author access to the replica application, the server must be listed in the Authors item for replication to occur.
Reader
Author
Editor
Server can send all new documents and changes to existing documents. Server can send all new and modied documents and design elements. Server can send all new and modied documents, design elements, and the ACL.
Designer
Manager
Replication Settings
Replication settings allow a further renement of which documents are going to replicate between any two servers, and between client and server. The following table describes these settings.
353
Settings Remove documents not modied in the last n days Include specic Address Book elds Replicate a subset of Documents
Send
Do not send deletions made in this replica to other replicas Do not send changes in application title and catalog info to other replicas Do not send changes in local security property to other replicas
Other
Temporarily disable replication Scheduled replication priority Only replicate incoming documents saved or modied after a particular date or a CD-ROM publishing date
Advanced
Replicate a subset of Documents between specied servers or specied client and server Replicate specic types of design elements
Open the application. Choose FileReplicationNew Replica. Select the destination server (server on which to place the replica). Keep the default le name and title for the new replica. Select Create: Immediately. Select Copy Access Control List to copy the ACL from the original to the new replica. Click OK.
354
Lesson Summary
In this lesson, you received an overview on how to deploy an application. By becoming familiar with how applications are deployed to users, you can avoid costly mistakes and lost labor that might otherwise occur when application components that have not been adequately tested improperly store and manage data.
355
1. Create a local template from the Policies and Procedures ABC appli-
cation you created during the course. Name it Policies ABC Template, where ABC is your initials.
2. Create a new, local, Policies and Procedures application from the tem-
plate.
3. Make sure that the application is set to inherit future design changes
356
1. Modify the ACL of your Policies and Procedures application so that all
3. Create some new documents in the server copy of the application. Rep-
licate with the local copy to show that the documents replicate properly.
4. In the template, change the design of the Policy form. Perhaps modify
357
Follow-up
In this course, you were introduced to the fundamental concepts needed to perform basic application development in IBM Lotus Domino 8. In addition, that knowledge has prepared you to obtain the additional knowledge needed for building more complex applications in Lotus Domino 8.
Whats Next?
This course is the rst in a series of application development courses. The material in Building Applications for the Web using IBM Lotus Domino Designer 8 provides the knowledge needed to develop Web applications in Lotus Domino Designer 8.
358
Appendix
Solutions to Practice Activities
Appendix
Appendix A Solutions to Practice Activities
360
Build a new application. Create shared images. Create a page. Modify the Information page.
361
Appendix
Appendix A Solutions to Practice Activities Step 11. Action In the Open dialog box, browse for and select the following image les and click Open.
Result: The images are added to the shared resources list. Create an Information page. 12. 13. Click Pages in the Design list. Click New Page. Result: A new, blank page opens in the Work pane. 14. Choose DesignPage Properties. Result: The Page Properties box opens. 15. 16. Name the page Information and close the Page Properties box. Save the Information page.
Modify the Information page 17. With the cursor in the Information page, choose CreateTable. Result: The Create Table box opens. 18. Create a xed width table with two rows and one column. Click OK. Result: A table with two rows and one column is created. 19. Click in the top cell and choose CreateImage Resource. Result: The Image Resource dialog box opens. 20. Select the LOGO WW1.gif le and click OK. Result: The Worldwide logo is added to the rst cell. 21. Click in the bottom cell and type the following; 123 Worldwide Blvd. Metropolis, PA 45555 Result: Worldwides address appears below the company logo. 22. Click below the table. Choose CreateImage Resource. Result: The Image Resource box opens. 23. Select bluerule.gif. Click OK. Result: The bluerule.gif image is added below the table.
362
363
Appendix
Appendix A Solutions to Practice Activities
Activity A-2: Solution to Lesson Lab 5-1: Create a Form that Contains a Table and Fields
Scenario Worldwide Corporation is in the process of creating organizational policies. You have already created your copy of the Policies and Procedures application and Information page. In this lab, you will create the form that will be used to enter the companys policies and procedures. To complete this lab: Create a new form.
Follow these steps to create a form that contains a table and elds.
Step Create a new form. 1. 2. Open your copy of the Policies and Procedures application in Lotus Domino Designer. In the Design pane, click Forms. Result: In the Work pane, the list of existing forms appears. The New Form button appears on the button bar. 3. 4. 5. In the Work pane, click New Form. Choose DesignForm Properties. The Form Properties box opens. Type Policy in the Name eld. Result: Policy appears in the Name box. 6. Close the Form Properties box. Action
Format the Policy form. 7. Type Policies and Procedures at the top of the form. Result: The text appears on the form. 8. Press Enter several times to move the cursor below the title text. Result: The cursor ashes to indicate its position. 9. Click and drag to highlight the text. Choose TextText Properties. Result: The Text Properties box opens. 10. Change the font style and size. For example, Arial Black, 14 pts. Navy Blue. Result: The title text reects the changes.
364
Action
Click OK. Result: The table appears on the form 15. Type the following eld labels in the cells of the rst column:
Policy Number: Policy Title: Effective Date of the Policy: Policy Description: Category:
Result: The eld labels appear in each cell in the rst column. 16. 17. Click in the cell to the right of the rst eld label, Policy Number. Choose CreateField to create a eld with the following characteristics:
Result: The PolicyNo eld is created in the rst cell of the right column. 18. Click in the cell to the right of the Policy Title eld label. Create a eld with the following characteristics:
Result: The PolicyTitle eld is created in the right column. 19. Click in the cell to the right of the Effective Date of the Policy eld label. Create a eld with the following characteristics:
365
Appendix
Appendix A Solutions to Practice Activities Step 20. Action Click in the cell to the right of the Policy Description eld label. Create a eld with the following characteristics:
Result: The PDescription eld is created in the right column. 21. Click in the cell to the right of the Category eld label. Create a eld with the following characteristics:
Result: The Category eld is created in the right column. 22. On the line below the new Category eld, in the same cell create a eld with the following characteristics:
Result: The DCategory eld is created in the right column. 23. Select the Category eld and click the Control tab. Enter the following in the Choices box:
Result: The category choices are created. 24. Select the Category eld. Click the Paragraph Hide/When tab and select to Hide paragraph when document is:
Result: The Category eld will not be seen when the document is in Read mode. 25. Select the DCategory eld. Click the Paragraph Hide/When tab and select to Hide paragraph when document is:
Result: The Display Category eld will not display when the document is being edited. 26. Close the Field Properties box.
366
367
Appendix
Appendix A Solutions to Practice Activities
Display the title of the policy and its effective date (in that order). Organize the documents by the type of policy (Guidelines, Holidays, and so on). Create a categorized view. Create a categorized column.
368
10.
In the Programmers pane, select Field. Select the PolicyTitle eld. Result: The rst column displays the policy titles.
11.
Choose CreateAppend New Column to add a column to the right with the following options:
Title: Effective Date Width: 10 Field: EffectiveDate Style (Advanced Format tab): Date/Time
12.
Clear Display Time. Result: A column displaying the policy effective date appears to the right of the Policy Name column.
13.
Create a categorized column. 14. Open the Policies view in Lotus Domino Designer. Result: The Policies view opens in the Work pane. 15. Choose CreateInsert New Column to add a column to the left with the following options:
Result: A new blank column is inserted to the left of the Policy column. 16. 17. Click the Font tab and select Blue (0,0,255) for the text color. Click the Sorting tab and select the following options:
18.
In the Programmers pane, select Field. Select the Category eld. Result: The document categories are listed in the Work pane.
19. 20.
Save and refresh the view. Create a few more documents for this view by choosing Create DocumentPolicy.
369
Appendix
Appendix A Solutions to Practice Activities
Create a dynamic title for the Policy form 1. Open the Policy form in Lotus Domino Designer. Result: The form appears in the Work pane. 2. On the Objects tab, select Window Title. Result: The Programmers pane is empty. 3. In the Script area, type the following formula: @If(@IsNewDoc;"New Policy"; PolicyTitle) Result: When users create a new policy, the title will display New Policy. When users open or edit an existing document created with the Policy form, the title will display the content of the PolicyTitle eld. 4. Save the form. Result: Lotus Domino Designer stores the changes in the application. 5. Preview the form. Result: The title should display as New Policy. 6. Open an existing Policy in Lotus Notes. Result: The policys name is displayed in the title.
370
Activity A-5: Solution to Lesson Lab 8-2: Automate Data Entry and Formatting
Scenario You need to automate data entry and formatting in the Policy form. The following list details the functionality that Worldwide would like to incorporate into the application: The policy title should be formatted using title case.
Create a eld to capture the date the policy is created. This date should be displayed without the time element. Name it PolicyCreatedDate. The effective date should calculate to one month from the date the policy is created in order to account for an internal review process. This date should also be displayed without the time. When a policy is created, the document should not be saved unless it contains a title and category. Make sure PolicyTitle is entered in proper case Have Lotus Domino automatically enter the documents entry date and display the date only Calculate the EffectiveDate of the policy based on the PolicyCreatedDate Verify that certain elds contain a value before allowing a document to be saved
Make sure PolicyTitle is entered in proper case 1. 2. Open the Policy form in Lotus Domino Designer. Click the PolicyTitle eld. Result: The PolicyTitle eld and its objects appear in the Objects list. 3. In the Script area, type the following formula in the Input Translation object for the eld: @ProperCase(PolicyTitle) Result: The formula appears in the Script area. 4. Save and test the form.
Have Lotus Domino automatically enter the documents entry date and display the date only 5. Place the cursor in the third row of the table on the Policy form.
371
Appendix
Appendix A Solutions to Practice Activities Step 6. Choose TableInsert Row. Result: A blank row is inserted above the Effective Date row. 7. In the left cell, type the eld label: Created Date: Result: The text appears in the left cell. 8. Move the cursor into the right cell. Choose CreateField. Result: The Create Field box opens. 9. Name the eld PolicyCreatedDate with the following options:
Action
Result: The PolicyCreatedDate eld is added to the right cell. 10. Select the Value object for the PolicyCreatedDate eld.
11.
In the Script area, type: @Created Result: The formula appears in the Script window.
12.
Open the Field Properties box and click the Control tab. Ensure that Display Time is not selected. In the Show list, verify that Only month, day and year is selected. Result: The Control tab of the Field Properties box is displayed.
13.
Calculate the EffectiveDate of the policy based on the PolicyCreatedDate 14. 15. Open the Policy form in Lotus Domino Designer. Click the EffectiveDate eld. Result: The EffectiveDate eld and its objects appear in the Objects list. 16. Open the Field Properties box. Change the eld from Editable to Computed. Result: The eld type is changed to indicate that the eld is going to be computed. 17. In the Script area, enter the following formula in the Value object for the eld: @Adjust(PolicyCreatedDate;0;1;0;0;0;0) Result: The formula appears in the Script window. 18. Save and test the form.
Verify that certain elds contain a value before allowing a document to be saved
372
373
Appendix
Appendix A Solutions to Practice Activities
Activity A-6: Solution to Lesson Lab 8-3: Compute a List of Choices for a Field
Scenario To make the Policies and Procedures application easier to maintain over time, create a view that contains the policy categories in the rst column. When a policy is created or edited, the categories should be displayed from the Categories view. In order to accomplish this:: Create a Category form with a eld named Category.
Office Guidelines Benets Holidays Grievance Procedures Security E-mail Etiquette Diversity
Create a view called Categories that only displays the Category documents. Modify the Policy form to perform a lookup to the Categories view to produce the list of the Category eld. Hint: The view should only display documents with the Category form.
4.
374
7.
8.
Result: A eld named Category is created. 9. Save the form and test in the Lotus Notes client.
Create documents using the Category form. 10. 11. Open the Lotus Notes client. Choose FileOpenLotus Notes Application. Browse for and open your copy of the Policies and Procedures application. Result: The application opens. 12. Choose CreateCategory to create a document using the Category form. Result: The Category form opens. 13. Type Office Guidelines in the Category eld. Save and close the document. Result: The document closes. 14. Add the following categories:
Result: Six additional documents are created using the Category form. Create the Category view to display documents using the Category form 15. Open your copy of the Policies and Procedures application in Lotus Domino Designer. Result: The application opens in the Work pane.
375
Appendix
Appendix A Solutions to Practice Activities Step 16. In the Design pane, click Views. Action
17.
In the Work pane, click New View. Result: The Create View box opens.
18.
Name the view Categories. Click OK. Result: The Categories view appears in the view list.
19.
Open the Categories view. Result: The Categories view opens in the Work pane.
20.
Click View Selection in the Objects tab. Result: The View Selection object opens.
21.
Click Add Condition in the View Programmers pane. Result: The Add Condition dialog box opens.
22.
Select By Form from the Condition list. Result: A list of the forms in the Policies and Procedures application appears.
23.
Select the Category form. Click Add. Result: Uses Category form appears in the Programmers pane.
24.
Double-click the rst view column to open the Column Properties box. Modify the column as follows:
Result: The default column displays Category in its header and is 25 characters wide. 25. In the Programmers pane, select Field. Select Category from the list of elds in the application. Result: The Category column displays the content of the Category eld. 26. Save and preview the view.
Build a list of keyword choices from the Category view 27. Open the Policy form in Lotus Domino Designer. Result: The form appears in the Work pane. 28. Click the Category eld and open the Field Properties box.
29.
376
31.
32.
In the Choices text box, delete the existing choices and type the following formula in the formula window: lutype := "Notes":"NoCache"; db := @DbName; View := "Categories"; col := 1; keylist := @DbColumn(lutype; db; view; col); @If(@IsError(keylist); "No Entries in view"; keylist)
33.
377
Appendix
Appendix A Solutions to Practice Activities
3.
In the Programmers pane, enter the following formula: @If(@ThisValue="";@Failure("Please enter a "+@Replace Substring(@ThisName;"Policy";"Policy ")+".");@Success) Result: The formula returns the message, Please enter a Policy No. if the eld is left empty.
4.
Reuse this formula by copying it and pasting it as an Input Validation formula for the PolicyTitle eld. Result: The formula returns the message, Please enter your Policy Title if the eld is left empty.
5.
378
2.
Insert another row in the table between Created Date and Effective Date of Policy.
3.
4.
5.
Allow multiple values Display date only Advanced: Display separate values with new line Hide paragraph if L_ModiedDates=NULL Formula: @If(@IsNewDoc;@Return(NULL);NULL); @If(@IsDocBeingSaved;NULL;@Return(@ThisValue)); @If(@ThisValue=NULL;@Today;@ThisValue:@Today);
6.
On the line below the new eld, but in the same table cell, type the following text: N/A and hide it when L_ModiedDates!=NULL.
379
Appendix
Appendix A Solutions to Practice Activities Step 7. Action Revise the formula for the Effective Date eld to look like this: @If((L_ModifiedDates=NULL;@Return (@Adjust(PolicyCreatedDate;0;1;0;0;0;0));NULL); NumberofModifications:=@Count(L_ModifiedDates); @Return(@Adjust(L_ModifiedDates[NumberofModifications] ;0;1;0;0;0;0))
8.
380
Activity A-9: Solution to Lesson Lab 10-1: Create Question and Answer Forms in the Policies and Procedures Application
Scenario The Worldwide Corporation wants to make it easier for employees to ask questions and receive answers about company policies. In this activity, you will create Question and Answer forms. The Answer form needs to inherit information from the Question form. Both forms should have a consistent look and feel. This activity has the following parts:
Use a layer and the mod_menu_background.gif le to enhance the look of the forms. Create a subform to provide a consistent header to both forms. Design and create the Question form. Design and create the Answer form. Create the header subform. Create a shared image. Use a layer and the mod_menu_background.gif le to enhance the look of the forms. Design and create the Question form. Design and create the Answer form.
2.
In the Design pane, select Shared CodeSubforms. Result: A list of current subforms appears in the Work pane.
3.
Click New Subform. Result: A blank subform opens in the Work pane.
4.
With the cursor on the Info page, choose CreateTable. Result: The Create Table box opens.
381
Appendix
Appendix A Solutions to Practice Activities Step 5. Action Create a Fit with margins table with one row and two columns. Click OK. Result: A table with one row and two columns is created. 6. Select the entire table. On the Cell Borders tab of the Table Properties box, set all borders to 0.
7.
Click in the left cell, and choose CreateImage Resource. Result: The Insert Image Resource box opens.
8.
Select the LOGO WW1.gif le and click OK. Result: The Worldwide logo is added to the rst cell.
9.
Click in the right cell and enter the following text: 123 Worldwide Blvd. Metropolis, PA 45555 Result: Worldwides address appears to the right of the company logo.
10.
Click below the table and choose CreateImage Resource. If necessary, select bluerule.gif and click OK. Result: The bluerule.gif image is added below the table.
11.
Close and save the subform as Worldwide Header Result: The subform closes and Worldwide Header appears as an available subform in the subforms list.
Create a shared image 12. 13. Click Shared Resources in the Design list. Click Images. Result: A list of shared images appears in the Work pane. 14. In the Work pane, click New Image Resource. Result: The New Image Resource dialog box opens. 15. In the New Image Resource dialog box, browse for and select the following image le:
mod_menu_background.gif
Click Open. Result: The image is added to the shared resources list. Create the Question form 16. In the Design pane, click Forms. Result: In the Work pane, the list of existing forms appears. The New Form button appears on the button bar.
382
18.
19.
Type Question in the Name eld. Result: Question appears in the Name box.
20.
21.
22.
Select Worldwide Header. Click OK. Result: The subform is inserted at the top of the Question form.
23.
24.
25.
Position the cursor several spaces below the text and choose Create Table. Result: The Create Table box opens.
26.
Create a xed width table with six rows and two columns. Click OK. Result: A table is inserted on the Question form.
27.
Select the entire table. On the Cell Borders tab of the Table Properties box, set all borders to 0. Close the Table Properties box.
28.
29.
In the rst row, add the following eld label into the left cell and eld into the right cell:
Field label: First Name: Field name: FName Field type: Text, Editable
Result: The rst row is populated with a eld label and eld.
383
Appendix
Appendix A Solutions to Practice Activities Step 30. Action In the second row, add the following eld label into the left cell and eld into the right cell:
Field label: Last Name: Field name: LName Field type: Text, Editable
Result: The second row is populated with a eld label and eld. 31. Complete the next row with the following information:
Field label: Date of Question Field name: QuestionDate Field type: Date/Time, Computed when composed
Result: The row is populated with a eld label and eld. 32. In the Programmers pane, type the following formula:@Today
33.
Result: The row is populated with a eld label. 34. In the right cell, create the following eld:
35.
36.
Field label: Subject Field name: Subject Field type: Text, Editable
384
Field label: Details Field name: Question Field type: Rich Text, Editable
Result: The row is populated with a eld label and eld. 38. Click outside the table. Choose CreateLayer. Result: A blank layer is inserted on the form. 39. Choose LayerLayer Properties. Set the Z-Index to -1. Result: The layer is positioned behind the table. 40. Click the Background tab. Click the Browse images button and select the mod_menu_background.gif image. Click OK. Result: The mod_menu_background.gif image is added to the layer. 41. Set the image to Repeat horizontally.
42.
Resize the layer by clicking and dragging one of the layer corners. Position it behind the table of eld labels and elds. Result: The layer serves as a background to the table.
43.
Click the Window Title object in the Programmers pane, and type the following formula: @If(@IsNewDoc;"New Question"; "Question: " + Subject); Result: The form has a window title.
44.
Create the Answer form. This form will inherit information from the Question form 45. 46. Open your copy of the Policies and Procedures application in Lotus Domino Designer. In the Design pane, click Forms. Result: In the Work pane, the list of existing forms appears. The New Form button appears on the button bar. 47. In the Work pane, click New Form.
48.
385
Appendix
Appendix A Solutions to Practice Activities Step 49. Action Type Answer in the Name eld. Select Response as the form Type. Result: Answer appears in the Name box. 50. Click the Defaults tab and select On Create: Formulas inherit values from selected document. Close the Form Properties box. Result: When a document is created using the form, it will inherit values from another document. 51. Choose CreateResourceInsert Subform. Result: The Insert Subform box opens. 52. Select Worldwide Header. Click OK. Result: The subform is inserted at the top of the Question form. 53. Click below the subform and type the following text:Answer Press Enter several times. Highlight the text and set the font size to 24. 54. Position the cursor several spaces below the text and choose Create Table. Result: The Create Table box opens. 55. Create a xed width table with seven rows and two columns. Click OK. Result: A table is inserted on the Answer form. 56. Select the entire table and on the Cell Borders tab of Table Properties, set all to 0. Close the Table Properties box.
57.
Select the left hand column and right justify the text.
58.
In the rst row, add the following eld label into the left cell and eld into the right cell:
Field label: Answered by Field name: AnsweredBy Field type: Names, Computed when composed
Result: The rst row is populated with a eld label and eld. 59. In the Programmers pane, type the following formula:@UserName Result: The eld derives its value from the user name of the person answering the question. 60. Complete the next row with the following information:
Field label: Question Subject Field name: QuestionSubject Field type: Text, Computed when composed
386
Field label: Date of Question Field name: QuestionDate Field type: Date/Time, Computed when composed
Result: The row is populated with a eld label and eld. 63. In the Programmers pane, type the following formula: QuestionDate
64.
Field label: Link to Question Field name: QuestionLink Field type: Rich Text, Computed
65.
Open the Form Properties box, and click the Defaults tab. Check Inherit entire selected document into rich text eld. Specify QuestionLink as Link, if needed. Close the Form Properties box. Result: A link to the main question document will automatically appear in the QuestionLink eld.
66.
Field label: Answer Subject Field name: AnswerSubject Field type: Text, Editable
Result: The row is populated with a eld label and eld. 67. Complete the next row with the following information:
Field label: Answer Date Field name: AnswerDate Field type: Date/Time, Computed when composed Formula: @Today
68.
Field label: Answer Field name: Answer Field type: Rich Text, Editable
387
Appendix
Appendix A Solutions to Practice Activities Step 69. Action Click outside the table. Choose CreateLayer. Result: A blank layer is inserted on the form. 70. Choose LayerLayer Properties. Set the Z-Index to -1. Result: The layer is positioned behind the table. 71. Click the Background tab. Click the Browse images button and select the mod_menu_background.gif image. Click OK. Result: The mod_menu_background.gif image is added to the layer. 72. Set the image to Repeat horizontally.
73.
Resize the layer by clicking and dragging one of the layer corners. Position it behind the table of eld labels and elds. Result: The layer serves as a background to the table.
74.
Click the Window Title object in the Programmers pane, and type the following formula: @If(@IsNewDoc; "New Answer"; "Answer for " + QuestionSubject); Result: The form has a window title.
75.
76.
388
Activity A-10: Solution to Lesson Lab 10-2: Enable Instant Messaging in a Field (Optional Lab)
Scenario The Worldwide Corporation makes every effort to facilitate internal communication and collaboration. Sometimes, employees have questions about policies that might be too specic or sensitive to use the Question and Answer forms, or more information might be needed in order to answer the question completely. The following tables provide detailed solution steps for two parts of the lab: Add a Names eld that can be used for instant messaging.
Add a Names eld to the Question form that can be used for instant messaging 1. 2. Click the layer, and move it out of the way, so that you can click the table. Click the third row of the table, and choose TableInsert Row.
3.
In the new left cell, type the following text and right-justify it: Contact Person
4.
Name: ContactPerson Type: Names, Editable Input Validation Formula: @If(@ThisValue=NULL;@Failure("Please select a contact person");@Success);
5.
Click the Control tab in the Field Properties box, and select the following:
6.
389
Appendix
Appendix A Solutions to Practice Activities Step 7. Action Move the layer back over the table and re-size as needed.
8.
9.
10.
11.
12.
13.
Right-click the active indicator to display the Chat menu. Choose Chat With to chat with the contact person.
390
Activity A-11: Solution to Lesson Lab 10-3: Embed an Instant Messaging Contact List on a Form (Optional Lab)
Scenario To further facilitate communication and collaboration between Worldwide Corporation employees, you will embed an instant messaging contact list on the Answer form. To complete this lab:
Create a table to hold the embedded contact list. Embed the contact list on the Answer form.
Create a table to hold the embedded contact list 1. 2. Open the Answer form in Lotus Domino Designer. Click the layer, and move it out of the way.
3.
Click after the Answered by text in the rst cell of the table. Press Enter.
4.
Choose CreateTable.
5.
6.
On the Table Layout tab, set the Cell Width to 3 inches. On the Cell Borders tab, set All to 0.
7.
Embed the contact list on the Answer form 8. Place the cursor in the new table, and choose CreateEmbedded ElementInstant Messaging Contact List.
391
Appendix
Appendix A Solutions to Practice Activities Step 9. Action Right-click the embedded contact list and choose Instant Contact List Properties.
10.
In the Embedded Contact List Properties box, on the Info tab, set the width and height each at Fit to window, and select yellow for the background color.
11.
In the Embedded Contact List Properties box, on the Border tab, select Ridge for the border style, and Drop shadow for a border effect.
12.
13.
14.
15.
392
Activity A-12: Solutions to Lesson Lab 11-1: Display Response Data in Views
Scenario Now that you have created Question and Answer forms for creating Q&A documents about Worldwides policies, you need to create a view that shows the questions with their corresponding answers in a hierarchical view. In the following activity, you will create a hierarchical view that displays the question and answer documents. Note: Make sure you do this work in your copy of the Policies and Procedures application. To complete this lab:
Create a hierarchical view that displays the questions with the answer below 1. Open your copy of the Policies and Procedures application in Lotus Domino Designer. Result: The application opens in the Work pane. 2. In the Design pane, click Views.
3.
In the Work pane, click New View. Result: The Create View box opens.
4.
5.
Copy the style from the view: Blank. Click OK twice. Result: The Q & A view appears in the view list.
6.
Open the Q & A view. Result: The Q & A view opens in the Work pane.
7.
Select View Selection in the Objects pane. Result: The Add Condition button displays.
8.
In the Programmers pane, select Formula in the Run list. Result: SELECT @All appears in the Programmers pane.
393
Appendix
Appendix A Solutions to Practice Activities Step 9. Action Delete SELECT @All. Type the following formula: SELECT Form= "Question"|@AllDescendants Result: The new formula is created. 10. Double-click the rst view column to open the Column Properties box. Modify the column as follows:
Title: (blank) Width: 1 Show twistie when row is expandable. Sort: Ascending Type: Categorized Text Color: Blue
Sorting:
Font:
11. 12.
In the Programmers pane, select Field and then Category. Choose CreateAppend New Column to add the next column. Doubleclick its header and modify it as follows:
13.
In the Programmers pane, select Formula and add the following formula: Subject + " - " + @Text(QuestionDate) Result: The Question column displays the content of the Subject and QuestionDate elds.
Create a responses-only column in the Q & A view 14. 15. Open the Q & A view in Lotus Domino Designer. Choose CreateInsert New Column to create a column to the left of the Question column. Result: A new blank column is inserted in front of the Question column. 16. On the Column Info tab of the Column Properties box:
Leave the column title blank. Set the width to 1. Select Show responses only.
17.
394
19.
395
Appendix
Appendix A Solutions to Practice Activities
Activity A-13: Solutions to Lesson Lab 11-2: Enable a Column for Instant Messaging
Scenario In an effort to improve interoffice communications, the Worldwide Corporation would like to have users on-line statuses displayed within the Policies and Procedures application. Follow the steps below to modify the application. Follow these steps to enable a column for instant messaging.
Step Action
Enable a column for instant messaging 1. 2. Open your copy of the Policies and Procedures application in Lotus Domino Designer, and click the Q&A view. Append a new column to the right of the Question column.
3.
In the Column Properties box, name the column Whos Online? and increase the column width to at least 18 characters.
4.
In the Programmers pane, enter the following column formula that evaluates to the abbreviated form of a full hierarchical name: @Name([Abbreviate];ContactPerson) Note: Online status displays for only a single name displayed in a column. You can allow a eld to accept multiple values, but status icons do not display if more than one name appears in a column.
5.
In the Style section on the Advanced Format tab in the Column Properties box, select Names from the ist.
6.
In the Names section, select Column contains a name and Show online status.
7.
To test your work, ensure that instant messaging connectivity is active. Close the Policies and Procedures application if it is open in the Lotus Notes client. Open the Policies and Procedures application in the Lotus Notes client and create and save a few documents. You should see the online status icons beside the names of users who are online.
396
Activity A-14: Solution to Lesson Lab 12-1: Create Instant Messaging Action Buttons in a View (Optional Lab)
Scenario The Worldwide Corporation would like to add buttons to the All Documents view in the Policies and Procedures application to provide users with the ability to contact document authors and to show/hide online status icons. Follow the steps below to modify the application. Follow these steps to create instant messaging action buttons in a view.
Step Action
Create instant messaging action buttons in a view 1. 2. Open your copy of the Policies and Procedures application in Lotus Domino Designer, and open the Q & A view. To create the rst instant messaging chat action button, choose Create ActionAction.
3.
In the Action Properties box, on the Action Info tab, in the Name eld, type Chat. Accept all other defaults on this tab.
4.
pane:
5.
To create the second instant messaging chat action button, choose CreateActionAction. In the Action Properties box, on the Action Info tab, in the Name eld, type Show / Hide Contacts. Accept all other defaults on this tab. Type the following formula in the Programmers pane: @Command([ShowHideIMContactList])
6.
Save and close the Q & A view, and exit Lotus Domino Designer.
7.
Log on to Lotus Sametime and open the Policies and Procedures application in the Lotus Notes client, and open the Q&A view. Your Chat and Show/Hide Contacts action buttons should be visible on the action bar.
397
Appendix
Appendix A Solutions to Practice Activities Step 8. Action Select a document and click Chat. Result: An instant messaging chat dialog box opens to initiate a chat with the author of the document. If the author is offline, a message box displays indicating this. 9. Click Show/Hide Contacts to display your instant messaging contact list. Click the button again and the instant messaging contact list is hidden.
398
Activity A-15: Solution to Lesson Lab 12-2: Add Automation to the Policies and Procedures Application
Scenario Worldwide Corporation would like to automate creating and editing documents in the Policies and Procedures application. Users should be able to:
Create a policy or a question from the Policies view. Edit a policy when the document is open. Create a question or an answer from the Q&A view. Edit a question or an answer either when a document is open or selected in the Q&A view. Save any of the documents by clicking a button instead of using menu commands.
Where Used
Policies View When Policy document is open in Read mode Q & A View Policies View Q & A View When Question document is open in Read mode Q & A View When Question document is open in Read mode Q & A View When Answer document is open in Read mode Q & A View When Policy, Question, or Answer document is open in Edit mode
Create Question
Edit Question
Create Answer
Edit Answer
Follow these steps to add automation to the Policies and Procedures application.
399
Appendix
Appendix A Solutions to Practice Activities Step 1. Action Create a list of actions to be added to the Policies application using the table above.
Create the Create Policy button 2. Open the Policies view, from your copy of the Policies and Procedures application, in Lotus Domino Designer. Result: The view appears in the Programmers pane. 3. Choose CreateActionAction from the menu. Result: The Action Properties box opens. 4. In the Name text box, type Create Policy Result: The action is named Create Policy. 5. Type the following formula in the Script area for the Click object of the action: @Command([Compose]; "Policy") Result: The formula appears in the Script area. 6. Save and close the view.
Create shared actions 7. With your copy of the Policies and Procedures application open in Lotus Domino Designer, choose Shared CodeActions. Result: The Work pane opens to the shared actions list. 8. Click New Shared Action. Result: The Shared Action Properties box opens. 9. In the Name text box, type Edit Document Result: The shared action is named Edit Document. 10. Select the Action Hide When tab. Result: The Action Hide When tab appears. 11. Select:
Result: The properties are set that will hide the button if the document is in Edit mode. 12. Close the Action Properties box.
13.
Type the following formula in the Script area for the Click object of the action: @Command([EditDocument]) Result: The formula appears in the Script area.
400
15.
Result: The Create Answer action is created. 16. Type the following formula in the Script area for the Click object of the action: @Command ([Compose]; "Answer") Note: Use the form alias if you created one, in place of the form name. Result: The formula appears in the Script area. 17. Save the shared action.
18.
Result: The Create Question action is created. 19. Type the following formula in the Script area for the Click object of the action: @Command([Compose];"Question") Result: The formula appears in the Script area. 20. Save the shared action.
Insert the shared action onto the appropriate forms 21. Open the Answer form in Lotus Domino Designer. Result: The form appears in the Programmers pane. 22. Choose CreateActionInsert Shared Action from the menu. Result: The Insert Shared Action dialog box appears. 23. Select the Edit Document shared action, and click Insert. Result:Lotus Domino Designer adds the shared action to the form. 24. Click Done. Result: The Insert Shared Action dialog box closes. 25. Save and close the Answer form.
26.
Insert the Edit Document shared action onto the Policy form. Result: The Edit Document action appears on the Policy form.
401
Appendix
Appendix A Solutions to Practice Activities Step 27. Action Insert the Edit Document and Create Answer shared actions onto the Question form. Result: The Edit Document and Create Answer actions appear on the Question form. Insert the shared actions onto the views 28. Open the Policies view in Lotus Domino Designer. Result: The view appears in the Programmers pane. 29. Choose CreateInsert Shared Action from the menu. Result: The Insert Shared Action dialog box appears. 30. Insert the Edit Document and Create Question shared actions. Result: Lotus Domino Designer adds the shared actions to the view. 31. Click Done. Result: The Insert Shared Action dialog box closes. 32. Save and close the Policies view.
33.
Result: The shared actions appear on the Q & A view. Create the Save and Close button 34. With your copy of the Policies and Procedures application open in Lotus Domino Designer, choose Shared CodeActions. Result: The Work pane opens to the shared actions list. 35. Click New Shared Action. Result: The Shared Action Properties box opens. 36. In the Name text box, type Save and Close Result: The shared action is named Save and Close. 37. Click the Action Hide When tab. Result: The Action Hide When tab appears. 38. Select Previewed for reading and Opened for reading. Result: The properties are set that will hide the button if the document is in Read mode. 39. Close the Shared Action Properties box.
402
Add the Save and Close shared action to the forms in the Policies and Procedures application 42. Open the Answer form in Lotus Domino Designer. Result: The form appears in the Programmers pane. 43. Choose CreateActionInsert Shared Action from the menu. Result: The Insert Shared Action dialog box appears. 44. Insert the Save and Close shared action. Result: Lotus Domino Designer adds the shared action to the form. 45. Click Done. Result: The Insert Shared Action dialog box closes. 46. Save and close the Answer form.
47.
Insert the Save and Close shared action onto the Policy and Question forms. Result: The Save and Close action appears on the two additional forms.
403
Appendix
Appendix A Solutions to Practice Activities
Create an agent that reassigns the policy numbers 1. With your copy of the Policies and Procedures application open in Lotus Domino Designer, choose Shared CodeAgents. Result: The Work pane opens to the agents. 2. Click New Agent. Result: The Agent Properties box opens in the Work pane. 3. In the Name text box, type Reassign Policy Numbers Result: The agent is given a name. 4. Verify that Shared is selected and change Target to All documents in database. Result: The agent is designated as a shared agent. 5. In the Programmers pane, select Formula from the Run list. Result: The Programmers pane is split into the InfoList and the Script area. 6. In the Script area, type the following formula: SELECT Form="Policy"; REM {Convert the hexadecimal number to text.}; REM {Select the last 6 characters.}; Temp:= @Right(@Text(@DocumentUniqueID);6); REM {Set the PolicyNo field to "PN" plus Temp}; FIELD PolicyNo := "PN" + Temp Result: The formula is entered in the Script area. 7. Save the agent. Result: The new agent is saved.
404
11.
In the Field Properties, change the type to Text, Computed when composed.
12.
Script
area:
"PN" +
13.
405
Appendix
Appendix A Solutions to Practice Activities
Activity A-17: Solution to Lesson Lab 14-1: Set Access Restrictions to the Application
Scenario Worldwide Corporations Policies and Procedures application is almost ready to be deployed. However, security levels have not been established for all the different types of users. In this group activity, you will work with the rest of the class to determine the access control levels required for the appropriate users. The following tables provide detailed solution steps for two parts of the lab: Copy the updated Policies and Procedures application to Hub/SVR/ WWCorp.
Copy the updated Policies and Procedures application to Hub/SVR/WWCorp 1. 2. If necessary, in the Lotus Notes client, switch to the Lotus Notes workspace. Choose FileOpenLotus Notes Application. On Hub/SVR/WWCorp, double-click the D8510 folder, and then double-click PoliciesACL.nsf.
3.
4.
5.
6.
Click the folder icon, select D8510, and then click Select.
7. 8.
Change the title to Policies and Procedures ## (where ## is your student number). Change the le name to Policies##.nsf
9.
Verify that Database design and documents and Access Control List are selected to be copied.
406
Set your access control level to Manager 11. 12. 13. 14. 15. 16. 17. 18. Choose FileApplicationAccess Control. Click Add, and then click the person icon. In the Select Names dialog box, verify that WWCorps Directory is selected. In the list of names, double-click your student account name, and then click OK. In the User type list, select Person. In the Access list, select Manager. Select Delete documents. Select the Students group, click Remove, and then click OK.
407
Appendix
Appendix A Solutions to Practice Activities
Determine the roles for the Policies and Procedures application. Create the roles.
The following table lists the roles for the Policies and Procedures application.
Description
Create the roles from the preceding table 1. Open your copy of the Policies and Procedures application in Lotus Domino Designer. Be sure to use the application from the classroom server (Hub/SVR/WWCorp). Choose FileApplicationAccess Control. Result: The Access Control List to the Policies and Procedures box opens. 3. Click the Roles tab located on the left side of the Access Control List dialog box. Result: The Roles eld opens in the Access Control box. 4. Click Add to add a user Role. Result: The Add Role box opens.
2.
408
Result: The new roles are added to the Roles list. 7. 8. 9. Click the Basics tab located on the left side of the Access Control List dialog box to return to the list of access controls. Look in the Roles eld to verify that the roles you added are listed there. Click OK to close the Access Control List dialog box.
409
Appendix
Appendix A Solutions to Practice Activities
Activity A-19: Solution to Lesson Lab 14-3: Control Access to Documents in the Policies and Procedures Application
Scenario You want to control access to documents in the Policies and Procedures application based on the following:
All employees should be able to read any document in the application. The people who create documents should be able to edit them. Members of the Managers and Policy Makers groups should be assigned the PWriters role. Only people assigned the PWriters role should be able to create Policy documents. All employees can create Question documents. Only the person who creates a Question should be able to modify it. Only PWriters should be able to create and edit Answers. Change the ACL to modify the access rights of different groups of users. Change the Policy form to allow only users assigned the PWriters role to create or edit documents created with this form. Change the Question form so only the author can edit the question. Change the Answer form to allow only users assigned the PWriters role to create or edit documents created with this form. Set the hide/when formula for actions.
This solution assumes the application has the roles from the previous lesson labs. Follow these steps to control access to documents.
Step Action
Modify your copy of the Policies and Procedures application ACL to set the access levels of the Employee group and the [PWriters] role 1. 2. Open your copy of the Policies and Procedures application in Lotus Domino Designer. Choose FileApplicationAccess Control. Result: The Access Control List to the Policies and Procedures box opens.
410
Remove anonymous access and change the access rights of default users to no access 8. 9. Open your copy of the Policies and Procedures application in Lotus Domino Designer. Choose FileApplicationAccess Control. Result: The Access Control box opens. 10. Click Anonymous in the list of users.
11.
12.
13.
Select Reader as the Access level. Clear the Write public documents check box. Click OK. Result: Anyone with default access to the application can read documents.
Restrict who can create and edit documents created with the Policy form 14. Open your copy of the Policies and Procedures application in Lotus Domino Designer.
411
Appendix
Appendix A Solutions to Practice Activities Step 15. Action In the Design pane, expand the list of Forms. Open the Policy form. Result: The Policy form opens in the Work pane. 16. Open the Form Properties box.
17.
18.
Clear the All authors and above check box for Who can create documents with this form. Select the [PWriters] role.
19.
Close the Form Properties box. Result: Only users assigned the [PWriters] role can create Policies.
20.
Create an Authors eld at the top of the Policy Form with the following properties:
Name: Editors Data type: Authors Type: Computed when composed Allow multiple values Value formula: "[PWriters]"
21.
On the Paragraph Hide/When tab, select Hide paragraph if the formula is true and type a formula of @True. Result: Only users assigned to the [PWriters] role can create a Policy document.
22.
Set the read and edit restrictions for the Question form 23. Open your copy of the Policies and Procedures application in Lotus Domino Designer.
24.
412
Name: Authors Data type: Authors Type: Computed when composed Hide when formula: @True Value formula: @UserName
Result: Only the documents creator can make changes to the document. 26. Save and close the form.
Modify the Answer form so only users assigned the [PWriters] role can create and edit documents created with the form 27. 28. Open your copy of the Policies and Procedures application in Lotus Domino Designer. Open the Answer form. Result: The Answer form opens in the Work pane. 29. Choose DesignForm Properties. Select the Security tab. Result: The Form Properties box opens. 30. Clear the All authors and above check box for Who can create documents with this form. Select the [PWriters] role. Close the Form Properties box. Result: Only users assigned the [PWriters] role can create Answers. 31. Place your cursor at the top of the form and choose CreateField. Result: Only the documents creator can make changes to the document. 32. Create an Authors eld with the following properties:
Name: Authors Data type: Authors Type: Computed when composed Hide when formula: @True Value formula: @UserName
33.
Set the hide/when function for the Create Policy and Create Answer actions
413
Appendix
Appendix A Solutions to Practice Activities Step 34. Action With your copy of the Policies and Procedures application open in Lotus Domino Designer, choose Shared CodeActions. Result: The Work pane opens to the shared actions list. 35. Open the Create Answer action.
36.
Choose DesignShared Action Properties. Click the Action Hide When tab. Result: The Shared Action Properties box opens.
37.
Select Hide action if formula is true and type the following formula: @IsNotMember("[PWriters]"; @UserRoles) Result: The Create Answer action is hidden from anyone who is not assigned the [PWriters] role.
38.
39.
Modify the Hide/When properties for the Create Policy action on the Policies view in the same way.
414
Activity A-20: Solution to Lesson Lab 15-1: Create a Design Template and a New Application
Scenario Now that the Worldwide Policies and Procedures application has been designed, developed, and tested, it is time to make a design template from the application and prepare to deploy the application. To complete this lab:
Extract the design elements to create a master design template. Create a master design template. Create a new application that will update whenever the template changes.
Extract the design elements to another application that will become the master design template 1. 2. Select your copy of the Policies and Procedures application in either Lotus Notes or Lotus Domino Designer. Choose FileApplicationNew Copy. Result: The Copy Database box opens. 3. Make sure that the server is set to Local.
4.
5.
Type the le name Policies_Template.ntf Note: The NTF le extension does not make the le a template. It simply causes it to appear as a choice in the list of templates when you create a new application.
6.
Click Specify What to Copy: Application design only. Result: Only the application design elements will be copied, not the documents.
7.
415
Appendix
Appendix A Solutions to Practice Activities Step 8. 9. Action Open your copy of the Policies_Template application in Lotus Domino Designer. Choose FileApplicationProperties to open the Database Properties box. Result: The Database Properties box opens. 10. Click the Design tab.
11.
12.
Type the template name Policies_Template. The template name is the link between the template and the application or applications. Result: The template name is listed in the Name box.
13.
Link the application to the master design template 14. 15. Open your copy of the Policies and Procedures application in Lotus Domino Designer. Choose FileApplicationProperties. Result: The Policies Properties box opens. 16. Click the Design tab.
17.
Select Inherit design from master template. Click in the Template Name box and type Policies_Template Result: The Policies and Procedures application will inherit design changes from the Policies_Template application.
416
Activity A-21: Solution to Lesson Lab 15-2: Roll Out the Policies and Procedures Application
Scenario You want to make modications to the Policies and Procedures application that will allow for proper replication of the application. You will also test the application. The following tables provide detailed solution steps for seven parts of the lab: Modify the ACL of the Policies and Procedures application.
Create a new replica of the Policies and Procedures application locally or on the classroom server. Create some new documents in the server copy of the application. Replicate with the local copy. Modify the template. Refresh the design of the local copy of the Policies and Procedures application. Replicate the Policies and Procedures application from local to server.
Follow these steps to roll out the Policies and Procedures application.
Step Action
Modify the ACL for the Policies and Procedures application 1. 2. Open your copy of the Policies and Procedures application in Lotus Domino Designer. Choose FileApplicationAccess Control from the menu. Result: The Access Control List dialog box appears. 3. Ensure that LocalDomainServers is a User type of Server group, has Manager access, and can delete documents.
4.
5.
6.
417
Appendix
Appendix A Solutions to Practice Activities Step Action
Create a local replica of the Policies and Procedures application 7. 8. Open your copy of the Policies and Procedures application in Lotus Domino Designer. Choose FileReplicationNew Replica.
9.
Select Local.
10.
Keep the default le name and title for the new replica.
11.
Select Create Immediately. Note: Click Replica Settings if you do not see this option.
12.
Select Copy Access Control List to copy the ACL from the original to the new replica. This option may already be checked and greyed out.
13.
Click OK.
Create new documents on your server copy of the Policies and Procedures application 14. 15. Open the Lotus Notes client. Choose FileOpenLotus Notes Application.
16.
17.
Select the Policies and Procedures application. Click Open. Result: The server copy replica of the Policies and Procedures application opens.
18.
Update the local copy of the Policies and Procedures application with the server copy of the Policies and Procedures application 19. 20. Open the Replication page in the Lotus Notes client. Make sure the Policies and Procedures application is checked.
418
Modify the Policies and Procedures application template 23. 24. Open the Policies and Procedures template, Policies_Template.ntf, in Lotus Domino Designer. Open the Policy form.
25.
Modify the form. For example, change the background color of the form.
26.
27.
Refresh the design of the local replica of the Policies and Procedures application.
28.
Open the local replica of the Policies and Procedures application in the Lotus Notes client.
29.
Open any existing document using the Policy form to see if the background color has changed.
Update the server copy of the Policies and Procedures application with the server copy of the Policies and Procedures application 30. 31. Open the Replication page in the Lotus Notes client. Make sure that the Policies and Procedures application is checked.
32.
Click Start Now. Result: The local and server copies of the Policies applications are replicated to one another.
33.
419
Appendix
Appendix A Solutions to Practice Activities Step 34. Action Open any existing document using the Policy form to see if the background color has changed.
420
Appendix
About This Appendix
Appendix
Appendix B The Worldwide Corporation Infrastructure Plan
Organization Structure
The structure of Worldwide Corporation appears in the following gure.
User Needs
Worldwide Corporations users require the following access to applications.
Information Groups E-mail/Communication Policies and procedures Product Information: Price list Product catalogue All All
Who
422
Human Resources
All
Application
Servers By Task
Worldwide Corporation will designate servers to specic tasks based on Information Groups. The following table lists the servers, associated tasks, and rationale behind the decision.
Tasks Routes mail and replication applications to and from other hub or spoke servers. Provides non-Domino mail services, such as: POP3 IMAP SMTP NNTP LDAP
Internet Messaging
Use Lotus Domino server to provide employees with access to non-Lotus Domino mail les.
423
Appendix
Appendix B The Worldwide Corporation Infrastructure Plan Server Type Mail Tasks Stores users mail and applications and routes mail across the intranet and Internet.
Rationale Provide easier administration. Minimize server processor load. Reduce network traffic. Provide predictable server performance and grouping of users. Allow user access to applications when mail server is down.
Application
Provide easier administration. Group applications by usage, replication needs, and/or security requirements. Allow tuning of server to optimize performance and response time independent of mail usage. Ease expansion by adding new application servers as usage and storage needs increase.
Web
Provides access to an application from the Internet or to corporate intranet. Can use either: Lotus Domino Web server Microsoft IIS
Can place outside the rewall for Internet access. Provide employees with access to corporate information from a browser.
Servers By Location
Worldwide Corporation will have one Lotus Domino Domain (WWCorp) that includes all Worldwide Corporation offices. Worldwide Corporations Internet domain name has been registered as WWCorp.com.
424
Topology
Worldwide Corporation has selected a hub-and-spoke topology for ease of management and future expansion. Each regional office will have a hub server and one or more spoke servers. Each site will be set up to run independently, although they will be connected to the corporate hub. Connection documents are required for replication to tell the corporate hub how and when to communicate with other servers and for spoke servers to connect to the corporate hub. Headquarters is the center of the infrastructure and houses the main hub server, which has high-speed links running to the offices. Each individual Lotus Domino server is responsible for its own mail routing and replication events. The hub server is responsible for replication of the critical applications between all its spoke servers. The following gure shows the locations and types of servers.
425
Appendix
Appendix B The Worldwide Corporation Infrastructure Plan
Customers and vendors will have access through a Web server at Headquarters.
Code
West
System Administration
System administration is locally controlled by region, but monitored from the Corporate office. Administration tasks are controlled by regional administrators. General policies and guidelines are maintained and distributed from the Corporate office. Implementation and design changes are carried out after business justications are submitted and approved. All system administrators use the Lotus Domino Administrator and Web Administrator for all administration tasks.
Network Strategy
Worldwide Corporations strategy includes these components:
Incorporating TCP/IP as their primary network protocol. Using a global frame relay network as its global WAN. Providing high-bandwidth networking connections to all offices from Headquarters. Upgrading existing server network cards as necessary to meet demand.
426
Although the WAN is robust and high-speed, Worldwide Corporation does not want to rely solely on the network. They purchased additional servers for regional offices to ensure reliability and consistency across geographical locations.
Directory Strategy
There will be only one Lotus Domino domain (WWCorp) for the entire Worldwide Corporation Domino environment. The model matches the physical layout of the Worldwide Corporation WAN. The rst congured server (the corporate hub) will have full administration rights over the entire domain. The Lotus Domino Directory will reside on the corporate hub server at headquarters, and replicate to each regional hub server. The corporate hub will create Directory Catalogs, and replicate to regional hubs for use by remote users. Remote users can keep a local replica of the Directory Catalog on the client for faster response time and timely encryption of messages. System administrators will periodically update the Directory Catalog and replicate once a day to hub servers. Directory access is from: Lotus Notes clients
Replication Topology
A hub-and-spoke topology will be used for replication. This structure consists of a main hub with two spoke servers, which are the regional hub servers. Each regional hub server also has its own spoke servers. The corporate hub server will be the primary hub and share control of replication with regional hub servers.
Streaming Replication
Connection documents are required for replication to tell the corporate hub how and when to communicate with other servers and for spoke servers to connect to the corporate hub. To take advantage of the new streaming replication feature in Lotus Domino 8, connections between Hub servers will use the Pull/Pull replication strategy. Administrators will create Connection documents between the WWCorp Domain Hub and regional Hub servers using the Pull:Pull strategy. This will take advantage of the speed of Streaming Replication. It is important to note that WWCorp employees are not expected to access these servers, so all Hub servers can share the replication workload.
427
Appendix
Appendix B The Worldwide Corporation Infrastructure Plan
Application Types
Types of applications will be separated and reside on different application servers to isolate problems and simplify management. All applications will be replicated to the corporate hub for central control and reliability.
Database Redirect
Administrators will use database redirect to automatically update client references to databases that have been relocated or deleted.
428
Application Type
Replication Schedule
Daily during mutual off-peak hours for Lisbon and regional hub Daily during mutual off-peak hours for Lisbon and regional hub When changes are made
Local languages and customs, escalation procedures Local languages and regulations
Purchasing application
When changes are made Quarterly, or when changes are made When changes are made
Catalogs
Local languages
Notes Remote Procedure Call (NRPC) will route mail within the corporate intranet.
429
Appendix
Appendix B The Worldwide Corporation Infrastructure Plan
The following conguration provides for ease of conguration and optimum load balancing and failover: One Internet domain.
ISP as a relay host to Internet. Regional Domino Named Networks (one for each region). The corporate hub is enabled to route external mail using the SMTP protocol. All mail servers have Connection documents and route mail using NRPC internally.
The WWCorp Domain Hub will be congured to send and receive Internet mail. Administrators will use whitelists and blacklists to improve mail routing performance. In addition, Transfer and Delivery Reports will be used to notify users if their mail is unable to be delivered.
Mail Administrators
Administrators must perform the following tasks:
Store the Internet domain name in the Foreign SMTP and Global Domain documents. List the inbound mail servers in the Mail Exchange (MX) records in the Domain Name Service under the domains name. Only one is required. (Note that load balancing for multiple servers is dependent on the algorithm used by the client SMTP system to select a server from the MX records.) Congure complete address lookup or congure local part only lookup to identify each mail recipients mail server so that the router can make the nal delivery.
Mail clients
Initially, all mail users will have Lotus Notes mail les. In the future, some mail users may use other Internet mail client software. At that time, Worldwide Corporation will set up select Internet POP3 Messaging Servers for non-Notes mail clients to access mail les on the Lotus Domino server.
Mail quotas Inbox cleanup Mail journaling Set options for Mail Recall Set options for Out of Office agent
430
Reject inbound ambiguous names/deny mail to groups Maximum message size for inbound and outbound message set to 10 megabytes User restrictions, such as full-text indexing and other Policy Management enhancements
431
Appendix
Appendix B The Worldwide Corporation Infrastructure Plan
Certier
Organizational units are based on geographical regions. The servers organizational unit will be used for better control of management and creation of servers. All organizational units and common names are descendants of the organization certier /WWCorp.
User Naming
The following table provides user naming conventions.
Type Common name for Lotus Domino environment Internet mail addressing
Server Naming
The following table provides examples for regional server names.
Region Headquarters
Code HQ
Server Names (Server Types) HQHUB/SVR/WWCorp (Hub/Comm) HQAPP01/SVR/WWCorp (Application) HQMAIL01/SVR/WWCorp (Mail) EASTHUB/SVR/WWCorp (Hub) EASTAPP01/SVR/WWCorp (Application) EASTMAIL01/SVR/WWCorp (Mail) WESTHUB/SVR/WWCorp (Hub) WESTAPP01/SVR/WWCorp (Application) WESTMAIL01/SVR/WWCorp (Mail)
East
East
West
West
432
Naming Examples
The following table provides naming examples for international sites.
Then ... Use the name XXType##/SVR/WWCorp, where: XX is the standard country code. Type is the server type, for example, Mail. ## is the server number of this type. For example, the rst mail server in Australia might be: AUMAIL01/SVR/WWCorp
Use the standard country code that identies the location of the organizational unit. A new organizational unit for Canada might be: /CN/WWCorp Certify under the regional organizational unit where the user works. A new user named Sara Jones in London would be: Sara Jones/UK/WWCorp The corresponding Internet name would be: Sara_Jones@WWCorp.com
Management Policy Corporate system administrators create the O certier. Corporate system administrators create the OU certiers. Access is limited to two administrators using multiple passwords. Store IDs in protected areas.
433
Appendix
Appendix B The Worldwide Corporation Infrastructure Plan Type Organizational unit certiers
Management Policy Corporate administrators keep copies of OU certiers. OU certiers are migrated to the CA process. Regional administrators use the CA process to register users and servers using these OU certiers. Store IDs in protected areas.
Server IDs
Corporate system administrators create all server IDs. Store IDs on the server. Use only for the server.
User IDs
Regional administrators create user IDs. Regional system administrators keep copies of IDs in a secure application on the regional hub server. Use a Certication Log application to track certication. All Certier IDs have multiple passwords and expiration dates of two years from date of creation. Store backups in a secure off-site location.
Using Lotus Domino as a Certicate Authority, administrators will create X.509 certicates using the Certicate Authority Application on a workstation and store the CA key ring on that workstation, not on the server. Do not distribute these les to other administrators in the organization. Store the certicates in a secure off-site location. Store in corporate user Lotus Notes ID les. Store in trusted LDAP directories (for customers).
434
Remote Access
Worldwide Corporation has determined specic Internet access for remote employees, vendors, resellers, and customers, based on their needs.
Internet Access
The following Internet access will be used:
Authenticated access for employees Public access Web server for vendors, resellers, and customers, including controlled access to servers, applications, and data
435
Appendix
Appendix B The Worldwide Corporation Infrastructure Plan
Customers Anonymous access to catalog and public company information. Future: Username and password access to information about their own orders, for example, shipping information.
Remote Users
Users at home offices that do not have direct connections to the WAN can use an Internet Server Provider (ISP) to access the Lotus Domino system through a local Firewall server. Remote users can connect to their mail server through the local Firewall servers.
Server Types
The following table lists the server licenses that will be used for each of the server types.
436
Hub server
File Structure
The following table lists the standard le structure on the servers.
Path Domino
Description Client les will be installed for network distribution purposes. Domino system applications that are required for Domino to function properly. Critical applications that require frequent replication.
Domino\data
Domino\data\critical
Applications
Use the standard installation le paths whenever possible to ensure standardized training and ease of support and troubleshooting.
Note: Store Lotus Domino executables on a separate disk than Domino data for better performance.
These areas of the Lotus Domino le structure are only accessible to designated personnel for installation purposes. All other Lotus Domino data is protected by operating system security and is accessible to Lotus Domino administrators only.
Conguration Documents
Every Worldwide Corporation server has its own Conguration document. This ensures that each server conguration can be modied separately and that there is a log of any changes made.
437
Appendix
Appendix B The Worldwide Corporation Infrastructure Plan
The Lotus Domino conguration application will be used for server setup to streamline and automate setup. A Conguration document exists for each server type (for example, hub, mail, application) and is then distributed to other servers of the same type.
Recommended Tasks Mail Router Replicator Indexer Agent Manager Administration Process
Mail servers
Application servers
Hub servers
Web servers
438
Description Denial for people whose surnames begin with A-F. Denial for people whose surnames begin with G-L. Denial for people whose surnames begin with M-R. Denial for people whose surnames begin with S-Z.
Before deleting a user from the Lotus Domino system, add the user to one of these groups. This will ensure immediate denial to any Worldwide Corporation server.
Note: This is subject to replication of the changes throughout the domain, which will take no longer than 60 minutes.
439
Appendix
Appendix B The Worldwide Corporation Infrastructure Plan Standard Application names File system directory structure Requirement No database naming standards Standard directory structure, for example: \Domino\Data\Global\HR1 \Domino\Data\Global\Marketing \Domino\Data\Local\Marketing \Domino\Data\Local\Dev1 One group for all server administrators, for example: GlobalAdmins Groups for specic categories of employees, for example: GlobalSales
A group for each region, for example: EastAll (for all Worldwide Corporation employees in East) One group for administrators per region, for example: WestAdmins (for all server administrators in West)
Client Licenses
Client licenses will be:
Lotus Notes Client for most users, all generic IDs, and any contractual or affiliate accounts. Lotus Domino Designer for users who will create, modify, or design databases. Lotus Domino Administrator for system administrators.
Client Deployment
Desktop, registration, and security policies will be used to set up users environments. For Internet mail, account documents will be created locally for each mail protocol. Mail will be stored in Notes Rich Text format.
440
Worldwide Corporation will use policy documents to create and update Location and Connection documents on workstations for dial-up users to determine where and how to locate the servers.
Policy Certify all IDs using a Lotus Domino certicate. Users responsible for secure or encrypted information, such as pricing information to resellers, will hold an Internet (X.509) certicate. Stored on workstations for all users and encrypted locally. Copies are kept in a secure location by regional as well as corporate administrators.
Accept CA certicate as a trusted root. Store internal signed client certicates for access to secure information.
File Storage
Client-based data les, such as IDs, Notes.ini, and *.dsk, will be stored on the workstation for all users and encrypted locally.
Procedure
441
Appendix
Appendix B The Worldwide Corporation Infrastructure Plan Task 2 3 4 5 6 7 8 9 10 11 12 13 14 Procedure Add an administrators workstation. Set up access to the Lotus Domino Directory. Add Lotus Domino servers. Add Organizational Units. Register administrators. Add Lotus Notes clients. Create user groups. Create organizational policy. Register users. Set administration preferences. Set up access to servers. Set up server logging. Synchronize Lotus Domino system databases throughout the domain. Route mail internally. Route mail to the Internet. Set mail controls. Test mail routing and delivery.
15 16 17 18
442
Appendix
Extend IBM Lotus Domino Software
Extend IBM Lotus Domino Software
IBM Lotus Domino software offers software that can add functionality to an existing Lotus Domino infrastructure. These add-ons greatly enhance the capabilities of Lotus Domino and provide specic solutions. These solutions can be categorized as: Connectivity extensions
Application extensions
For additional information on any of these products, refer to the IBM Lotus software listings or the Lotus Web site at www.lotus.com.
Appendix
Appendix C Extend IBM Lotus Domino Software
Add-on DUCS
Description and Benets Unied Messaging represents the convergence of voice mail, e-mail, and fax so that all messages are stored in a single location and can be accessed from a variety of devices, including telephones and PCs. Unied Communications (UC) takes Unied Messaging a step further by extending message access to additional devices and technologies, such as mobile phones, pagers, personal digital assistants (PDAs), and browsers. In addition, UC provides notication features that will alert subscribers in different ways when they receive a message that meets certain criteria. Lotus has formed partnerships to deliver complete solutions. DUCS provides the platform and these key services on which partners can build Unied Communications solutions that use Lotus Domino as the Unied Message store.
Allows the use of a Personal Digital Assistant (PDA) to: Create new mail messages. Schedule meetings. Update a to-do list. Users can choose exactly which information they want to upload to their desktop by mapping elds from Lotus Notes to a handheld device. EasySync works with the following devices: IBM WorkPads Palm OS computing devices Windows CE/Pocket PC
444
Denition Composed of: Lotus Enterprise Integrator 6 (LEI 6) Lotus Enterprise Solution Builder (ESB) Lotus Connectors
Description and Benets LEI is a server-based data distribution product that the enables highperformance, scalable exchange of data between Lotus Domino and a large number of host and relational applications, including:
IBM DB2 Oracle Sybase OLE-D Text ODBC data sources ERP applications
Enterprise-level document control and management system for business documents and corporate information. It supports all key document management features, including: Check-in/check-out Versioning Full-text search across all managed content Audit trails Proling Multi-level versioning Change notication
Lotus Workow
Stand-alone application development tool that works on top of Lotus Domino to provide the ability to develop, manage, and monitor business processes.
445
Appendix
Appendix C Extend IBM Lotus Domino Software
Description Supports immediate communication for users within an organization through secure text messaging, audio and video, or full collaborative meetings. The Lotus Sametime family includes: Lotus Sametime server T-120 compliant and works with Microsoft NetMeeting Works with any browser or with Lotus Notes Has audio and video capabilities to enhance online meetings Lotus Sametime Connect client A range of Application Developer Tools
Self-service Web tool for team collaboration. Users can create a secure and central workspace on the Web structured for immediate participation, for teams to: Coordinate people, tasks, plans, and resources Collaborate share ideas and discussion, resolve issues, co-author documents, exchange les, manage due diligence Communicate actions and decisions, key ndings and lessons, publish knowledge captured to a broader base of readership Lotus QuickPlace is available on ve platforms and in fourteen languages. Uses include: Project management Rapid response to ad-hoc initiatives Team Web sites To facilitate discrete business processes that span the extended enterprise and value chain
IBM Lotus Quickr is team collaboration software that helps you share content, collaborate and work faster online with your teams -- inside or outside rewall.
446
Lotus LearningSpace is an open, Web-based e-learning solution to train one group or an entire enterprise with a complete e-learning management and delivery system. Lotus LearningSpace is part of IBM Mindspan Solutions, a family of services and technologies designed to support e-learning in the organization. IBM Tivoli Analyzer for Lotus Domino: Is a performance analysis and management solution that runs within the IBM Lotus Domino 6 Administrator, providing the ability to maximize the performance of Lotus Domino server software. Includes: Powerful, predictive analysis tools Intelligent server health monitoring Workload balancing and change management tools IBM Lotus Component Designer V6 is a software development tool that helps developers quickly create new applications that provide rich user interfaces and supporting business logic without writing code. These applications form the constituent components of the work environment delivered by IBM WebSphere Portal Express V6. Previously called Workplace Designer.
447
Appendix
Appendix C Extend IBM Lotus Domino Software Software Lotus Expeditor Description IBM Lotus Expeditor is IBMs universal managed client software to extend composite applications to laptops, desktops, kiosks and mobile devices and is the follow-on release of IBM WebSphere Everyplace Deployment. It can be used to extend your IBM Lotus, IBM WebSphere, IBM Workplace or Eclipse infrastructures to a managed client environment. An alternative to Microsoft.NET client software, Lotus Expeditor provides the exibility that comes from service oriented architecture (SOA) and a standards-based programming model from the OSGi Alliance and the Eclipse Foundation. IBM Lotus Mobile Connect software is a communications software platform to help enterprises provide a mobile virtual private network (VPN) that encrypts data over wireless and wired network connections. The software (the follow-on release to WebSphere Everyplace Connection Manager) helps you efficiently extend your existing instant messaging and enterprise applications to mobile workers. IBM Lotus Organizer 6.1 is an electronic day planner with tabs for each section and pages that turn. You can quickly see all your calendar, contacts, to dos, calls, notes, Web information and more at a glance. No more looking for sticky-note reminders or lost scraps of paper. Its all there, right before your eyes. Collaboration across time zones and locations has never been easier -- or faster. IBM Lotus Sametime software helps you keep pace with your real-time work environment with marketleading, award-winning enterprise instant messaging and Web conferencing capabilities. Lotus SmartSuite delivers powerful desktop tools to the home and office user. A better value. A better way to work the Web. Check out our award-winning spreadsheet, word processor, time and contact manager, presentation software, and database. Lotus Team Workplace will allow your end-users to quickly establish and participate in virtual communities working towards a common set of goals, called teams. These teams can create team workspaces, and start collaborating immediately.
448
Lotus Workow
449
Appendix
Appendix C Extend IBM Lotus Domino Software Software Workplace Collaboration Services Description IBM Workplace Collaboration Services is a single product that provides a full range of integrated ready-to-use communication and collaboration tools to enable people to do their jobs more effectively anytime, anywhere. IBM Workplace Collaborative Learning is an enhanced IBM Workplace product and part of the integrated collaborative environment delivered by IBM Workplace Collaboration Services. It provides learning services that help organizations manage their training programs more efficiently and integrates learning resources on the desktop. Integration with other Workplace Collaboration Services capabilities delivers blended learning experiences and provides students with enhanced tools such as course discussion areas, document sharing, Web conferencing, and chat rooms. IBM WebSphere Dashboard Framework is a powerful and exible tool for rapidly building, SOA dashboards for WebSphere Portal. WebSphere Dashboard Framework augments the capabilities of WebSphere Portal, adding dashboard-specic features, such as a robust alerting module, hi-delity charting. By leveraging WebSphere Dashboard Framework, companies can quickly deploy highly tailored dashboards that consolidate data and processes from multiple back-end systems. In addition, dashboards built using WebSphere Dashboard Framework can facilitate problem resolution by enabling action right from the dashboard. As a result, with WebSphere Dashboard Framework, companies can help dramatically reduce their development costs and speed the time-to-value for their dashboard initiatives.
Workplace Designer
450
IBM Lotus ActiveInsight software is a solution that helps organizations dene and communicate goals, view real-time metrics, and take action via composite, role-based dashboards and scorecards thus helping to improve overall performance. Previously called Workplace for Business Strategy Execution. IBM Workplace Forms enables easy-to-use, open standards-based electronic forms (eForms) that help reduce inefficiencies inherent to paper-based forms. It provides organizations across many industries with security-rich electronic forms that adapt to existing resources and systems, simplify complex forms, enable business process automation, and help speed IT development.
451
Appendix
Appendix C Extend IBM Lotus Domino Software Software Workplace Forms Server 2.7 Description IBM Workplace Forms Server 2.7 enables the creation and delivery of XML forms applications. It provides a common, open interface to enable integration of e-forms data with server-side applications using industry-standard XML schemas. IBM Workplace Forms Express V2.6 enables small and medium businesses (SMB) to create a dynamic and intelligent front-end to On Demand Business processes that: Automates lling of the forms Easily retrieves forms via Web site or e-mail Provides a pixel-precise, personalized, and security-rich solution for the most demanding forms Gathers information faster and more accurately with a userfriendly front-end process to an organizations systems Attaches and les associated documents with forms Enables quick approval and sign-off Uses built-in wizards to complete forms faster Gathers information via browser or rich client viewer
Provides IT and IBM Business Partners with robust platform for forms data interchange with back-end systems
Workplace Forms Viewer 2.7 Workplace Forms Viewer Express 2.7 Workplace for SAP software
IBM Workplace Forms Viewer 2.7 is a feature-rich desktop application used to view, ll, sign, submit, and route e-forms, and is able to function on the desktop or within a browser. IBM Workplace Forms Viewer Express 2.7 is a feature-rich desktop application used to view, ll, sign, submit, and route e-forms. IBM Workplace for SAP Software leverages existing SAP investments to help improve people productivity by integrating SAP content with IBM leading collaboration and performance management technology. SAP and IBM capabilities are combined into role-based, high performance work environments.
452
453
Appendix
Appendix C Extend IBM Lotus Domino Software Software Workplace Web Content Management Description IBM Workplace Web Content Management software offers end-to-end Web content management -- content can be created (using a WYSIWYG rich text editor), managed and published to multiple Web sites. Streamlines content creation, lifecycle and publication Helps remove Webmaster/IT bottlenecks Publishes information on demand in minutes, not days Helps you tailor and personalize content by role or user preference Ensures a consistent, professional look and feel across multiple sites
454
Appendix
Appendix
Appendix D Certication and Exam Competencies
Place in certication
Fundamentals of IBM Lotus Domino 8 Application Development is listed as one of the preparation resources for the following exam: Exam 834 - IBM Lotus Notes Domino 8 Application Development Foundation Skills This exam is part of the path for IBM Certied Application Developer - Lotus Notes and Domino 8 certication. The complete path is described here: IBM Certied Associate Developer - Lotus Notes and Domino 8 Exam 834 -IBM Lotus Notes Domino 8 Application Development Foundation Skills IBM Certied Application Developer - Lotus Notes and Domino 8 Successfully pass the following three exams:
Exam 834 - IBM Lotus Notes Domino 8 Application Development Foundation Skills Exam 835 - IBM Lotus Notes Domino 8 Application Development Intermediate Skills Exam 836 - IBM Lotus Notes Domino 8 Developing Web Applications
IBM Certied Advanced Application Developer - Lotus Notes and Domino 8 Exam information not yet available.
Step 1 2 3 4
Action Review the exam competencies. Get hands-on experience. Use the exam preparation page. Use all available resources.
456
The Exam Guides located on the IBM Software Services for Lotus Certication Web page at http://www.ibm.com/lotus/certication.
Direct application of the skills learned in this class cannot be replaced by any other single resource listed here.
Brief description Complete version includes certication titles and paths, sample questions, and registration information.
Where to nd resource Abbreviated version is available in the Exam Competencies Appendix included in this course. Complete version is available on the IBM Software Services for Lotus Certication Web page at http:// www.ibm.com/lotus/ certication.
457
Appendix
Appendix D Certication and Exam Competencies Resource Lotus authorized courses Brief description Offered at Education Centers for IBM Software (ECIS) and Lotus education locations worldwide. Where to nd resource A complete list of courses and education centers are on the IBM Software Services for Lotus Education Web page at http:// www.ibm.com/lotus/ education. Additional information is available at The Education Store on the IBM Software Services for Lotus Education Web page at http:// www.ibm.com/lotus/ education. Available from the IBM Software Services for Lotus Certication Web page at http:// www.ibm.com/lotus/ certication. See the individual exam preparation page for recommended online learning resources. Additional information available at http://www10.lotus.com/ldd/doc. Ordering information is available at http:// www.redbooks.ibm.com.
CBT programs
Practice tests
Available from a variety of vendors. Visit the individual exam preparation page to determine what practice tests are available for a specic exam. This includes online tutorials and other learning resources.
Online learning
Product Documentation
IBM Redbooks
Technical cookbooks that address topics that the reference manuals may not cover.
458
Preparing for the IBM Lotus Notes Domino 8 Application Development Foundation Skills exam
The following materials are available for the IBM Lotus Notes Domino 8 Application Development Foundation Skills exam: Fundamentals of IBM Lotus Domino 8 Application Development Course
CertFX Practice Test Notes, Domino, and Domino Designer 8 Release Notes Lotus Domino 8 Administrator Help
For the most up-to-date resource listing for this exam, visit the individual exam preparation page. Go to http://www.ibm.com/lotus/certication and select the exam name from the Select an exam drop-down menu. These individual pages will give you the most up to date list of resources available.
IBM Lotus Notes Domino 8 Application Development Foundation Skills Exam Competencies
The exam competencies are one tool for preparing for IBM Certied for Lotus Software exams. The exam competencies along with a complete listing of learning resources are included on the Lotus Certication Web site available at www.lotus.com/certication.
459
Appendix
Preparation Checklist
Instructor Preparation
When preparing to teach this course, consider doing the following: Read through the Instructor Edition. Perform all activities in the manual. Perform all demonstrations and walkthroughs described in the Instructor Notes and Demo Notes. Refer to the Interactive Instructor Guide (IIG) to get updated information on the course. Refer to the Instructor Lounge to gather useful teaching tips and techniques that other instructors have used to teach this course. Use the information in this section to nd additional resources to further your knowledge of the subject. Practice the classroom setup.
Course Strategy
Approach
Fundamentals of IBM Lotus Domino Designer 8 is the rst course in the Lotus Domino 8 Application Development curriculum. This course takes four full days to deliver correctly. The intent of the design of this course is to give the students a solid foundation in designing and developing Lotus Domino applications. Students learn about working with the basic building blocks in a Lotus Domino application, and working with the Formula language. They also learn how to add to the basic building blocks with more advanced functionality such as automating the application and securing it. Finally, they learn how to manage an application in a production environment, and what they need to know, or be able to do, to deploy it.
Appendix
Appendix E Instructor Preparation
Scenario
Worldwide Corporation is an international pottery manufacturer. The company sells ceramics worldwide. Products include tiles, china, and various kinds of pottery. The corporate office houses manufacturing, research and development, product management, quality control, human resources, and system administration. There are several smaller sales offices and resellers throughout each region, and some sales representatives work from their homes. The Policies and Procedures application that you will design and develop will contain corporate policies and procedures for Worldwide Corporation. It will also contain a discussion forum so that employees can ask questions about policies and procedures.
Recommended Agenda
The tables that follow describe the recommended agenda for delivering the material over the four days.
Day 1
The following table shows the recommended agenda for Day 1.
Lessons or Topics Course and student introductions Lesson 1: Exploring Applications in Lotus Domino 8 Lesson 2: Exploring the Lotus Domino 8 Design Environment Lesson 3: Creating Applications Lunch Lesson 3: Creating Applications continued Lesson 4: Creating Pages
Day 2
The following table shows the recommended agenda for Day 2.
Lunch
462
Day 3
The following table shows the recommended agenda for Day 3.
Lessons or Topics Lesson 8: Using Formulas in Forms continued Lesson 9: Using Formulas in Views
Day 4
The following table shows the recommended agenda for Day 4.
Lessons or Topics Lesson 11: Enhancing Views Lesson 12: Working with Actions
Lesson 13: Working with Agents Lunch Lesson 14: Securing Applications Lesson 15: Deploying Applications
463
Appendix
Appendix E Instructor Preparation
This Resource IBM Redbook titled Lotus Domino Designer 6: A Developers Handbook, SG24-6854-00, ISBN: 0738414123 Note: Check the Redbook site for more updated information as it becomes available: http:// www.redbooks.ibm.com/redpieces/ abstracts/redp4102.html
Will Help You Learn More About... Developing applications for Lotus Domino Designer 6 and 7. These applications can be used by different clients, such as Notes clients, Web browsers, or mobile devices. Those readers who are familiar with developing applications using Release 5 of Lotus Domino may want to move straight to the chapter that introduces the new features in Lotus Domino 6.0 and continue from there. The chapters towards the end of the book will discuss different programming languages, @functions, LotusScript, JavaScript, and Java, which can be used in Lotus Domino. We describe in detail how to manipulate rich text objects by programming as well as XML in Lotus Domino.
464
465
Solutions Lesson 1
Activity 1-1:
13. Who last updated the document?
Answers will vary, but might include Doctor Notes.
Solutions
Lesson 7
Activity 7-1:
1.
You are designing a form with a number of elds. Some elds on the form require an initial value that is changeable by the user. Other elds require a computed value. Some actions may need to be hidden from certain users. a) LotusScript b) JavaScript c) Formula language d) Java
2.
The application that you are designing requires that you get some of the input from dialog boxes. a) Formula language b) JavaScript c) LotusScript d) Java
3.
The application you are creating requires access to documents in applications other than the one in which it is saved. a) Formula language b) LotusScript c) JavaScript d) Java
4.
You are creating an application that requires some fairly complex interaction with the user. In the past, you have had moderate success at automating a series of tasks, but you do not have extensive experience in programming. a) Formula language b) LotusScript c) JavaScript d) Java
468
5.
The application that you are developing involves an extensive amount of interaction with the user. You will need to validate eld contents, position the cursor, and perform other actions in the user interface. a) Formula language b) LotusScript c) JavaScript d) Java
6.
You are working on a process that involves complex ow control, including loops and multiple conditional branches. You have no idea, as you are writing this process, how many times it will need to be executed. a) Formula language b) LotusScript c) JavaScript d) Java
7.
An application is not performing as well as users would like. In analyzing the application, you nd that while it is very user friendly, some of the formulas are performing very poorly. Which languages would you use to replace the formulas to improve the performance of the user interface? a) Formula language b) LotusScript c) JavaScript d) Java
Activity 7-2:
1. 2. 3. 4. 5. 6. 7. 8. 9.
FirstName: Susan LastName: LastName FirstName + LastName: SusanSunshine LastName + , + FirstName: Sunshine, Susan FirstName = Susan: True (FirstName != Larry) & (LastName = Sunshine): True @Adjust (@Created; 0; 6; 0; -2; 0; 0): 6/30/2006 9:59:37 PM @If (@Created < @Today; Old; New): Old @Text (10.22): Text value, 10.22
469
Solutions
Lesson 14 Follow-up
Lesson 14 Lab 1
1. 2. 3. 4. 5. 6. 7.
For the Default user type, the Depositor access control level should be used. For the Anonymous user type, the No Access access control level should be used. For the Employees group, the Author access control level should be used. For the Policy Makers group, the Editor access control level should be used. For the Department Head, the Author access control level should be used. For the Managers group, the Manager access control level should be used. For the Designer, the Designer access control level should be used.
470
Glossary
@function A built-in formula that performs calculations and either returns a value or performs an action. action A program associated with either a view or a form and used to automate tasks for users. alias Another name for a page or other design element. application A solution to a particular problem that may include one or more databases and other components. bookmark A feature used for easy access to frequently used applications and databases. categorization A process by which related documents are grouped together in a view based on the column value. data note Also known as a document, it is a specic kind of note that stores data. design elements The building blocks for applications in Lotus Domino Designer. event The part of an object that initiates code execution and includes opening a database, opening a view, opening a document, moving the cursor into or out of a eld, and so on.
Solutions
extended products A family of products that extends and enhances the value of a Lotus Domino environment to increase organizational productivity and responsiveness through business-critical collaboration solutions. eld A part of a form that collects, calculates, or displays data. form event An event that is triggered when a document is opened, saved, refreshed, closed, or switched between read and edit mode. form A design element through which data is entered and displayed. Formula language The core language built into Lotus Notes and Lotus Domino from their earliest releases that provides a straightforward and simple programming interface within Lotus Domino applications. Hide/When A property that controls when an element is visible to users or a specic set of users. hierarchical view A view that displays main documents and their associated response documents, and visually distinguishes between them. IDE (Integrated Development Environment) A Lotus Domino Designer environment that provides for writing code in a Lotus Domino application. item A container that stores data from a note, which is identied by a name and contains a list of values. JavaScript A scripting language integrated in Lotus Domino Designer that allows Lotus Domino applications to support users with Web browsers. list A named entity that contains multiple values of the same data type in Lotus Domino. Lotus Domino server A computer that runs the Lotus Domino server program and stores Lotus Notes applications.
472
LotusScript An embedded basic scripting language that offers access to Lotus Domino data and services beyond the capabilities of the Formula language. metadata Information about data that is available to the application and the Lotus Domino services. NIF (Notes Index Facility) A Lotus Domino application functionality, which builds and maintains lists for locating data in the application. note A single and simple data structure in Lotus Notes and Lotus Domino used to store data and design elements. NRPC (Notes Remote Procedure Call) A mechanism for transmitting client requests to the Lotus Domino application and returning the results. NSF (Notes Storage Facility) A Lotus Domino database functionality, which maintains the data and design elements of the application. object An element, such as a form, eld, and so on, into whose event code is placed. replica database A database that shares the same replica ID with other databases. replication A process of synchronizing multiple instances, or copies, of a application on multiple servers and workstations. shared resource An element, such as a graphic le, stored within a Lotus Domino application. sorting Organizing documents in a view, displaying them in a specic order. statement A component of formulas that consists of a combination of variables, constants, operators, @functions, and keywords. table An element used to organize content into rows and columns.
473
Solutions
template An application that contains the structure for a particular application, but does not contain any data. View design element Creates an organized list of documents so that users can nd the information they need. view index An internal ling system that stores the list of documents in a view.
474
Index
A
access control, 329 access control levels, 323 access control list dening roles, 328 Access Control List, 20 Access Control List dialog box, 321 access level options, 325 ACL See: Access Control List action, 287 buttons, 297 creating, 287 display, 288 order, 296 shared, 294, 295 sub, 296 system, 291 Action bar, 299 Action bar applet, 300 Action Bar Property box, 300 Action pane, 288 Action Property box, 289 actions displaying, 298 Add Condition dialog box, 128 Advanced tab, 279 agent activated, 313 event, 313 names, 316 Agent Property box, 309 agents, 307 private, 308 shared, 308 alias, 62 anonymous users, 339 application, 3 high-security, 340 low-security, 339 application notes, 90 application security, 321 automating tasks, 19 AutoSave, 247 AutoSave application, 247
B
Background tab, 224 Basics tab, 310 bookmarks, 49
C
categorization, 141 Cell Borders tab, 71 Column Info tab, 216 Column Properties box, 133, 216 @Commands, 292
Copyright IBM Corporation 2007.
Index
comments, 170 concatenation, 213 conditional statements, 167 connecting to Lotus Domino, 151 constants, 162 in formulas, 162
D
data note, 14 @DbColumn function, 192 deployment, 349 design elements, 35 display pages, 57 document access, 333 Document Properties box, 15 document relationships, 244
E
Embedded View Property box, 277 event, 160 external programming languages, 150
F
eld, 96 Author, 106 Authors, 336 Computed, 182 Computed for display, 181 Computed when composed, 182 data type, 98 Date/Time, 107 Department, 110 design considerations of, 99 inherit, 237 list, 102 MsgType, 234 Name, 106 names, 97 Number, 107 Readers, 334 rich text, 99 shared, 235
text, 99 value options of, 98 Field Info tab, 100, 108 Field Properties box, 100 elds characteristics of, 96 folders, 49 form, 89 programming, 177 related, 242 form design, 91 form event, 178 form names, 93 Form Properties box, 92 Form Type property, 243 forms, 19 adding text and tables to, 94 elements used in, 90 Formula language, 151, 158 Formula Language commenting, 170 formulas common uses of, 177 functions @Failure, 187 list, 189 @Success, 187 @Functions, 166 common, 166 examples of, 167
H
Hide/When, 109 conditions for using, 110 hotspots, 301
I
IBM Lotus Notes errors, 198 IBM Lotus Domino Designer Help, 37 IBM Lotus Domino server, 5 IBM Lotus Sametime, 251
476
IBM LotusScript, 152 IBM Workplace, 26 icon custom, 218 icons predened, 217 image shared, 79 Image Resource Properties box, 80 images, 77 initial view properties, 125 input translation formula, 184 input validation formulas, 186 insert image resource, 81 instant messaging chat action buttons, 293 Instant Messaging Contact List, 253 Integrated Development Environment (IDE), 150 Also See: IDE @IsError, 199 @IsNewDoc function, 180 item, 13
containment model, 12 extended products, 25 objects, 160 Programming, 149 security layers, 20
M
metadata, 13
N
navigation, 19 NIF see Notes Index Facility, 13 Notes, 11 Notes Index Facility, 13 Notes Remote Procedure Call (NRPC), 7 Notes Storage Facility, 13 NSF see Notes Storage Facility, 13
O J
Java, 153 Java view applet, 275 JavaScript, 154 objects, 160 operators, 163 comparison, 164
P L
layer anchor, 224 hide, 228 resize and reposition, 226 Layer Anchor Property box, 224 Layer position tab, 226 Layer Property box, 224 Layer Tree, 228 layers, 223 benets of, 223 link column, 280 list, 189 list functions, 191 page design element, 55 page names, 61 Page Properties box, 60 Picture Properties box, 78 previews, 64 Programmers pane, 37 @Prompt function, 194
R
replica databases, 23 replication, 22 replication control, 352 responses-only column, 264
477
Index
S
scheduling events, 314 SELECT @All formula, 211 SELECT statement, 312 shared column, 266 shared resource, 79 simple searches preventing, 138 sort index creation deferring, 139 sorting, 136 Sorting tab, 136 statement, 158 @StatusBar function, 198 subform, 231 computed, 234 create, 232 Subform Property box, 233 syntax rules, 159
master, 351 text data, 99 text formatting functions, 184 Text Properties box, 64 @Text. function, 214 @ThisName, 196 @ThisValue, 196 threaded discussions, 245
U
user access levels, 324 user types, 327
V
variables, 162 temparary, 163 view aliases, 126 building, 121 characteristics of, 119 creating, 124 design, 123 embedded, 274 hierarchical, 263 view columns, 131 View design element, 119 view events, 209 view index, 120 View Properties box, 143 View Property box, 278 views, 19
T
table, 68 types of, 68 Table Borders tab, 73 Table Layout tab, 70 Table Margins tab, 73 Table Programming tab, 75 Table Property box, 69 Table Row tab, 74 Table/Cell Background tab, 72 tables and the Web, 69 template, 41, 350
W
window titles, 179 Work pane, 37
478
IBMD8510sg_10
99751 13001