Вы находитесь на странице: 1из 632

IBM Software Services for Lotus

Developing IBM Lotus Domino Foundation Skills


Instructor Guide

6 Applications:

Preview

Copyright, Disclaimer of Warranties and Limitation of Liability

Copyright IBM Corporation 2002. Lotus software, IBM Software Group


One Rogers Street
Cambridge, MA 02142
All rights reserved. Printed in the United States. IBM, LearningSpace, Lotus, Lotus Notes, LotusScript, Sametime, and TeamRoom are registered trademarks and Domino, Domino.Doc, Domino Extended Search, Domino Workflow, K-station, Notes, QuickPlace, and the e-business logo are trademarks of International Business Machines Corporation. All other product or brand names may be trademarks of their respective companies. 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. You may not copy, reproduce, translate, or reduce to any electronic medium or machine-readable form, in whole or in part, any documents, software, or files 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, fitness 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.

The term Preview in the document header, denotes that this education manual has not been copyedited, formatted or otherwise quality tested for final print production. This manual has been prepared for the purpose of providing you with a preliminary version of the final courseware. This manual shall become obsolete with the availability of the final version of the courseware.

IBM offers the widest range of server platforms for Lotus Domino, including the Intel processor-based Netfinity server family. With Netfinity servers, solutions ranging from simple e-mail to unified messaging to Web site hosting and collaborative applications such as distance learning and knowledge management are confidently executed. Both the Quality Assurance Engineering and Curriculum Development departments, within Lotus' education line of business, utilize Netfinity servers to develop and test the company's education offerings. Domino's functionality combined with the IBM mark of reliability on the Netfinity product family differentiates Lotus from its competition. With more than 70% of the worlds data residing on IBM systems, and with the innovative software products and services from Lotus Development, IBM and Lotus are taking connectivity to a new level in all aspects of business from document management to e-business.

Preview

Table of Contents
To p i c P ag e #

Developing IBM Lotus Domino 6 Applications: Foundation Skills Course Description and Strategy ..........................................................1

Course Description ........................................................................................... 2


Course Strategy ................................................................................................ 4

Instructor Preparation ............................................................................7

Course Materials .............................................................................................. 8


Preparation Checklist ..................................................................................... 10
CLI Certification Requirements ....................................................................... 13

Classroom Setup ..................................................................................15

Machine Requirements ................................................................................... 16


Classroom Setup Overview ............................................................................ 18
Classroom Setup Instructions ...................................................................... 21

Module A: Exploring IBM Lotus Domino 6 and


Domino Designer 6 ...............................................................................35

Lesson 1 Introduction to IBM Lotus Domino 6 ............................................ 36


What is IBM Lotus Domino 6? ..................................................................... 38
Examining a Domino Database ................................................................... 40
Creating a Domino Database ...................................................................... 44
Creating copies of the course databases .................................................... 46
How Domino Stores Information .................................................................. 50
Accessing Data in a Note ............................................................................ 54
Analyzing Documents Exercise ................................................................... 58
Using the Notes Client to Access A Domino Application ............................. 60
Using a Web Browser to Access Domino Applications ............................... 64
Lesson 2 Exploring Domino Designer 6 ...................................................... 66
Accessing a Database Design ..................................................................... 68
Accessing Design Elements ........................................................................ 70
Managing the Designer Environment .......................................................... 76
The Course Files ......................................................................................... 78

Module B: Working with Design Elements .........................................81

Lesson 3 Working with Forms ..................................................................... 82


Defining Forms ............................................................................................ 84
Designing a Form ........................................................................................ 90
Creating a Form ........................................................................................... 92
Adding Text to a Form ............................................................................... 102
Previewing Your Work ............................................................................... 106
Adding Tables to a Form ............................................................................ 108
Creating Fields .......................................................................................... 112
Working with Text Data .............................................................................. 120

Preview

Table of Contents
To p i c P ag e #

Working with Numeric Data ....................................................................... 132


Working with Date/Time Data .................................................................... 134
Using Hide/When Options ......................................................................... 136
Exercise: Create a database, and a form that contains a table and fields . 144
Lesson 4 Working With Views .................................................................. 146
Introducing Views ...................................................................................... 148
Designing a View ....................................................................................... 156
Creating the View ...................................................................................... 158
Selecting Documents for a View ................................................................ 164
Displaying Information in View Columns ................................................... 172
Organizing Documents in a View ............................................................... 180
Formatting a View ...................................................................................... 192
Exercise: Create a Categorized View ........................................................ 194
Lesson 5 Working with Pages ................................................................... 196
What Are Pages? ...................................................................................... 198
Differences Between Forms and Pages .................................................... 204
Creating a Page ......................................................................................... 206
Setting Page Properties ............................................................................. 208
Incorporating Graphics .............................................................................. 212
Using Shared Resources ........................................................................... 218
Using Image Resources ............................................................................ 220
What Are Sections? ................................................................................... 228
Creating Sections ...................................................................................... 230
Displaying Pages in Domino Designer ...................................................... 232
Exercise: Create A Page ........................................................................... 234

Module C: Programming in Domino Applications ...........................237

Lesson 6 Introducing Formula Language ................................................. 238


Working with the Formula Language ......................................................... 240
Triggering Events ....................................................................................... 244
Computing and Comparing Values ............................................................ 248
Computing and Comparing Values ............................................................ 254
Working with @Functions .......................................................................... 256
Formatting and Commenting Formulas ..................................................... 260
Exercise: Interpret Formulas ..................................................................... 264
Lesson 7 Using Formula Language in Forms ........................................... 266
Adding Code to a Form ............................................................................. 268
Creating a Window Title ............................................................................ 270
Displaying Computed Values ..................................................................... 274
Exercise: Create a Dynamic Title for the Policy Form ............................... 278
Storing Computed Values .......................................................................... 280
Translating Field Values ............................................................................ 284
Validating Field Values ............................................................................... 288
Exercise: Automate Data Entry and Formatting ........................................ 292
Working with Lists ...................................................................................... 294

Preview

Table of Contents
To p i c P ag e #

Computing the Choices in List Fields ........................................................ 298


Exercise: Compute a List of Choices for a Field ........................................ 302
Interfacing with the User ............................................................................ 304
Creating Reusable Code ........................................................................... 308
Exercise: Create Reusable Code .............................................................. 310

Module D: Enhancing Design Elements ...........................................313

Lesson 8 Enhancing Forms ...................................................................... 314


Working with Layers .................................................................................. 316
Positioning Layers ..................................................................................... 324
Hiding Layers ............................................................................................. 328
Work with Layers ....................................................................................... 330
Working with Subforms .............................................................................. 332
Working with Shared Fields ....................................................................... 344
Inheriting Information ................................................................................. 348
Creating Related Forms ............................................................................ 358
Exercise: Create Question and Answer Forms in the Policies Database .. 368
Lesson 9 Enhancing Views ....................................................................... 372
Writing View Selection Formulas ............................................................... 374
Concatenating Values in a View Column ................................................... 380
Creating a Hierarchical View ..................................................................... 386
Displaying Response Data in the View ...................................................... 388
Exercise: Display the Question and Answer Documents in a View ........... 392

Module E: Automating Tasks .............................................................395

Lesson 10 Using Actions to Automate Tasks .............................................. 396


Defining Actions ......................................................................................... 398
Working with Actions ................................................................................. 402
Shared Actions .......................................................................................... 414
Controlling How Actions Display ................................................................ 418
Action Hotspots ......................................................................................... 428
Exercise: Adding Automation to the Policies Application .......................... 430
Lesson 11 Using an Agent to Update Documents ...................................... 432
Defining Agents ......................................................................................... 434
Designing an Agent ................................................................................... 442
Creating an Agent ...................................................................................... 452
Exercise: Update Existing Documents ...................................................... 456

Module F: Working with Security ......................................................459

Lesson 12 Defining Access to a Database ................................................. 460


Database Security ..................................................................................... 462
Working with Access Control Levels ......................................................... 464
Refining Access Control Levels ................................................................. 476
Providing Additional Restrictions with User Types .................................... 480
Exercise: Set Access Restrictions to the Database ................................... 482

Instructor

Table of Contents
To p i c P ag e #

Lesson 13 Accessing Elements within a Database .................................... 484


Setting Roles in a Database ...................................................................... 486
Using Roles to Determine What the User Can Do or See ......................... 490
Exercise: Create Roles .............................................................................. 496
Controlling Access to Documents .............................................................. 498
Using Readers Fields ................................................................................ 500
Using Authors Fields ................................................................................. 504
Controlling Access for Anonymous Users ................................................. 510
Exercise: Control access to documents in the Policies and
Procedures application .............................................................................. 514

Module G: Deploying the Application................................................517

Lesson 14 Preparing and Deploying the Application ................................... 518


Controlling Application Maintenance .......................................................... 520
Database Templates ................................................................................... 522
Using Master Design Templates................................................................. 524
Exercise: Create a design template and a new database .......................... 530
Describing the Domino Replication Service ............................................... 532
Controlling What Replicates ....................................................................... 536
Creating Replicas ....................................................................................... 540
Exercise: Roll out the Policies application .................................................. 542

Appendix A: Exercise Solutions Appendix B: Identifying Programming Languages Supported by Domino Appendix C: Learning Processes and Instructor Guide Conventions

Preview

C our se D escr ip tio n an d S tr ate gy

Course Description and


Strategy
Course Description Lotus Professional Certification Course Strategy

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls 1 C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Co urs e D escr ipt ion and St ra tegy

Course Description

Target audience
The target audience for Developing IBM Lotus Domino 6 Applications: Foundation Skills is Application developers new the IBM Lotus Domino environment.

Summary description
This course is a hands-on introduction to the basic skills of working in the IBM Lotus Domino Designer 6 development environment. Through instructor lecture and student-centered activities and exercises, students learn the foundation skills required to use Domino 6 Designer design elements to create Domino 6 applications. By the end of the course, students should be able to design, develop, and deploy a single-database IBM Lotus Domino 6 application.

Course format and duration


This is a four-day classroom course.

Course goals
By the end of the course, students should be able to design, develop, and deploy a single-database IBM Lotus Domino 6 application.

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C our se D escr ip tio n an d S tr ate gy

Course Description...(continued)

Topics covered
The Developing IBM Lotus Domino 6 Applications: Foundation Skills course covers the following topics:

Domino 6 application architecture Domino Designer 6 application and design environment Creating forms Adding fields to forms Creating views Creating pages Overview of programming in Domino 6 applications Working with Formula Language Creating documents Enhancing forms and pages with layers Creating sorted and categorized views Validating and translating fields Creating agents to modify data in documents Creating view and form actions Defining various security levels for application users Using hide/when options to display or hide information Using links to make application elements available to users Creating different types of links Creating a design template Determining replication requirements Determining information required by system administrators to deploy an application

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

Preview

Co urs e D escr ipt ion and St ra tegy

Course Strategy

Approach
Developing IBM Lotus Domino Designer 6 Applications: Foundation Skills is the first of two core courses in the Domino 6 Application Development curriculum. This course takes a full four days to deliver correctly. Our intent with the design of this course is to give the students a solid foundation, hence the name, in designing and developing Domino applications. This course, and its follow-on Intermediate skills course, focuses on the skills needed to develop for the Notes client.
During the first two days of the course, the students learn about working with the basic building blocks in a Domino application along with learning how to work with the Formula language. During the second two days of the course the students learn how to add to the basic building blocks with more advanced functionality. This leads to automating the application and securing it. Also, on the last day students will learn what they need to know to manage an application in a production environment, and what they need to know, or be able to do, to deploy it. There is no reason not to have the students preview their work in a browser. However, to fully focus on creating Domino applications for the Web, IBM Lotus software offers a course titled Developing Dynamic Web Applications With IBM Lotus Domino 6.

Recommended agenda
The tables on the following two pages describe the recommended agenda for delivering the material over the four days.

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C our se D escr ip tio n an d S tr ate gy

Course Strategy...(continued)

Day 1
The following table shows the recommended agenda for Day 1.
Time 30 minutes Lessons or Topics Course and Student Introductions

Module A: Exploring IBM Lotus Domino 6 and Domino Designer 6 30 minutes 30 minutes Lesson 1: Introduction to IBM Lotus Domino 6 Lesson 2: Exploring Domino Designer

Module B: Working with Design Elements 1 hour 1 hour 2 hours 2 hours Lesson 3: Working with Forms Lunch Lesson 3: Working with Forms Lesson 4: Working with Views

Day 2
The following table shows the recommended agenda for Day 2.
Time Lessons or Topics

Module B: Working with Design Elements 1 hour Lesson 5: Working with Pages

Module C: Programming in Domino Applications 1 hour 1 hour 1 hour 3 hours 30 minutes Lesson 6: Introducing Formula Language Lesson 7: Using Formula Language in Form Lunch Lesson 7: Using Formula Language in Form

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

Preview

Co urs e D escr ipt ion and St ra tegy

Course Strategy...(continued)

Day 3
The following table shows the recommended agenda for Day 3.
Time Module D: Enhancing Design Elements 2 hours 1 hour 1 hour 15 minutes Lesson 8: Enhancing Forms Lunch Lesson 9: Enhancing Views Lessons or Topics

Module E: Automating Tasks 1 hour 30 minutes Lesson 10: Using Actions to Automate Tasks

Day 4
The following table shows the recommended agenda for Day 4.
Time Module E: Automating Tasks 1 hour 30 minutes Lesson 11: Using an Agent to Update Documents Lessons or Topics

Module F: Working with Security 30 minutes 1 hour 1 hour 30 minutes Lesson 12: Defining Access to a Database Lunch Lesson 13: Accessing Elements within a Database

Module G: Deploying the Application 1 hour Lesson 14: Preparing and Deploying the Application

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

I nst ruc tor P rep ar atio n

Instructor Preparation

Course Materials Preparation Checklist CLI Certification Requirements

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls 7 C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Inst r ucto r Pr epar ati on

Course Materials

Instructor kit
The following table lists and describes the content of the instructor kit.
Instructor Kit Content Developing IBM Lotus Domino 6 Applications: Foundation Skills Description Contains the following: Course description and strategy Recommended agenda Course materials Preparation checklist CLI certification requirements Classroom setup Hints and tips for successfully teaching the learning processes that will help the students accomplish the lesson objectives. Support your delivery of the course. The Classroom Setup section describes these files in further detail.

Course files

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

I nst ruc tor P rep ar atio n

Course Materials...(continued)

Student kit
The following table lists and describes the content of the student kit.
Student Kit Content Developing IBM Lotus Domino 6 Applications: Foundation Skills Description Contains the following: Course description Recommended agenda Lotus professional certification Learning processes Instructional content of the course, including the activities and exercises that will enable the students to accomplish the lesson objective.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

Preview

Inst r ucto r Pr epar ati on

Preparation Checklist

When preparing to teach this course, consider doing the following: Read through the Student Guide and Instructor Guide. Perform all activities and exercises in the Student Guide. Perform all demonstrations and walkthroughs described in the Instructor Guide. 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 find additional resources to further your knowledge of the subject. Practice the classroom setup.

Learning processes definition


A learning process is a method for presenting course information to students. If you are unfamiliar with the learning processes defined by Lotus Education, please refer to Appendix D: Learning Processes for further clarification.

10

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

I nst ruc tor P rep ar atio n

Preparation Checklist...(continued)

CLI Private Site


For more information on how to teach this course, refer to the CLI Private Site locate at http://www.lotus.com/cli. If you have already registered, enter your user name and password to access the Instructor Lounge and other private areas of the Web site to gain additional information for teaching this course. If you have not registered, visit the Education Zone located at http:// www.lotus.com/educationzone and follow the instructions to register for the certified community. After registering, you will be able to access the CLI Private Site using your user name and password.

Interactive Instructor Guide (IIG) - technical courses


The Interactive Instructor Guide (IIG) is a Dominodatabase that contains constructive comments from Certified Lotus Instructors (CLIs) who have taught this course. Consult the IIG to learn about courseware issues, resolutions, tips, and techniques for teaching this course. If you have insights you would like to share with other CLIs after teaching this course, please include your comments in the IIG so that other instructors may benefit from your experience. The IIG is structured so that instructors can: Provide feedback on courseware. Submit courseware problem reports. Share course delivery tips and tools. Lotus Education monitors this site to provide: Responses to feedback. Solutions to courseware problems. Courseware updates. You can access the link to the IIG from the CLI Private Site located at http:// www.lotus.com/cli.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

11

Preview

Inst r ucto r Pr epar ati on

Preparation Checklist...(continued)

Additional instructor preparation information


The following table lists and describes additional resources you can use to prepare to teach this course.
This Resource IBM Redbook titled Performance Considerations for Domino Applications, SG24-5602-00, ISBN: 073841588X Will Help You Learn More About... Performance considerations when developing applications for Domino R5.0 or R4.6, including: How to consider performance and capacity when designing and developing a Domino application How to analyze a Domino application that does not meet its performance and This book focus on the application perspective. IBM Redbook titled Lotus Domino Release 5.0: A Developer's Handbook, SG24-5331-01, ISBN: 0738414123 Developing applications for Domino Release 5. Even though this book focuses on the earlier release of Domino, most of the topics are applicable to developing applications for Domino 6. The book describes how to use the programming languages available in Domino Designer; the formula language, LotusScript, JavaScript, Java, IIOP and CORBA, C++ API and the LSX toolkit. Some good practical advice on Domino development do's and don'ts are then outlined before discussing the Domino Enterprise Connector Services (DECS) which are used to access data from external data sources, along with chapters describing how to use NotesSQL, ODBC, and the LotusScript Data Object (LSDO). The book then explains how to create multilingual international applications for Domino and the Web using the Global Workbench tool. Domino 6 directly from the people who developed the product. This is the Lotus Developer Domain (LDD) site, the premier Web site for technical information about Lotus software from IBM.

http://www-10.lotus.com/ldd

12

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

I nst ruc tor P rep ar atio n

CLI Certification Requirements

CLI Web site


To learn about the requirements for becoming a CLI or to upgrade your current certification, visit the CLI Web site at http://www.lotus.com/home.nsf/welcome/ certification.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

13

Preview

Inst r ucto r Pr epar ati on

14

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C la ssro om S etu p

Classroom Setup
The following system specifications and setup procedures were used to develop and test this course. If the classroom setup does not match these specifications, Lotus Education makes no guarantee that the learning processes in this course will perform as stated.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls 15 C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Cl assr oom Set up

Machine Requirements

Instructor machine requirements


The following table identifies the number of Notes/Domino license types required for the instructor machine(s) for this class.
Notes/Domino License Type IBM Lotus Domino 6 Enterprise Server IBM Lotus Domino Administra tor 6 # of Instructor Server Machines 1 1 # of Instructor Client Machines

Student machine requirements


The following table identifies the number of Notes/Domino license types required for the student machines for this class.
Notes/Domino License Type IBM Lotus Domino Designer 6 # of Student Server Machines # of Student Client Machines 1 per student

16

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C la ssro om S etu p

Machine Requirements...(continued)

Software and hardware requirements


The following table lists the software and hardware required per instructor and student machine to deliver this course. Note: Client requirements are per client software installed on machine. If more than one client type is required on certain machines, add the individual client type requirements together.
Software Requirements Minimum Hardware Requirements per Machine Recommended Hardware Requirements per Machine Internet access

Network

TCP/IP using either Hosts file or DNS with server and domain names defined in the TCP/IP protocol configuration. Windows 2000 Server with Service Pack 3 Or Windows NT 4 Server with Service Pack 6a Lotus Domino Server 6 Memory: 256 MB Disk space: 500 MB CD-ROM drive or access to network file server for installation Support for 256 colors, 800 x 600 resolution Memory:128MB Disk space: 250 MB CD-ROM drive or access to network file server for installation Support for 256 colors, 800 x 600 resolution Synchronize system time with all classroom machines

Instructor servers

Memory: 512 MB Disk space 1 GB

Instructor and student clients

Windows 2000 with Service Pack 3 (recommended) Or Windows NT 4 with Service Pack 6a Lotus Domino Administrator or Designer 6 One of the following browsers: Netscape Navigator 4.7 or above Internet Explorer 5.5 or above Microsoft Powerpoint Viewer (Instructor only)

Memory: 256MB Disk space: 300 MB

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

17

Preview

Cl assr oom Set up

Classroom Setup Overview

Domino naming used in the course


This course uses the following hierarchical naming scheme.
Naming Component Organization certifier Domain Instructor server Instructor account Student accounts Classroom Implementation /WWCorp WWCorp Hub/WWCorp Doctor Notes/WWCorp Student ND01/WWCorp Student ND02/WWCorp Student ND03/WWCorp Student ND04/WWCorp Student ND05/WWCorp Student ND06/WWCorp Student ND07/WWCorp Student ND08/WWCorp Student ND09/WWCorp Student ND10/WWCorp Student ND11/WWCorp Student ND12/WWCorp

18

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C la ssro om S etu p

Classroom Setup Overview...(continued)

Course files
The following tables outline the files used in the course or provided as additional tools. The following table describes the required course configuration files.
Title WWCorps Directory /WWCorp certifier ID file Hub/WWCorps ID file Doctor Notes user ID file Doctor Notes mail file User mail files File name Names.nsf WWCorp.id Hub.id Dnotes.id Dnotes.nsf snd01.nsf snd02.nsf snd03.nsf snd04.nsf snd05.nsf snd06.nsf snd07.nsf snd08.nsf snd09.nsf snd10.nsf snd11.nsf snd12.nsf Instructor_ND510.nsf Practice_ND510.nsf Policies.nsf PoliciesCStart.nsf PoliciesDStart.nsf PoliciesEStart.nsf PoliciesFStart.nsf Supplied graphics ND510_graphics.exe Compressed file of 55 graphics used in the course. Student mail files Function Used to set up the classroom servers and administrators Note: Student ID files are contained in Names.nsf

Domino databases

Instructor demonstrations Student practice Policies and Procedures

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

19

Preview

Cl assr oom Set up

Classroom Setup Overview...(continued)

Course files...
The following table describes the required course presentation files.
Title Classroom Diagrams File name ND510.ppt Function Used throughout the course to display diagrams used in the classroom. Replication concepts An animation executable used to illustrate the differences between pages and forms in Domino Designer 6

Animations

Rep50.exe PagesForms.exe

20

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C la ssro om S etu p

Classroom Setup Instructions


Checklist of classroom setup tasks
Complete the tasks in the following table to set up the classroom prior to the start of class. Detailed procedures for each task appear on the following pages. The last column in the table indicates a task that you may skip if using the supplied Domino Directory and files.
Task 1 2 3 4 5 6 7 8 9 Procedure Install the Domino server software. Install the Domino client software. Install supplied files to instructor machines. Edit hosts file on each classroom machine. Set up the Instructors server. Set up the Instructors workstation. Create a student group Register the student accounts. Modify security settings in Server document. Skip

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

21

Preview

Cl assr oom Set up

Classroom Setup Instructions...(continued)

Task 1: Install the Domino server software


Follow these steps to install the Domino server software. Repeat this procedure for each student machine in the classroom. For Step 4, enter the user name for that machine based on the classroom configuration diagram.
Step 1 2 3 4 Action Run the Domino 6 server install program, Setup.exe, from a CD or other media. On the Welcome screen, click Next. Read the Lotus Licensing Agreement, then click Yes to agree with the terms. On the next screen, enter the following information and then click Next. Name: Doctor Notes Company: Worldwide Corporation Accept the default folders or click Browse to change the drive on which to install Domino. Use the following directory structure: Program files: drive:\Lotus\Domino Data files: drive:\Lotus\Domino\data Click Next. Select Domino Enterprise Server, then click Next to install the default server components. Accept the default group, Lotus Applications, in which to include the Lotus Domino Server program icon, then click Next to begin copying files. Click Finish to complete the installation.

6 7 8

22

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C la ssro om S etu p

Classroom Setup Instructions...(continued)

Task 2: Install the Domino Administrator or Designer client software


Follow these steps to install the Domino client software on the instructors workstation.
Step 1 2 3 4 Action Run the Notes 6 client install program, Setup.exe, from a CD or other media. On the Welcome screen, click Next. Read the License Agreement. Select I accept the terms in the license agreement, then click Next. On the next screen, enter the following information then click Next. Name: Doctor Notes Company: Worldwide Corporation Accept the default folders or click Change to change the drive on which to install Notes. Use the following directory structure: Program files: drive:\program files\Lotus\Notes Data files: drive:\program files\Lotus\Notes\data Click Next. Select the following option and then click Next to install the default client components. Notes Client Domino Designer Domino Administrator Accept the default group, Lotus Applications, in which to include the Domino Administrator program icon, then click Next to begin copying files. Note: If you do not see this screen, click Install to begin copying files. Click Finish to complete the installation.

Installing the Domino client software on student machines For the student machines: Repeat the procedure for each student machine in the classroom.
For Step 4, enter the user name for that machine.
For Step 6, install the Notes Client and Domino Designer only.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

23

Preview

Cl assr oom Set up

Classroom Setup Instructions...(continued)

Task 3: Install supplied files to the instructor machines


Follow these instructions to install the \ND510 course folder to your server and client.
Step 1 2 3 4 5 6 Action Put the course CD in the server or client From the server console, select Start Run.

Read the license agreement and click Accept to indicate that you will comply with the agreement. In the Server Setup window, click Next. Review the README.TXT file. Click Next. Choose one of the following options: Click Next to accept the default folder for installation. Click Browse to select a different directory. Result: The default directory is c:\ND510.

Click Finish to complete the setup. Result: The \ND510 directory is created and populated with the course files.

24

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C la ssro om S etu p

Classroom Setup Instructions...(continued)

Task 3: Install supplied files to the instructor machines...


The setup program will copy the following files to the specified locations creating the necessary directories if required. Instructors server
Directory \Domino\Data\Foundation Files Copied Instructor_ND510.nsf Practice_ND510.nsf Policies.nsf PoliciesCStart.nsf PoliciesDStart.nsf PoliciesEStart.nsf PoliciesFStart.nsf Names.nsf WWCorp.id Hub.id Dnotes.id Dnotes.nsf snd01.ns snd02.nsf snd03.nsf snd04.nsf snd05.nsf snd06.nsf snd07.nsf snd08.nsf snd09.nsf snd10.nsf snd11.nsf snd12.nsf

\ND510

\ND510\Mail

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

25

Preview

Cl assr oom Set up

Classroom Setup Instructions...(continued)

Task 3: Install supplied files to the instructor machines...


Instructors workstation
Directory Foundation Files Copied ND510_grahics.exe Rep50.exe PagesForms.exe ND510.ppt

26

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C la ssro om S etu p

Classroom Setup Instructions...(continued)

Task 4: Edit hosts file on each classroom machine


Use any text editor to edit the hosts file on each classroom machine to include the IP address and server name of the instructor machine as follows:
HubIPaddress Hub/WWCorp hub.wwcorp.com www.wwcorp.com

Task 5: Set up the Instructors server


Follow these steps to set up the Instructors server as the first server in the domain, Hub/WWCorp.
Step 1 2 3 4 From Windows, choose Start Domino Server. Action Programs Lotus Applications Lotus

On the Welcome screen, click Next. Select Set up the first server or a stand-alone server, and click Next. Enter the following information: Server name: Hub Server title: Worldwide Corporation Hub server If using the supplied ID files, complete these steps: a. Check I want to use an existing server ID file. b. Click Browse to select the Hub.id file, then click Select. Click Next.

On the Choose your organization name screen, if not using the supplied files, enter the following information: Organization name: WWCorp Organization Certifier password: lotusnotes If using the supplied ID files, complete these steps: Check I want to use an existing certifier ID file. Click Browse to select the WWCorp.id file, then click Select. Click Next.

6 7

Enter the password, and click OK. For the Domino domain name, enter WWCorp and click Next.
(continued on next page...)

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

27

Preview

Cl assr oom Set up

Classroom Setup Instructions...(continued)

Task 5: Set up the Instructors server...

Step 8

Action On the Specify an Administrator name and password screen, if you are not using the supplied files, than the following fields should already be filled-in. If not, enter the following information: First name: Doctor Last name: Notes Enter the Administrator password: lotusnotes If using the supplied ID files, complete these steps: Check I want to use an existing Administrator ID file. Click Browse to select the Dnotes.id file, then click Select. Click Next.

9 10 11

Enter the password, and click OK. For Internet services, select Web Browsers (HTTP services) and click Next. Review the default enabled port drivers and host name. To change these settings: Click Customize. Enable or disable any ports, add ports or delete ports. Enter the fully qualified Internet host name for the server, hub.wwcorp.com. Click OK. Click Next.

12 13 14

On the Secure your Domino Server screen, accept the defaults and click Next. Review the information selected during this session. To confirm setting up the server with this information, click Setup. When setup completes, click Finish.
(continued on next page...)

28

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C la ssro om S etu p

Classroom Setup Instructions...(continued)

Task 5: Set up the instructors server...


Step 16 Action Before starting the server, copy the supplied files to their target directories: \Domino\data: Names.nsf \Domino\data\mail: Dnotes.nsf and all the student mail files To start the server from Windows, choose Start Programs Applications Lotus Domino Server. Note: The server may take several minutes to initialize. Lotus

17

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

29

Preview

Cl assr oom Set up

Classroom Setup Instructions...(continued)

Task 6: Set up the Instructors workstation


Follow these steps to set up the instructors workstation.
Step 1 2 3 From Windows, choose Start Lotus Notes. Action Programs Lotus Applications

On the Welcome screen, click Next. On the User Information screen, enter: Name: Doctor Notes Domino server: Hub/WWCorp Check I want to connect to a Domino server, and click Next.

If the ID is not found in the Domino Directory, the setup program will request the location of the Notes ID file. To locate the Notes ID file: Click Browse, select Dnotes.id, then click Open. Click Next. Click Yes to copy the ID file to the local data directory. If the user ID is stored in the Domino Directory, the setup program will copy the ID file to the local data directory automatically.

5 6 7 8 9 10

Enter the password, and click OK. On the Additional Services screen, it is not necessary to select any additional services for this course. Click Next. When the Notes setup is complete, click OK. On the Notes 6 Setup screen, click No thanks, just give me the defaults. Result: The standard Lotus Notes 6 desktop displays. Choose File Preferences User Preferences and click Basics. On the Basics tab 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

30

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C la ssro om S etu p

Classroom Setup Instructions...(continued)

Task 7: Create a student group


Note: Skip this step if using the supplied files. Follow these steps to create a student group. This group is used to set the server security
Step 1 2 3 4 5 6 Action From Domino Administrator, select the People & Groups tab Domino Directories section WWCorps Directory section Groups view. Click Add Group. For the Group name, enter Students (Optional) Enter a Description, Mail Domain, and Internet Address. Add Doctor Notes to the group. Click Save & Close.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

31

Preview

Cl assr oom Set up

Classroom Setup Instructions...(continued)

Task 8: Register the student accounts


Note: Skip this step if using the supplied files. Follow these steps to register the student accounts.
Step 1 2 3 4 5 6 Action Select the People & Groups tab Domino Directories section WWCorps Directory section People view. Choose Tools People Register. Click Certifier ID and select Wwcorp.id. Click OK. Enter lotusnotes for the password, and click OK. Select Advanced. On the Basics panel, click Registration Server, select Hub/WWCorp, and click OK. Then enter the following information. Field First name Last name Password 7 Student ND01 lotusnotes Value

Click Password Options, then: On the Password Quality Scale, select Weak password, not very secure (6). Select Set internet password. Select Synch internet password with Notes ID password. Click OK. On the Mail panel, do the following: Select Create file in background. Click Mail Server, enter Hub/WWCorp, then click OK. For Mail file owner access, select Manager. On the Address panel: Verify that the Internet Domain is wwcorp.com For Address format, select FI LastName. On the ID Info panel, verify that the certifier ID is /WWCorp and that the user ID will be stored in the Domino Directory. On the Groups panel, select the Students group in the left pane, then click Add.
(continued on next page...)

10 11

32

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

C la ssro om S etu p

Classroom Setup Instructions...(continued)

Task 8: Register the student accounts...

Step 12 13

Action After completing all required fields, click to add the user to the queue.

Repeat Steps 5 through 11 for each of the following student accounts: Student ND02 Student ND03 Student ND04 Student ND05 Student ND06 Student ND07 Student ND08 Student ND09 Student ND10 Student ND11 Student ND12 To register all users in the queue, click Register All. Click OK to acknowledge successful registration. When finished, click Done to close the Register Person dialog box.

14 15 16

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

33

Preview

Cl assr oom Set up

Classroom Setup Instructions...(continued)

Task 9: Modify security settings in Server document


Note: Skip this step if using the supplied files. Follow these steps to modify the programming security fields in the Server document.
Step 1 2 3 4 Action From Domino Administrator, select the Configuration tab Server section All Server Documents view. Select the instructor server document, and click Edit Server. Select the Security tab. On the Security tab, enter the groups LocalDomainAdmins, LocalDomainServers and Students (or */WWCorp) in each of the following fields: Server Access: Create new databases & templates Create new replicas Create master templates Programmability Restrictions: Run unrestricted methods and operations Sign agents to run on behalf of someone else Sign agents to run on behalf of the invoker of the agent Run restricted LotusScript/Java agents: Run Simple and Formula agents Sign script libraries to run on behalf of someone else Click Save & Close.

34

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

A
Exploring IBM Lotus
Domino 6 and Domino
Designer 6

Lesson 1 Introduction to IBM Lotus Domino 6


Lesson 2 Exploring Domino Designer 6

C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Introduction to IBM Lotus Domino 6

Introduce the lesson

36

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Introduction to IBM Lotus Domino 6

Objectives
After completing this lesson, you should be able to:
9 Describe Domino and its functions
9 Describe the structure and components of a Domino database.
9 Access data in a note.

St uden t G ui de P age No . 18

37

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

What is IBM Lotus Domino 6?


Explain the evolution of data management
It sometimes helps students new to application development to go through the evolution of data management leading up to the Notes/Domino client/server functionality. The bullets below contain information to help you briefly explain the evolution of data management and computing to the students. Draw a diagram on the white board that starts with main frames, leads to PCs, which leads to LANs with simple file sharing, which leads to Domino. Draw a high level conceptual diagram showing that Domino does two things: runs tasks and holds databases. This leads into a discussion of replication, HTTP, Web access. Finally the discussion should lead to back end data sources. The diagram/discussion should end with client/server computing and how Notes/ Domino fits there. The primary purpose of Notes/Domino in the client/server environment is collaboration. Another important point to bring out is that Domino is multi-platform.

At the end of this diagram process, the students should have an understanding of how Notes should be used, and a high level understanding of a couple of infrastructure topics. Keep the discussion at a very high level so that the students do not get overwhelmed with too much detail. The idea is to give them a good foundation and a perspective for what is to follow.

This discussion should take 10 or 15 minutes maximum! Do not go into a discussion of Websphere as it will only confuse the students at this point. Caution

38

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

What is IBM Lotus Domino 6?


IBM Lotus Domino 6 (Domino) applications let people share, collect, track, and
organize information, using IBM Lotus Notes 6 (Notes) and other universally
available clients such as web browsers. The data itself may be contained in Notes
databases or in legacy data systems.
Domino provides a wide range of collaborative services and a framework for
distributed business process applications and workflow. Domino and IBM
WebSphere have built in integration points in the areas of directory, security,
application development, and Java services.
Domino is a rapid application development (RAD) environment with a high return
on investment to its users.
Other features that Domino provides include:

Integrated Web security


Native HTML
Integrated Javascript events
Integration with the file system
Java agents and servlets
Distributed objects, such as CORBA/IIOP
Integration with third party design tools
Integration with Microsoft IIS
Programmable object store
Replication

Domino also integrates with back-end data sources such as DB2 and Oracle, and
with transaction systems such as CICS.

St uden t G ui de P age No . 19

39

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Examining a Domino Database


Explain the Domino database containment model
The notes in a database are also containers. They contain items. This is discussed later in the lesson.

40

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Examining a Domino Database


Domino database containment model
The foundation of the Notes/Domino design is the use of a single and simple data structure, called a note, to store all information. Notes are used to store data and design elements. Notes are described in more detail later in this lesson. Domino databases are files that exist on the file system. Domino uses the path and file name to identify the database. Once the database is open, you access data by opening notes. This relationship is described as a containment model. The file system contains databases, a database contains notes, and a note contains data. The following diagram illustrates the Domino database containment model.

As the containment model shows, to access a database, you must first access the file system.

St uden t G ui de P age No . 20

41

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Examining a Domino Database...(continued)

Describe what is stored in the storage facility


The storage facility contains notes. Notes are data containers. There are different types of notes to perform specific functions within the database. You will discuss notes in more depth in the following pages.

Describe the functionality of the index facility


The index facility is a subset of the database that builds and maintains sorted lists of data in the storage facility. These sorted lists are called views. Note: You will discuss more on views later in this course.

42

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Examining a Domino database...(continued)


A Domino database contains two areas of functionality:

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.

The following diagram illustrates the components of a Domino database.

St uden t G ui de P age No . 21

43

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Creating a Domino Database


Introduce the three methods of creating a database.
Discuss the three methods noting the pros and cons of each. The students will use all three methods during this course.

44

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Creating a Domino Database


You can create a Domino database in the following ways:

Create a database from a template Create a new blank database Copy an existing database

During this course you will use all three methods.

Defining templates
A template is a database that contains the structure for a particular application, but does not contain any data. There are a number of standard templates that are included with Domino that let you easily set up a discussion database, a personal journal, or a collaborative team database. You will learn more about working with templates later in this course.

Creating a new blank database


A blank database contains no design elements such as pages or forms. Blank databases have one default view. Follow these steps to create a database from scratch:

Step 1

Action Choose File Database New. Result: The New Database dialog box appears. Accept the default of Local to create the database on your local computer. Enter a title for the database. Enter a file name for the database. Select -Blank- from the template list. Click OK.

2 3 4 5. 6

St uden t G ui de P age No . 22

45

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Creating copies of the course databases


Guide students through the Guided Practice
Direct them to do the following:

Use their initials in the file names and titles of their copies. Create their copies on their local systems. Bookmark their personal copies of the Student Practice and Instructor Demo database in the Notes client. Remove any bookmarks to the original databases.

Note: The students will copy the Instructor database. They will create their copy of the Practice database from the Practice_ND510.NTF template.

46

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Creating copies of the course database


During this course you will work in a Practice database for all Guided Practices
and some Exercises. During the following Guided Practice you will:

Create a personal copy of the Practice database from a template.


Create a personal copy of the Instructor database by copying.
Give your databases unique names.
Create database bookmarks in the Notes client

Create a personal copy of the Instructor Demo database


Follow these steps to create a personal copy of the Instructor database.
Step 1 2 3 4 5 6 7 8 9 10 Open the Notes client. Choose FileDatabaseOpen. In the Server dialog box, select the course server. In the Database dialog box, select Instructor Demo. Click Open. Result: The Instructor Demo database opens in the Notes Client. Choose FileDatabaseNew Copy. In the Server dialog box, select Local. In the Title dialog enter a title for the database that includes your initials. For example, if your initials are ABC, enter Instructor ABC. In the File name dialog enter a unique file name for your copy of the database. For example, if your initials are ABC, enter InstructorABC.nsf Click OK. Result: the new copy of the database is created and saved in the notes/data directory on your local system. Next you will open your database and create a bookmark. Choose FileDatabaseOpen. Select your new file from the Databases list. Click OK. Right-click on the window tab for your database. Choose Bookmark. Click OK. Action

11

12 13 14

St uden t G ui de P age No . 23

47

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Creating copies of the course databases...(continued)

Continue with the Guided Practice


(continued)

48

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Create copies of the course databases...(continued)

Create a personal copy of the Practice database


Follow these steps to create a personal copy of the Practice database:

Step 1 2 3 4 Open the Notes client. Choose FileDatabaseNew.

Action

In the Server dialog box, make sure Local is selected. In the Title dialog enter a title for the database that includes your initials. For example, if your initials are ABC, enter Practice ABC. In the File name dialog enter a unique file name for your copy of the database. For example, if your initials are ABC, enter PracticeABC.nsf

5 6 7 13 14

In the Specify Template for New Database section, select the classroom server in the Server dialog. In the Template list, highlight Foundation Practice Template. Click OK. Result: The new Practice database opens in the Notes client. Right-click on the window tab for your database. Choose Bookmark. Click OK.

St uden t G ui de P age No . 24

49

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

How Domino Stores Information


Define item
Metadata describes how the data is formatted.

50

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

How Domino Stores Information


As stated earlier, the note is the data structure used to store all information in a Notes/Domino database.

Characteristics of notes
All notes in a database are essentially the same. They are peers to one another and do not share hierarchical or other relationships. Notes only differ in the data values they contain and how Domino uses them.

How a note stores data


A note stores data in items. Each item is identified by a name and contains a list of values. The values in a single item must be the same data type. Items also store information about the data. This metadata is available to the application and the Domino services. Metadata is, literally, data about data.

St uden t G ui de P age No . 25

51

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

How Domino Stores Information...(continued)

Describe the different types of notes


There are notes that you create and notes that Domino maintains automatically. Note: Any student already familiar with the Notes client will know data as documents.

52

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

How Domino Stores Information...(continued)

Types of notes
A Domino database contains Header, ACL, and Design notes. It also contains Data notes once the users of the database creates them. Some notes are created by users and developers and other notes are maintained by Domino to track and control information in the database.

Notes that developers create


The following table describes the types of notes that users and developers can create in a Domino database.
Type of Note Data Purpose Stores data values used in the application. For example, a data note may contain customer profile 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 Domino displays information to a user.

Design

Notes that Domino maintains


The following table describes other types of notes that Domino maintains.
Type of Note ACL Database header Purpose The ACL stores a list of names and options for controlling access permissions to the database. Domino stores information about the database in a database header note. The database header contains information such as the version of Domino used to create the database, the title of the database, the database ID, etc.

St uden t G ui de P age No . 26

53

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Accessing Data in a Note


Open the Document Properties box
In the Instructor Demo database, open the Document Properties box using alternate methods (for example, the right-click menu).

54

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Accessing Data in a Note


Data is stored in a specific kind of note, referred to either as a data note or a document. Both terms are used interchangeably throughout this course. You can create and access documents in many ways.

The Document Properties box


The Notes client provides users with the ability to examine documents through a properties box. The Document Properties box reads the contents of a document and displays information to the user. The following diagram shows the Document Properties box.

Open the Document Properties box


Follow these steps to open the Design Document Properties box.
Step 1 2 3 4 Action Open the database in the Notes client. Select the document you wish to examine. Choose FileDocument Properties (or right-click) to open the Document Properties box. Use the tabs of the Properties box to view the structure of the data note.

St uden t G ui de P age No . 27

55

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Accessing Data in a Note...(continued)

Examine data in a document


Use the document properties box to analyze the data contained in a document. Show students how to locate the following information:

Properties, such as the created date and last user to modify the document Item values and meta-data, including the data type and special flags (Summary and RichText) The document ID

Note: An overview of programming languages is contained in Appendix B.

56

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Accessing Data in a Note...(continued)

Examining a document through the Properties box


The properties box has several tabs that display different information about the document. The following table describes three of these tabs.
Tab Document Info Information Displayed Data about the document that Domino maintains, for example: When it was created
When it was last modified Who last modified it

Fields

List of the items in the document and the data each item contains. Selecting an item in the left pane displays its value and meta-data in the right pane. Meta-data includes the data type and special flags Domino uses when dealing with this data. The Unique ID of the document.

Document IDs

Other ways of accessing data


Domino provides access to data in several ways, including:

Fields on a form
Columns in a view
Programmatically via any of the following:
Formula language
LotusScript
JavaScript
Java
XML

St uden t G ui de P age No . 28

57

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Analyzing Documents Exercise


Introduce the exercise
Students should be in the All Documents view or they will not see the documents created by the agent.

Review the exercise


Students should have used the Document Properties box to answer the questions. Now that the students have an overall view of the Domino database, you will introduce them to Domino Designer.

The last part of this lesson addresses using the Notes client and a Web browser to access a Domino application.

58

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Analyzing Documents Exercise


Documents
In this exercise, you will answer questions about the content of documents.

Tasks
Open the Customer view in your copy of the Instructor database. Answer the following questions:

Who last updated the document? When was the document created? What is the data type of the CustomerID item?

St uden t G ui de P age No . 29

59

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Using the Notes Client to Access A Domino Application


Use Notes to access a Domino application

Open the Instructor Demo application, Instructor_ND510.nsf, using the Notes client, and describe the Domino services being used as the database opens (including Authentication and Authorization). When the Instructor Demo database opens, it displays two messages:

A message welcoming you - indicating that you have been authenticated A message identifying your access level - indicating that you have been authorized to access this database.

Stop the message boxes from popping up for the rest of the class by commenting out the two MessageBox statements at the end of the code in the PostOpen event of the Database Script.
Instructor Task

60

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Using the Notes Client to Access A Domino Application


Domino applications are client-server applications. The client communicates with the application using a proprietary remote procedure call mechanism. The Notes Remote Procedure Call (NRPC) transmits the client request to the Domino application and returns the results. Domino authenticates users when they access applications on the server. Other Domino services are called upon depending on the specifics of the application.

Accessing a Domino application with Notes


The following table describes the stages that occur when a user accesses a Domino application from a Notes client.
Stage 1 2 Description User makes a request to open, read, or save data in the application. Domino authenticates the user making the request and provides authentication information about itself to the user. This occurs when the client first accesses the server. Domino verifies the rights of the user making the request, every time a request is made. Domino executes the request and responds to the client.

3 4

The following diagram illustrates the Notes client accessing a Domino application.

St uden t G ui de P age No . 30

61

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Using the Notes Client to Access a Domino Application...


(continued)

Describe working with local applications


The server is the entity that authenticates you.

62

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Using the Notes Client to Access a Domino Application...


(continued)

Working with local applications


A local database allows users to work off-line (not connected to the network). Local databases can also be used to run personal applications that should not be available to multiple users. The Notes client provides a subset of Domino services to execute common functionality locally and reduce the load on the server. The client does not support the same level of security checks and restrictions that the server does. However, there are database properties that the developer can employ to enforce a certain level of security on applications that reside locally.

St uden t G ui de P age No . 31

63

Preview

Lesso n 1 I ntr odu cti on t o I BM Lot us D omi no 6

Using a Web Browser to Access Domino Applications


Explain how Domino supports Web clients
When explaining the diagram, note that HTML is passed between the Web browser and Domino just like any other Web server.

Use a Web browser to access a Domino application


Open the Instructor Demo application using a Web browser, and describe the Domino services involved in this action (including authentication, authorization, and HTTP translation.) Note that the way each client accesses a Domino application is very similar.

Caution

Note about step 2 in the table on the student guide page. Authentication does not always happen. Authentication is the process of verifying the identity of a user (or server). It depends on the server setup and the database ACL. 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 identified as Anonymous.

64

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 1 Int ro duct ion to IB M Lo tus Do mino 6

Using a Web Browser to Access Domino Applications


Domino supports the HTTP protocol allowing Web browsers to access applications on a Domino server. As with access using a Notes client, Domino authenticates users when they access applications on the server via a Web browser.

Accessing a Domino application with a Web browser


The following table describes how browsers interact with Domino applications.
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, 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 identified as Anonymous. Domino verifies the rights of the user making the request. Domino translates the HTTP request. Domino executes the request.

3 4 4

The following diagram illustrates how a Web browser accesses a Domino application. In this example, data is also accessed from DB2.

St uden t G ui de P age No . 32

65

Preview

Lesso n 2 E xplo ri ng Domi no Desi gner 6

Exploring Domino Designer 6

Introduce the lesson


Domino Designer is the development environment used to develop Domino applications.

66

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 2 Exp lor ing Do mino D esign er 6

Exploring Domino Designer 6

The IBM Lotus Domino Designer 6 (Designer) client is used to create IBM Lotus Domino applications. In this lesson, you will explore Designer.

Objectives
After completing this lesson, you will be able to:
9 Access the design of a database.
9 Access individual design elements within the database.
9 Create application bookmarks in Designer.

St uden t G ui de P age No . 33

67

Preview

Lesso n 2 E xplo ri ng Domi no Desi gner 6

Accessing a Database Design


Designer is the tool developers use to create an application that the Domino server serves to various clients.

Open a Domino database in Designer


Using the Instructor demo database, demonstrate the concepts presented on the Student Guide page. Students will have an opportunity to open a database and explore it at the end of this lesson.

Explore the design environment


Have the students open Designer Help to the Exploring Lotus Domino Designer topic. Review the Designer diagram and the list of Designer elements. To help students feel comfortable with these areas, briefly demonstrate how to do the following:

Collapse and expand a database to show the bookmark icons. List different design elements in the Work pane by clicking them in the Design list. Go to different windows by clicking tabs and close windows by clicking the X in the window tabs.

68

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 2 Exp lor ing Do mino D esign er 6

Accessing a Database Design


Designer is the development environment used to build Domino applications. Designer contains the tools necessary to create powerful Domino applications. To access the design of a database, open that database in Designer.

Opening a Domino database in Designer


Follow these steps to open a database in Designer.
Step 1 2 3 4 5 Open Designer. Choose FileDatabaseOpen from the menu. In the Server: box, enter the location of the application (server name or local). In the Database: box, select the database from the list or enter it in the Filename: box (directory and file name). Click Open. Action

Exploring the design environment


When you open a database in Designer, the first level of the design environment opens. The following table describes several areas in this environment.
Area Design pane Description Includes the Design list for the database. This is the list of design elements and the Design bookmark icons, which point to the most recent databases on which you have worked. Lists everything in the current database for the selected design element. Across the top of the Work pane are Design action buttons. These buttons perform actions on the currently dis played elements (such as creating a new form). Window tabs Each item that you are working on currently has its own tab that, when clicked, takes you to the window that tab represents.

Work pane

St uden t G ui de P age No . 34

69

Preview

Lesso n 2 E xplo ri ng Domi no Desi gner 6

Accessing Design Elements


The rest of this course focuses on how to create and use the various design elements. The table on the Student Guide page is meant as an introduction.

70

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 2 Exp lor ing Do mino D esign er 6

Accessing Design Elements


Designer includes structures called design elements that are the building blocks for applications. Customize these structures to create applications.

Application tasks and corresponding design elements


The following table summarizes tasks you might want an application to perform and the corresponding Domino design element(s) you could use to implement them.
Application Task/ Functionality Display, gather, and organize information. Design Elements
Pages: Contain text, images, applets, and other objects.

Users cannot enter information into pages.


Forms: Contain fields 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. Control navigation. Actions and agents: Can run scripts when a user does something. Hotspots, framesets, outlines, and image maps: When used in combination, allow users to move around the appli cation quickly and easily.

Access control and programming


Design elements are one of four pieces of a Domino application. Two other pieces - the Access Control List and Logic - will also be discussed in this course.
To... Apply logic Use... Programming languages, which enable you to:
Calculate or modify information. Validate inputs before saving.

Restrict access to information in the database

The Access Control List (ACL) and other elements, which identify the users who can:
Create, read, and modify data. Change the design of the application.

St uden t G ui de P age No . 35

71

Preview

Lesso n 2 E xplo ri ng Domi no Desi gner 6

Accessing Design Elements... (continued)


Note that the Design pane remains static, thus continuing to allow you access to all design elements.

Add or modify a page or form


Working in the Instructor demo database, demonstrate how an individual design element is modified and/or created in the Work pane.

72

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 2 Exp lor ing Do mino D esign er 6

Accessing Design Elements... (continued)

Accessing design elements


When you click a design element in the Design list, all of the individual, databasespecific elements of that type of element are listed in the Design pane and the Work pane. To open an individual design element, double-click the element in the Work pane. The element then opens into the Work pane, with the Programmers pane below it. The following diagram shows these areas in Domino Designer.
Design list Work pane

pane

Programmers pane

Objects tab

Reference tab

Script area

Using the Work pane


The Work pane is used for creating and modifying forms, pages, views, and other elements in the Design list that are specific to your application or database. When you open or create an individual design element, Designer automatically displays that element in the Work pane.
St uden t G ui de P age No . 36 73

Preview

Lesso n 2 E xplo ri ng Domi no Desi gner 6

Accessing Design Elements...(continued)

Show the Programmers pane

Show the students how to access Help

74

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 2 Exp lor ing Do mino D esign er 6

Accessing Design Elements...(continued)

Using the Programmers pane


Use the Programmers pane to add code in areas of the current design element in the Work pane. The following table describes the parts of the Programmers pane.
Part Objects tab Function Lists all areas (objects and events) in the current design ele ment where you can add code. Code is added in the Script area. When you click an item in the Objects tab, the Script area changes to show the code that describes the object. The Reference tab reflects the language(s) that you can use in the Script area. Lists fields and functions that can be used to script the object. Designers can paste from the list or from the context-sensitive help into the Script area. Used to write scripts for the element selected using the Objects tab.

Reference tab

Script area

Domino Designer References


The following table describes different ways of getting help in Domino Designer.
Resource Domino Designer Help Function Provides details on:
Using Domino Designer Designing Domino applications

How to Open Choose HelpHelp Topics from the menu.

St uden t G ui de P age No . 37

75

Preview

Lesso n 2 E xplo ri ng Domi no Desi gner 6

Managing the Designer Environment


Lead students through this Guided Practice
After the students complete the Guided Practice, open Designer Help and show them where to find further information about working with folders and bookmarks.

76

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 2 Exp lor ing Do mino D esign er 6

Managing the Designer Environment


The Designer environment provides tools to help developers manage the development of complex applications. These tools include the ability to create bookmarks on the Designer bookmark bar, and the ability to create folders to organize application bookmarks

Create a Folder and Bookmark for the Course Database in Designer


In this Guided Practice you will create a folder on the Designer Bookmark bar that contains a bookmark for the Practice database.

Step 1 2 3 4 5 Open Designer.

Action

Click the folder icon in the Design pane. Result: The Create Folder dialog box opens. Enter a name for the new folder. Call it Foundation. In the Create Folder dialog box, 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. Now create a bookmark within the folder. Choose FileDatabaseOpen. Select the name of your Practice database. Click Open. Result: The database is opened in Designer. Drag the database icon to the Foundation folder. Result: A bookmark for the Foundation practice database is created in the Foundation folder.

7 8 9

St uden t G ui de P age No . 38

77

Preview

Lesso n 2 E xplo ri ng Domi no Desi gner 6

The Course Files


Explain the course databases and their usage

Explain the uses of the course Practice database. Explain the uses of the Instructor Demo database. Show the finished Policies database, Policies.nsf, so that the students see what they will create throughout the course.

78

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 2 Exp lor ing Do mino D esign er 6

The Course Files


The Databases
Throughout this course you will work in several databases. They are:

Practice database. This database is used in Guided Practices and some exercises. You created a personal copy of this database from a template in Lesson 1. Occasionally you will access the Instructor demo database. You created a personal copy of this database in Lesson 1. Policies database. You will create this database during exercises throughout the course.

The Policies database that you will design and develop will contain corporate polices and procedures for Worldwide Corporation. It will also contain a discussion forum so that employees can ask questions about policies or procedures.

The Scenario
Worldwide 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 who work from their homes.

St uden t G ui de P age No . 39

79

Preview

Lesso n 2 E xplo ri ng Domi no Desi gner 6

80

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

B
Working with Design Elements
Lesson 3 Working with Forms Lesson 4 Working with Views Lesson 5 Working with Pages

C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Lesso n 3 Wo rk ing wi th For ms

Working with Forms

Introduce the lesson


Forms contain fields to store information in documents and to display information to users. In this lesson, we will create and modify a form. Note: The next lesson, Working with Views, examines how to build views to organize documents for users.

82

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Working with Forms

Forms display and collect information. A form provides a structure for creating and displaying documents.

Objectives
After completing this lesson you should be able to:
9 Define a form.
9 Design a form.
9 Create a form.
9 Add text and formatting features to forms.
9 Preview a form in Notes and on the Web
9 Create fields to store data.
9 Describe the different types of fields.
9 Set a default value for a field.
9 Use Hide/When options to determine when to display data

St uden t G ui de P age No . 42

83

Preview

Lesso n 3 Wo rk ing wi th For ms

Defining Forms
Examine the parts of a form

Open the Instructor Demo database in Designer.


Open the Demo form.
Point out the various elements that are included on this form.

84

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Defining Forms
A form is a design element through which data is entered and displayed. Forms contain application logic, and can act on data. The data collected via a form is stored in a data note, also described as a document. When a user adds information to a database through a form and saves it, the information is saved as a separate document from the form. When a user opens a document, the document uses the form as a template to provide the structure for displaying the data. Forms consist of the following: Fields used to collect or display data. Static elements, such as text, graphics, and tables used to control appearance and user interface. Programming to act on data. The following graphic represents the form design element.

St uden t G ui de P age No . 43

85

Preview

Lesso n 3 Wo rk ing wi th For ms

Defining Forms...(continued)

Review the different types of notes


This is a brief reminder of the types of notes.

86

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Defining Forms...(continued)

Database notes
A form is a design note stored inside a Domino database. The data it contains is the description of the form. Domino databases contain four different types of notes. The following table briefly describes the four note types stored in a database and their function.
Note Type Header Function Contains information about the database itself, such as its name, size, creation date. Each database has a single header note. Stores the Access Control List, a list of names and permissions associated with the database. Each design element, such as a form, view or page is stored in the database 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 Domino for management purposes.

ACL Note Design Note

Data Note

St uden t G ui de P age No . 44

87

Preview

Lesso n 3 Wo rk ing wi th For ms

Defining Forms...(continued)

Differentiate between elements and design elements


In this course, design elements refers to items found in the Design List. Element refers to items like tables, text, fields, graphics, etc, added to a Design element.

Process of creating a form


Discuss the three phases of developing a form as listed on the Student Guide

88

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Defining Forms ...(continued)

Elements used in forms


The following table describes the elements that might be included on a form.
Element Text and graphics Fields Function Display information or pictures on all documents using the form.
Display data from documents. Save data to a document. Compute a value.

Properties Other elements, such as: Subforms Shared fields Buttons and actions

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.

Process of creating a form


There are three phases to creating a form:

Design the appearance Create the form Test the form

St uden t G ui de P age No . 45

89

Preview

Lesso n 3 Wo rk ing wi th For ms

Designing a Form
Discuss planning with design elements
It might be helpful here to briefly discuss the aspects and significance of the
following when planning a Domino application:

Design standards
Method and importance of gathering system requirements
Identifying project stakeholders
Collaboration with the Domino system administrator

Most of these concepts are not unique to a Domino application developer.


However, many students come to class without any experience in developing
applications of any sort. Dont go too deep into these topics.

Designing a form
To open a discussion on forms, ask the students what they would use forms for. Use the questions on the Student Guide page as a starting point. Note: Dont worry about the programming necessary to accomplish some of these tasks. Right now, emphasize that you are brainstorming and working in a general sense and will focus on the specifics as the course progresses.

90

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Designing a Form
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?

Checklist: Designing a form


Complete these tasks to design and create a form.
Task 1 2 3 4 5 6 7 Procedure 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.

St uden t G ui de P age No . 46

91

Preview

Lesso n 3 Wo rk ing wi th For ms

Creating a Form
Create a form
Open the Instructor Demo database in Domino Designer to demonstrate creating a form.

Create a form. Add a line of text. Dont worry about formatting the text which appears later in this lesson.

92

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Creating a Form
Once you have decided upon your forms design, you can create it.

Creating a form
Follow these steps to create a form.
Step 1 2 Open the database in 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. In the Work pane, click New Form. Choose Design Form Properties Enter a name in the Name field. Close the properties box. Add elements to the form. Save the form. Action

3 4 5 6 7 8

St uden t G ui de P age No . 47

93

Preview

Lesso n 3 Wo rk ing wi th For ms

Creating a Form...(continued)

Introduce properties boxes


Introduce properties boxes to students. Properties boxes are modal anD do not need to be closed after setting an elements properties. Explain that properties boxes are context sensitive--i.e. they are different depending upon where the cursor is when launched.

Demonstrate various property boxes


Open the Demo form


Open the properties box for the form
Select a different element from the drop down list, such as text or database.

Each property box looks and behaves the same way. The difference from one
element to another is the actual properties that can be set.

94

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Creating a Form...(continued)

The form properties box


To examine information about a form, use the form Properties box. The properties
of a form, as well as any other element, are modified through the Properties box.
The process to change the properties of an element is as follows:

Select the element.


Open its properties box.
Specify the appropriate properties.
Close or collapse the properties box.

Properties boxes do not need to be closed after each modification. They are live
and change to reflect the latest element selected. Changes are applied
immediately.
The following graphic shows the Form properties box.

Element Name Tabbed Panes Expand/ Collapse Icon Close Icon

Individual Properties

Context Sensitive Help Icon

Use the properties box to specify attributes of a form such as:


Form name Background color Header and footer text

St uden t G ui de P age No . 48

95

Preview

Lesso n 3 Wo rk ing wi th For ms

Creating a Form...(continued)

Form names
Point out the form name guidelines listed in the Student Guide. Give examples from your own experience of good and bad form names. Aliases are covered in the next topic. For an example of a cascading menu topic: Choose Create Document in Domino Designer. A list of existing forms appears to the right. This is a cascading menu. Note: This is also a good opportunity to direct students to Designer Help for Naming forms to get more complete answers.

96

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Creating a Form...(continued)

Naming the form


Form names within the same database must be unique. Form names may include:

Characters Spaces Numbers Punctuation

Form names are also case-sensitive. Although the name itself is limited to 64 bytes, the size limit increases to 256 characters if there is a name alias or cascading menu option.

St uden t G ui de P age No . 49

97

Preview

Lesso n 3 Wo rk ing wi th For ms

Creating a Form...(continued)

Introduce form aliases


Introduce the concept of aliases to the students. Explain that they can be used not just for forms but other design elements as well, such as views. Make sure that you emphasize why aliases are useful, especially when students begin to create formulas.

Create a form alias


Demonstrate how to create a form alias.

Use the form you created previously. Choose Design Form Properties In the name box give the form an alias. Save the form

Indicate to students that there is more than one way to open a properties box and that for continuity, the procedures and guided practices will use the menu bar option, although students are free to use whatever method they prefer, such as the right mouse click options.

98

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Creating a Form...(continued)

Aliases
An alias is simply another name for a form or other design element. Aliases are a short way to refer to the form. If an alias exists, it is used to:

Refer to the form programmatically. Consistently refer to the form, even if the name of the form changes.

Aliases are an internal reference to the form, or element they are associated with.

Creating a form alias


Follow these steps to add an alias to a form.
Step 1 2 Open the form. Choose one of the following methods to open the Form properties box: Design Form Properties Right Click on the form. Choose Form properties. In the Name box, type a | (pipe*) and your alias name after the existing form name. For example:
formName | fn

Action

* Press SHIFT + \ for the pipe symbol. 4 5 Close the Form properties box. Save your form.

St uden t G ui de P age No . 50

99

Preview

Lesso n 3 Wo rk ing wi th For ms

Creating a Form...(continued)

Introduce the Guided Practice


Introduce the Guided Practice as outlined in the student guide. The students create a simple form with an alias. Allow approximately 5 minutes.

100

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Creating a Form...(continued)

Create a form
Follow these steps to create a simple form with an alias.
Step 1 2 3 4 5 Action Open the Practice database. Click Forms in the Design list. Click New Form. Choose Design Form Properties. Type the following name and alias into the Name box.
Employee Information | ei

Result

A list of existing forms appears in the Work pane. A new blank form is opened. The Form Properties box is opened.

6 7

Close the Form properties box. Save the form. Your new form and its alias appears in the form list.

St uden t G ui de P age No . 51

101

Preview

Lesso n 3 Wo rk ing wi th For ms

Adding Text to a Form


Adding text to the form
Demonstrate adding text to a form and formatting it.

Open the form you created previously.


Type some text.
Highlight the text.
Select Text Text Properties.
Change the font style and size.
Close the properties box.

102

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Adding Text to a Form


Forms can contain the following kinds of text:

Static text, for example, the form title, field labels, or explanatory text. Dynamic text, for example, text that is computed.

Formatting text
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
When to display or hide a paragraph
Paragraph Styles

The following graphic shows the text properties box.

St uden t G ui de P age No . 52

103

Preview

Lesso n 3 Wo rk ing wi th For ms

Adding Text to a Form...(continued)

Introduce the Guided Practice


Introduce adding and formatting text as outlined in the Student Guide. In this practice, students modify the form created in the previous Guided Practice. Allow 5 minutes for this Guided Practice.

104

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Adding Text to a Form...(continued)

Adding and formatting text


Follow these steps to add formatted text to your form.
Step 1 2 3 Action Open the Employee Information form in the Practice database. Type the following text: Employee Information Form Highlight the text you just typed and open the Text properties box by choosing Text Text Properties. On the Font tab, choose Arial 24 points. The text appears in the top left corner of your form. The text properties box opens to the Font tab. The text changes to Arial font and 24 points large. Result

Click on the Paragraph Alignment tab and choose the centered text option.

The text is centered across the top of the page.

Click on the Paragraph Border tab and choose the Double style. Select Drop Shadow.

A border box appears around your text, running the length of the form.

7 8

Close the Text properties box. Save your form.

St uden t G ui de P age No . 53

105

Preview

Lesso n 3 Wo rk ing wi th For ms

Previewing Your Work


Demonstrate previewing your work
Demonstrate previewing your work in both the Notes client and a web browser. Be sure to highlight any differences between the forms appearance in the two.

106

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Previewing Your Work


To determine how your work looks and behaves in the target client, preview your work in the supported Web browsers as well as the Notes client. For each supported browser Designer finds installed on your PC, it adds an icon to the Preview toolbar. Clicking a browser icon previews the current design element in the associated browser. The following graphic shows the Preview toolbar.

Previewing your work


Follow these steps to preview your work.
Step 1 2 Action In 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: Design Preview in Notes
Design

Preview in Web Browser.

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 Designer.

St uden t G ui de P age No . 54

107

Preview

Lesso n 3 Wo rk ing wi th For ms

Adding Tables to a Form


Explain where tables are created
Explain the information on the student page.

Introduce table types


Only basic tables are used in this lesson. Note - The table type can be modified using the Special table row display option in the Table Rows tab of the Table properties.

108

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Adding Tables to a Form


A table is an element you can use to organize content into rows and columns. Use tables to organize, summarize, and align elements such as text, fields, and graphics. Tables can be created in:

Pages Forms Subforms Table cells

Types of tables
Domino Designer provides four types of tables. The following table describes these types.
Display Basic Tabbed Animated 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 specified time interval. Animated tables are not supported on the Web and are not designed for data entry on forms. Displays a different row of the table based on an action or field

Programmed

St uden t G ui de P age No . 55

109

Preview

Lesso n 3 Wo rk ing wi th For ms

Adding Tables to a Form...(continued)

Create a table
In the Instructor database, open the form you created previously in this lesson. Add a table with 2 columns and 2 rows. Point out the different width and table type options.

110

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Adding Tables to a Form...(continued)

Table width options


When a table is created, there are three width options available: Fit with margins, Fit to window, and Fixed width. The following table lists these options and their results.
Table width option Fit with margin Result The table fills a given body size, from margin to margin. This is useful when nesting tables within one another. The width of the table will fill the margins regardless of frame size. A measured column width is set for the table, regardless of the size of the window.

Fit to window Fixed width

Creating a table
Follow these steps to create a table.
Step 1 2 3 4 5 6 7 Open a form in 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 form. Action

St uden t G ui de P age No . 56

111

Preview

Lesso n 3 Wo rk ing wi th For ms

Creating Fields
Introduce fields
Now that students have seen how to create a form and add text and tables, talk about fields. Open the Demo form in Designer to show several different fields. Preview the form in the Notes client to demonstrate how the fields:

Collect data Display data Calculate

Have students create a document or two using the Demo form in their Practice databases.

Describe the process of creating fields


Refer to the checklist on the Student Guide page.

112

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Creating Fields
A field is a part of a form that collects, calculates, or displays data. Each field stores a single type of information. The type of information a field accepts must be defined. Fields are used to:

Enter data in documents. Modify the content of documents. View data in documents. Calculate data through formulas.

Checklist: Creating form fields


Complete these tasks to create form fields.
Task 1 2 3 4 5 6 7 8 Add the field to the form. Name the field. Specify data type. Specify how the field is populated. Set additional field properties, and/or Optionally program field contents. Save the form. Test the form in various clients. Procedure

St uden t G ui de P age No . 57

113

Preview

Lesso n 3 Wo rk ing wi th For ms

Creating Fields...(continued)

Demonstrate adding a field to a form


Add a field to a form. Show students the default settings on the Field Info tab of the Field properties box.

Discuss these properties in the next couple of pages.

114

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Creating Fields...(continued)

Specifying field characteristics


When you create fields, specify at least the following characteristics:

Field name
Field type
How the field is populated

Each of these characteristics is specified using the Field properties box.

Adding a field to a form


Follow these steps to add a field to a form.
Step 1 2 Action Place the cursor at the desired location on the form. Choose CreateField from the menu. Alternatively, right-click the form and choose Create Field.* Result: Domino adds a field to the form and opens the fields properties box. Enter a name for the field on the Field Info tab in the properties box. Specify the field type on the Field Info tab in the properties box.

3 4

*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.

St uden t G ui de P age No . 58

115

Preview

Lesso n 3 Wo rk ing wi th For ms

Creating Fields...(continued)

Describe rules and guidelines for naming fields

Describe the different types of data fields


Open the Demo form in the Instructor database to show different field types and their functions.

116

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Creating Fields...(continued)

Naming fields
Each field in a form must have a unique name in that form. Use the following rules and guidelines when naming fields. Field names cannot:

Exceed 32 characters. Begin with a number. Use the @ symbol. Contain spaces.

Caution

Field names can begin with dollar signs ($). However, this typically indicates a reserved field name. These types of fields add functionality that you would otherwise have to program yourself. If you try to use a reserved name in a way that is different from its intended use or redefine the field, Designer displays an error message.

Specifying the type of data for a field


The fields data type determines two things: (1) what type of information the field can contain, and (2) how the field is populated. Fields can contain some of the following types of data:

Text Numbers Date and Time Formulas Rich Text

A more complete list may be found in Designer Help.

St uden t G ui de P age No . 59

117

Preview

Lesso n 3 Wo rk ing wi th For ms

Creating Fields...(continued)

Specify how the field value is populated


Use the following examples when discussing the information in the table on the student page.

Editable: Name, address, etc. Computed: Date created, who last edited the document, etc. Computed for display: A calculation based on other fields in the document. Computed when composed: Who created the document, etc.

Spend some time discussing design considerations for fields and their layout

118

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Creating Fields...(continued)

Specifying how the field is populated


When you indicate the type of data a field contains, you also indicate how the field gets its value. The following table lists the field value options and their purpose.
How the field value is created Editable Computed 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 Created as the result of a calculation. 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. Note: If the field is added to a form, after documents have been created, the value is calculated the next time one of these documents is opened.

Computed for display

Computed when composed

Design considerations when adding fields


Before adding fields to a form, determine the following:

The type of data that you want to capture (text, number, date, etc). Logical position of fields on the form (consider data entry flow). How to identify to users the purpose of the field (for example, field labels). How the data should appear to the reader. How to identify the field for yourself when designing the application (field name).

Domino processes forms from the top-left to the bottom-right. Keep this in mind if you create fields whose calculations are dependent upon other fields on the form.

St uden t G ui de P age No . 60

119

Preview

Lesso n 3 Wo rk ing wi th For ms

Working with Text Data


Explain the difference between a text field and a rich text field
Show text and rich text fields as you talk about them. The Demo form contains these types of fields.

Show Native OS
Use the Demo form to demonstrate the Native OS property. Use the Native OS option with text fields.

120

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Working with Text Data


Designer allows you to specify the type of text data a field will store. The types of text data include:

Text Rich text Lists Names

Using text fields


A text field is editable by default. Users can enter and view alphanumeric data in
this type of field. One example of a text field is a field used to collect or display a
customer name.
Text fields have the following characteristics:

The display format is defined by the field on the form.


Contain no fixed field length.
Can display in a view.

Using rich text fields


A rich text field stores complex data. An example of a rich text field is the Body
field used in the mail memo.
Rich text fields have the following characteristics:

Stores many types of data, including graphics.


Stores formatting with the data.
Cannot display in a view.

Using 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 fields. For example, Editable text fields appear on the document as a fixed-sized outlined box instead of as a blank space marked off by brackets.

St uden t G ui de P age No . 61

121

Preview

Lesso n 3 Wo rk ing wi th For ms

Working with Text Data...(continued)

Introduce the Guided Practice


Allow the students 10 minutes for this Guided Practice.

122

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Working with Text Data...(continued)

Adding text fields to a form


Follow these steps to add first and last name fields, along with text labels, to the Employee Information form.
Step 1 2 3 Action Open the Employee Information form in Designer. Place the cursor below the formatted text. Choose CreateTable. Select the appropriate options to create a basic, fixed width table with one row and four columns. Click OK. Place the cursor in the first cell of the table. Enter the following text: First Name: Place the cursor in the second cell. Choose CreateField to create a field with the following characteristics: Name: FirstName Type: Text/ Editable Place the cursor in the third cell of the table. Enter the following text: Last Name: Place the cursor in the fourth cell. Choose CreateField to create a field with the following characteristics: Name: LastName Type: Text/ Editable Save the form. Preview the form in Notes. Result The form opens in the Work pane The cursor blinks to indicate its position. A table with one row and four columns is inserted.

The text appears in the table cell.

The FirstName field is created.

The text appears in the table cell.

The LastName field is created.

8 7

St uden t G ui de P age No . 62

123

Preview

Lesso n 3 Wo rk ing wi th For ms

Working with Text Data...(continued)

Show examples of list fields


Open the Demo form to show an example of a Listbox field (Department). Modify this field to demonstrate how the other list field options would look. Preview your changes in the Notes client and a web browser.

Note: Dialog lists are rendered in web browsers as combo boxes. Note: Open the Creating fields to display a list of choices document in Designer Help for more detailed information on these field types.

124

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Working with Text Data...(continued)

Using list fields


List fields present users with a list of pre-defined choices. Some types of list fields 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.
Use this type of field Dialog list Checkbox Radio button Listbox Combobox If you want the user to select One or more choices from a pop-up dialog box or 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 add a choice not in the list.

Creating a list of choices


Follow these steps to create a field with a list of choices.
Step 1 2 Action Place the cursor at the desired location on the form. Choose Create Field from the menu. Type a name for the field and choose one of the list field types. Click the Control tab. Select one of the list choices: Enter choices (one per line) Use formula for choices Note: Dialog lists have several more choice options. 5 6 Enter either the list choices or a formula. Save and preview the form.

3 4

St uden t G ui de P age No . 63

125

Preview

Lesso n 3 Wo rk ing wi th For ms

Working with Text Data...(continued)

Demonstrate how to set a default value


This is the students first introduction to formulas.

Explain that formulas are covered in great length later in the course. Briefly explain the UI of the Programmers pane. This is also covered later. In the Instructor database use the Demo form to set a default value in the Department listbox. For example, change the default to Sales.

126

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Working with Text Data...(continued)

Setting the default value for a list field


Providing a default value for a list field ensures that the field gets filled in and often removes the need for users to enter data. Follow these steps to set a default value for a list field.
Step 1 2 3 Action Open the form in the Designer client. Select the List field. In the Programmers pane, click the Objects tab.
The field object with the list fields 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 quotes. Click the checkmark. Result: A value surrounded by quotes displays in the Script area. Caution: This value must exactly match the field names spelling and case. Save the form and preview the design changes.

The following graphic shows the Programmers pane with a field entered as a default value.

St uden t G ui de P age No . 64

127

Preview

Lesso n 3 Wo rk ing wi th For ms

Working with Text Data...(continued)

Introduce the Guided Practice


Allow 10 minutes for this Guided Practice.

128

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Working with Text Data...(continued)

Create and set a default value for a list field


In this Guided Practice, you will create several list fields and set default values for them. Follow these steps to complete the Guided Practice.
Step 1 2 Action Open the Employee Information form in Designer. Add the following field label below the table: Employment Status Add a field next to the text. Open the Field properties box. Add the following characteristics on the Field Info tab: Name: EmploymentStatus Type: Listbox, Editable On the Control tab, enter the following choices: Full time Part time Contractor From the Objects tab in the Programmers pane, select the Default Value object. In the Script area, enter the default value Full time and select the checkbox. Repeat steps 2 through 5 and add another list field with the following characteristics: Name: Department Type: Listbox, Editable Choices: Administration, R&D, Manufacturing Save and test the form. Result The form appears in the Work pane. The text is inserted.

3 4

A new field is inserted. The name and field types are set.

The list choices are set.

Just above the script area, the text EmploymentStatus (Field): Default Value displays. The value is entered in the Script area.

St uden t G ui de P age No . 65

129

Preview

Lesso n 3 Wo rk ing wi th For ms

Working with Text Data...(continued)

Describe Name fields


In the Instructor Demo database, open the Demo form to show an example of a Names field. Readers and Authors fields will be covered in Module F: Working with Security.

130

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Working with Text Data...(continued)

Using Name fields


Domino differentiates text that represents names by having a special category of fields to store names. Because Domino uses system-specific ways to identify users and servers, consider using a Name field when dealing with names. The following table describes the three types of fields that deal with names.
Field Type Names Readers Used to... Insert or display the name of a user or server. May restrict read access to the document. A value in a Readers field will restrict read access to those names specified in that field or in any other Readers or Authors fields in the document. Grants read access to the document and grants edit authority to any name that is also specified as an Author in the Access Control List (ACL).

Authors

An Authors field is a type of field that works in conjunction with the Author access level in the database's Access Control List (ACL). Authors fields do not override the setting in the ACL. They offer developers more control over which users can edit data in the application. Entries in a Readers field cannot give a user more access than is specified in the ACL; they can only further restrict access.

St uden t G ui de P age No . 66

131

Preview

Lesso n 3 Wo rk ing wi th For ms

Working with Numeric Data


Show number fields
In the Demo form, demonstrate the following:

Set different number formatting options for the Salary field.

Point out that a blank value defaults to null which is text, not a number
Note: Have the students add a Salary field to the Employee Information form.

132

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Working with Numeric Data


Create a number field when the data that users will enter is numeric. Domino can use data in a number field to perform mathematical calculations. Number fields recognize the following: Numerals 0 through 9 Plus (+) and minus (-) signs Decimal point (.) Scientific notation (E) Number fields can be editable, computed, computed for display, or computed when composed.

Setting the style of a number field


Follow these steps to set the style of a number field.
Step 1 2 3 Create the field. In the Basics tab of the fields Properties box, select Number as its type. Click the Control tab to set the style. Action

Using a default value for numeric fields

Caution

If a numeric field is saved with a blank, an error will occur if you try to compute a value based on it. A blank value is represented by two quotations, "", and evaluates to a text string. To ensure that numeric fields maintain the proper data type, set an appropriate default value in the Programmers pane.

St uden t G ui de P age No . 67

133

Preview

Lesso n 3 Wo rk ing wi th For ms

Working with Date/Time Data


Add date/time fields to a form
Open the Demo form and add date/time fields. Format them in different styles.

Show Calendar/Time Control


Use the Demo form to demonstrate the Calendar/Time Control property. Use the Calendar/Time Control option with date and time fields. Note: For the calendar/time control to work the field properties must be set to display only the date (for a calendar control) or only the time (for a time control). If both are selected, the field is blank and has no control. Calendar/time controls do not display in web browsers. Note: Have the students add a date field called DateCreated to the Employee Information form.

134

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Working with Date/Time Data


When the data users enter or manipulate references dates or times, use a date/ time field. Date/time fields represent time using a set of numbers and punctuation. Domino stores time in seconds. 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 fields can be editable, computed, computed for display, or computed when composed.

Creating date/time fields


Follow these steps to set the style of a date/time field.
Step 1 2 3 Create the field. In the Basics tab of the Field properties box, select Date/Time as its type. Click the Control tab to format the field. Action

Using Calendar/Time Control


Calendar/Time Control is a style selected on the Field Info tab in the field properties box. The Calendar/Time Control style has a user friendly interface for date/time fields available only to the Notes client. Editable Date/Time fields display as a graphical date/time control.

St uden t G ui de P age No . 68

135

Preview

Lesso n 3 Wo rk ing wi th For ms

Using Hide/When Options


Define the Hide/When property

Show students the Hide/When tab on the Field properties box. Explain the options available. Define a paragraph, i.e. between carriage returns. Point out that when a field is hidden, the entire paragraph on the form that contains the field is hidden as well. Mention that tables can be used to hide information within a line of text since each cell is treated as an individual paragraph.

136

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Using Hide/When Options


Hide/When is a property that controls when an element is visible to users or a specific set of users. The Hide/When option hides the entire row where the selected field, text or graphic is located. However, if the item is inside a table cell, only the contents of the cell are hidden. Some elements that contain Hide/When functionality are:

Text Fields Graphics

The following table details the options available for hiding elements.
Option Previewed for reading Previewed for editing 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 field 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.

Opened for reading

Opened for editing Printed Copied to the Clipboard Embedded Hide paragraph if formula is true

It is important to note that the Hide/When option is not a security feature.

St uden t G ui de P age No . 69

137

Preview

Lesso n 3 Wo rk ing wi th For ms

Using Hide/When Options...(continued)

Describe conditions for using Hide/When options


Use the questions from the student guide as a starting point. Ask students for their business needs for using the Hide/When feature. Give some examples from your own experience.

138

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Using Hide/When Options...(continued)

Conditions for using Hide/When options


When determining whether or not to hide a field, ask the following questions:

Is it appropriate for all users to see this data? Do users need to see the data at all times?

For example, World Wide Corporation has a standard form filled with information about their employees. When a manager opens an employees profile, she doesnt 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.
If Users Are... Reading a document Editing, creating, or printing documents 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 field is a list field. In order to view the list field while editing and the resulting data when reading, create the following two fields:

A list field containing all the World Wide Corporation departments. A computed for display field to display the resulting value

St uden t G ui de P age No . 70

139

Preview

Lesso n 3 Wo rk ing wi th For ms

Using Hide/When Options...(continued)

Show a list field in Read mode


Use the Demo form to demonstrate Hide/When options.

Modify the Department field to display only when in edit mode. Show how this field appears in Create/Edit mode versus Read mode. Use Hide/When properties and create a computed for display field so that only the selected value of a list field (and not the list of choices) displays in Read mode.

Be sure that students understand how to switch between Read mode and Edit mode.

140

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Using Hide/When Options...(continued)

Displaying the selected value of a list field in Read mode


Follow these steps to set Hide/When options for a list field.
Step 1 2 Create an editable list field. Set the properties on the Hide/When tab so that the list field is hidden when the document is: Previewed for reading. Opened for reading. Create another field and set the field type to Computed for display. Set the properties on the Hide/When tab so that the computed field is hidden when the document is: Previewed for editing. Opened for editing. In the Programmers pane, select the Value object for the computed field from the Objects tab. In the Script area, enter the name of the list field. Save the form. Test the form. Action

3 4

5 6 7 8

St uden t G ui de P age No . 71

141

Preview

Lesso n 3 Wo rk ing wi th For ms

Using Hide/When Options...(continued)

Introduce the Guided Practice


Demonstrate for students what the finished product should look like. Allow 10 minutes for this Guided Practice.

142

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Using Hide/When Options...(continued)

Set Hide/When properties


In this Guided Practice you will create a field named DEmploymentStatus (the D in front of the field name indicates that the field is for display only) and set the appropriate Hide/When properties so that the EmploymentStatus list field displays when the document is new or in Edit mode, and the DEmploymentStatus field is displayed when the document is in Read mode. Follow these steps to complete the Guided Practice.
Step 1 Action Add label text and a field on the line below the EmploymentStatus field that has the following characteristics: Label text: Employment Status Field Name: DEmploymentStatus Field Type: Text, Computed for display To set the value of DEmploymentStatus:
Highlight the field. In the Script area of the Programmers

Result The new field is created.

The default value for the new field is set to the value of the EmploymentStatus field.

pane, enter EmploymentStatus. 3 To set Hide/When properties for the new field: Highlight the field. In the Field properties, click the Hide/ When tab. Select Previewed for Editing and Opened for Editing. To set the Hide/When properties for the EmploymentStatus field: Highlight the field. Open the Field properties box. Click the Hide/When tab. Choose Previewed for Reading and Opened for Reading. Save and test the design changes. Create 4 or 5 documents using this form. The field will only display when the form is in Read mode. It will not display when the user is editing the document.

The field will only display when the form is in Edit mode. It will not display when the user is reading the document.

The EmploymentStatus field displays in Edit mode. The DEmploymentStatus field displays in Read mode.

St uden t G ui de P age No . 72

143

Preview

Lesso n 3 Wo rk ing wi th For ms

Exercise: Create a database, and a form that contains a table and fields
Present the review questions
Before introducing the exercise, go over the following review questions:

What is a form and what can it consist of? What should you consider when designing a form? What are the three minimum field characteristics you must specify? Is the Hide/When option a secure one? Under what conditions do you use this option?

Introduce the exercise


Briefly refer back to the simple class scenario before starting the exercise. Also, the procedure for creating a blank database is included in Lesson 1.

Preview the Policy form in the Policies and Procedures database (Policies.nsf) in the Notes client so that students have an idea what they are working towards. Indicate that students are free to experiment with the field types they feel are most appropriate, for example, some might create the Category field as a listbox and others might use the radio button. Display the example exercise screen shot in the Practice database. Allow students 20 minutes for this exercise

144

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesson 3 Wor ki ng w i th For ms

Exercise: Create a database, and a form that contains a table and fields
Worldwide Corporation is in the process of creating organizational policies. In this exercise you will create a database and the form that will be used to enter the companys policies and procedures.

Tasks

Create a new blank database. Name it Policies.NSF. Create a new form in the new database. Name it Policy. Title the form Policies and Procedures. Format the title. Use a table to organize the following fields and field labels. Add the following field labels and field names to collect and/or display the following information: Policy Number: PolicyNo Policy Title: PolicyTitle Effective Date of the policy: EffectiveDate Policy Description: Description Policy Category: Category The categories are Office Guidelines, Benefits, Holidays and Grievance Procedures The category should display when the document is in the read mode, while all the categories should be visible when the document is in edit mode 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 field functionality. Note: The database will contain a default view. All of the documents you create will appear in this view. You will create a customized view in the next lesson.

St uden t G ui de P age No . 73

145

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Working With Views

Introduce the lesson


Views are design elements that organize documents so users can find the information they need. This lesson describes how to design a view.

146

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Working With Views

Domino application developers use views to organize documents according to the needs of the users of the application. In this lesson, you will learn the basics of view architecture and working with views.

Objectives
After completing this lesson, you should be able to:
9 Design a view
9 Create a view
9 Specify documents for a view
9 Create a column
9 Specify contents for a column
9 Organize contents of a view
9 Format a view
9 Set view column totals

St uden t G ui de P age No . 74

147

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Introducing Views
Explain these important points about views

Each row represents data from a single document. Column values are typically created using data from or information about a document. Excessive numbers of views and poorly designed views can have a serious impact on database performance. Views should be designed early in the application development process

Show a view
Open a view in the Instructor database to show students the main elements of a view:

Rows Columns Sorting arrows Twisties

148

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Introducing Views
The purpose of the View design element is to create an organized list of documents so that users can find the information they need. Views are one of the entry points to the documents stored in a Domino database. All databases contain at least one view. However, most databases contain more than one view. The following graphic represents the View design element.

Characteristics of a view
The following list describes some of the characteristics of views:

A view is a list of documents in a database. Each row in a view represents a document in the database. 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 specific documents. Excessive numbers of views and poorly designed views can have a serious impact on database performance. Views should be designed early in the application development process

St uden t G ui de P age No . 75

149

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Introducing Views...(continued)

Explain how Domino stores views


Emphasize the following points about the the view index

Domino generates it. It is based on the documents the developer determines should appear in the view. It determines the order of the documents. Domino determines where to store the view index depending on the View type (for example, Shared or Private) and where the database resides. Describe the view index and its function.

Delay further discussion about the last bullet until the Explain the guidelines for setting initial view properties section.

150

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Introducing Views...(continued)

How Domino stores a view


Domino uses an internal filing system called the view index to store the list of documents in a view. End users and designers never work directly with the view index. It is built and maintained by the Domino application. The following table describes how Domino builds a view.
Stage 1 2 3 Description The application developer creates the view design. Domino pulls information from documents according to the design and builds a view index. Domino displays the information to users.

The following graphic shows how Domino builds a view.

St uden t G ui de P age No . 76

151

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Introducing Views...(continued)

Explain how Domino builds a view


The diagram on the Student Guide shows how Domino uses the view design to build a collection and index.

152

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Introducing Views...(continued)

How Domino builds a view


The following diagram illustrates how Domino builds a view.

The Notes Index Facility


The Notes Index Facility (NIF) resides within a Domino database. The NIF is responsible for all tasks that keep documents ordered within each database view. Some of the NIF functions include:

Open and close collections. Update the index. Locate notes within an index. Locate index entries. Update collections.

St uden t G ui de P age No . 77

153

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Introducing Views...(continued)

Minimizing the number of views


Explain that it is faster for Domino to reorder a collection than open another index.

Show the Click on column header property


Use the Demo\ Views view to show the sort property for the Last Name column.

154

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Introducing Views...(continued)

Minimizing the number of views


Each view builds its own collection and related index, with all the collations or sorts you have specified. When preparing a view for display to a client keep in mind that it is much faster for Domino to reorder a collection that is already open (different sorts in same view) than to open and order a different collection (different views). Use the Click on column header to sort property to minimize the number of views and maximize the sorting within those views. The following illustration shows the Click on column header to sort property:

St uden t G ui de P age No . 78

155

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Designing a View
Instructional methodology
Designing a view is a complex procedure and has been divided into five smaller tasks as listed in the checklist on the Student Guide. As a developer becomes more comfortable with Designer, these tasks can be done in almost any order. This is an instructional methodology and not intended to be a design methodology.

Tips on designing a view Emphasize the importance of understanding the business needs as you design a view. Give some real-life examples from your experience.

Explain that views should show no more or less than the users need to see in order to locate the document(s) of interest. Views can make or break an application.

Design a view
Design a new view for the Instructor database with input from the students. Demonstrate how to sketch a simple view on the board for a set of documents. Use this design to demonstrate the many procedures involved in creating a view.

156

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Designing a View
Effective views allow users to find 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
Will the view be for shared or private use
How to format and display the information

Process of creating a view


Follow these steps to design and build a view.
Step 1 2 3 4 5 Create the view. Select documents for the view. Add columns to the view. Sort and categorize the documents. Format the view display. Action

Note: These steps will be discussed in more detail in the following sections of this lesson.

St uden t G ui de P age No . 79

157

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Creating the View


Create a view
Demonstrate how to create a shared view that has no selection conditions. In the Instructor database, create a view that has these characteristics:

View name: Whatever you want View type: Shared Location: Views Copy style from: Blank Select condition: None

Refresh the view to show that many documents are being viewed. Note: Continue working with this view as you go through the next several demos.

158

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Creating the View


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

Creating a view
Follow these steps in Domino Designer to create a new view.
Step 1 2 3 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: Domino creates the view and adds it to the list in the Work pane. Action

St uden t G ui de P age No . 80

159

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Creating the View...(continued)

Explain the guidelines for setting initial view properties


The following table lists topics to introduce now and expand on later in the course.
Briefly Mention These Topics... Simple selection conditions Using formulas to build selection conditions More Detailed Information Appears in... Selecting Documents for a View section Module C: Programming in Domino Applications

160

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Creating the View...(continued)

Guidelines for setting initial view properties


The following are guidelines for setting the initial view properties.
Property View name Type Guidelines Use a short, descriptive name indicating how the view organizes documents.
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 quickly find all others. 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-first-use views to distribute views that begin as shared, but change to private once a user has accessed and saved the view. 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. Creates a cascaded list of views.

Note: Typing a backslash (\) after a views name with a new name accomplishes the same cascaded view menu. Copy style from Selection conditions Use the design of another view in the current database as a template.
Leave the condition blank to include all documents in the

database.
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.

St uden t G ui de P age No . 81

161

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Creating the View ...(continued)

Using an alias
Using an alias is a good habit to practice. Encourage students to adopt a standard naming convention for aliases.

Set properties for a view


Demonstrate how to set the alias and comment for a view.

In the Instructor database, open the Demo View. Enter an alias and comment.

Note: Continue working with this view in the next demo.

162

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Creating the View ...(continued)

Creating an alias for a view


Follow these steps to set properties after creating a new view.
Step 1 2 3 Action Open the view in Domino Designer. Open the View properties box. On the Basics tab, enter an Alias and Comment.

St uden t G ui de P age No . 82

163

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Selecting Documents for a View


Add selection conditions to a view
Demonstrate how to use the Simple Search Builder to add a simple condition to a view.

Open the Instructor database. Add a selection condition to the View Demo view to include only documents that use the Demo form. Refresh the view to show the change.

Walk through the different conditions to show how the available options change.

164

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Selecting Documents for a View


Add selection conditions to control which documents a view includes.

Adding selection conditions to a view


Follow these steps to add selection conditions to a view.
Step 1 2 3 Action Open the view in Domino Designer. In the Object list of the Programmers pane, click View Selection. In the Infolist of the Programmer's pane, ensure that the default is Simple Search. Result: The Programmers Pane has an Add Condition button added to the bottom of the script area. In the Script area, click Add Condition. Result: The Simple Search dialog box opens.

5 6

In the Simple Search dialog box, create a condition. Click OK. Refresh the view index in Designer. Result: Designer rebuilds the view index with the new selection condition.

St uden t G ui de P age No . 83

165

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Selecting Documents for a View...(continued)

Describe the Simple Search Builder


Point out that the Simple Search feature allows designers to create view conditions without programming. However, if they want to set more complex conditions, then they will use formulas, which will be covered in Module C, Programming in Domino Applications. Explain to students that in real world examples using the search builder to select documents for a view will sometimes exclude a subset of documents that would otherwise be included if using a select statement.

166

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Selecting Documents for a View...(continued)

Specifying conditions in the Simple Search Builder


The following table describes the types of conditions you can specify in the Simple Search Builder.
Use the Condition... By Author By Date To Find Documents... Whose author is or is not a specified user or users. Documents must have an Authors field. That were created or modified: On, after, before, or not on a specified date In the last, in the next, older than, or after the next specified number of days Between or not between a specified range of dates. That have a field that contains or does not contain a specified value. Whose Form field contains the specified form name. Whose Form field contains the specified form name and whose fields have matching conditions. Only fill out the fields that are relevant to your search. In the specified folder. That have any, or all, of up to eight terms, words or short phrases.

By Field By Form Fill out example form

In Folder Multiple Words

Note: The Simple Search builder is a tool used mainly by end users to simplify setting view conditions. It does not replace formulas. Developers should use the select statement Formula building will be discussed in Module C, Programming in Domino Applications.

St uden t G ui de P age No . 84

167

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Selecting Documents for a View...(continued)

Introduce the Guided Practice


The students will first create a new view named Employee INformation. They will limit the documents their Employee Information view includes to documents that they created earlier using the Employee Information form in Lesson 3. If they did not create documents, their view will display nothing. Allow students five minutes to complete the Guided Practice. Notes for the Instructor: You can either have the students do the Guided Practices in this lesson as you get to them, or present the content and demos and have them do the Guided Practices all at once before they get to the exercise.

168

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Selecting Documents for a View...(continued)

Create a view with an alias


In this guided practice you will first create a view that is limited to documents created using the Employee Information form. Follow these steps to create the view.
Step 1 2 3 4 Action Open the Practice database. Click Views in the Work Pane. Click New View. Choose the following options: Name: Employee Information View Type: Shared Location: Views Copy from: Blank Select condition: None Click OK 5 6 Double click to open the view you just created. In the View properties Info tab type the following: Alias: ei Comment: This is the first practice view. Close the View properties box.
(continued on next page...)

Result

The create view box is opened. A new blank view is created and displayed in the Work pane.

A blank view opens in the Work pane.

St uden t G ui de P age No . 85

169

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Selecting Documents for a View...(continued)

Introduce the Guided Practice


If some students finish before others, have them create new documents using the Employee Information form.

170

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Selecting Documents for a View...(continued)

Create a view, continued


Follow these steps to limit the documents in the view.
Step 8 Action In the Infolist of the Programmer's pane, ensure that Simple Search is selected. In the Script area, click Add Condition. In the Simple Search dialog box, choose the following: Condition: By form. Search for documents which use form: Employee Information Click Add. 11 Preview your changes. Only documents created using the Employee Information form should appear. Result: Your new view, its alias and comment appears in the view list. The Add condition button appears at the bottom of the programmers pane The condition appears in the programmers pane Result

9 10

12

Close the view. Click Yes to save the view.

St uden t G ui de P age No . 86

171

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Displaying Information in View Columns


There are four parts to consider when adding a column to a view: To add a new column, a developer must:

Add a new column.


Specify a value for the column to display.
Format the view column.
Format the view column values.

Describe how to add a new column to a view


This is the first step in displaying more information in a view. Describe the difference between inserting and appending a view column. You can also append a new column by double clicking on an empty area of the column header bar.

172

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Displaying Information in View Columns


Use columns to display information about the documents in the view.
When you create a view using the Blank option, Domino automatically creates
one column in the view. This column displays row numbers corresponding to the
documents in the view. You can modify this column as well as insert and append
new columns.
When creating a column, do the following:

Add a column to the view.


Specify a value for the column to display.
Format the view column.
Format the view column values.

Adding a new column to a view


You can insert a column to the left of the current column, or append a column to the right of the last column in the view. Follow these steps to add a column to a view.
Step 1 2 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. Action

St uden t G ui de P age No . 87

173

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Displaying Information in View Columns...(continued)

Describe the types of values view columns display


Describe why columns cannot display these field types:

Computed for display Rich text Encrypted (Stay high level on what encrypted fields are because it is beyond the scope of this course.)

Explain that constants can be considered formulas in this context. For example a column with the formula 1. Note: Module C: Programming in Domino Applications discusses formulas.

Specify view column values


Open the View Demo view and select the first column. In the Programmers Pane, select each of the three values, Simple Function, Field and Formula to demonstrate the different options available.

174

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Displaying Information in View Columns...(continued)

Types of values view columns display


The following table describes the three types of values that a view column can display.
Type of Value Field Purpose Displays the value stored in a specified field for each document in the view. Note: View columns cannot display information from computed for display, rich text, and encrypted fields. Returns information about documents that 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 The creation date of the document Displays multiple field values in a single column or creates new values using the Formula language.

Simple Function

Formula

Specifying view column values


After creating a column, specify the information to display in the column. Refresh the view after selecting the value to update the view index and see the change. The following table explains the three methods for displaying data in view columns.
To Display... A single field value stored in the document Information about the document not contained in fields Multiple fields in a single column or new values Select... Field Simple Function And... Click a field from the list. Click a function from the list.

Formula

Write a formula.

Displaying multiple fields in a single view column will be discussed in Module C: Programming in Domino Applications.

St uden t G ui de P age No . 88

175

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Displaying Information in View Columns...

Describe how to format view columns and values


Relate fields on a form to columns in a view. They are both responsible for formatting the information contained in the document. View columns formats are independent of the Form formatting options. For example, a currency field on a form might display an exact currency figure while the same field might be formatted to display only a whole dollar amount in a view. Recall the discussion of fields. Formatting is not stored with the data. Just as you must specify formatting in fields, you must specify formatting for a view column.

Add and format view columns


Demonstrate how to format view columns to:

Illustrate the difference between inserting and appending a column.


Specify column values using simple functions and fields.
Format the columns.
Format the column values.

In the Instructor database, use the View Demo view and:


Change the first column to display the LastName field.


Name this column Last Name and center the column title
Insert a column before the Last Name column to display the FirstName field.
Append a column to display the DateHired field.
Modify this column to only show the month and year.

176

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Displaying Information in View Columns...(continued)

Formatting view columns


To format view columns, set properties in the Column properties box. The Column properties box has many options available to modify and organize the view columns. We will begin with modifying individual columns. The following table lists some column formatting options.
In this Tab... Column Info Set Properties to... Specify general display characteristics including: Column title Width Specify text formatting options for the column title including: Font Size Style Note that you can change all existing column titles by choosing the Apply to all button. Advanced
Specify a name for the column to use when accessing the

Title

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.

Formatting view column values


To specify how a column displays its value, set properties in the Column properties box according to the following table.
In this Tab... Font Numbers Date and time format 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.

St uden t G ui de P age No . 89

177

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Displaying Information in View Columns...(continued)

Introduce the Guided Practice


Students will modify the Employee Information view they created earlier to display employee names, their department and salaries. Allow 10 minutes for this Guided Practice.

178

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Displaying Information in View Columns...(continued)

Adding and formatting view columns


In this Guided Practice you will modify the Employee Information view to show employee names and their departments. Follow these steps to add and format view columns.
Step 1 Action In the Practice database, open the Employee Information view in Designer. Select the first column and choose Field in the Programmers Pane. Choose the LastName field. Double click the column header to open the Column properties box and type the title: Last Name, Insert a column to the left of the Last Name field with the following features: Field: FirstName Column title: First Name Append a column to the right of the Last Name column with the following features: Field: Department Column title: Department Append a column to the right of the Department column with the following features: Field: Salary Column title: Salary Select the Title tab. Choose Center, Bold and Apply to all. Close the Column properties box. Preview your changes. The column title changes to Last Name. The First Name column appears to the left of the Last Name column. Result The view opens in the Work pane.

The Programmers pane displays all the fields available in the Practice.nsf database.

3 4

The Department column appears to the right of the Last Name column.

The Salary column appears to the right of the Department column.

8 9 10

All the view column titles are centered and bold.

St uden t G ui de P age No . 90

179

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Organizing Documents in a View


Show user sorted columns
Open the Demo\Views view to demonstrate user sorted columns.

180

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Organizing Documents in a View


Once you have added columns to display relevant information for the users, organize the list of documents so users can locate a specific document quickly. The sorting tab in the Column properties box provides several different ways to organize documents in a view. There are two types of sort options you can choose:

Standard: Sorts documents by the column value in ascending or descending order. Categorize: Groups together documents with the same column values.

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 specific order. The following table describes how a view sorts different types of values.
Columns that Display... Text values Number values Date/time values Sort Documents... Alphabetically Numerically Chronologically

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 non-accented characters. For example, "ab" sorts before "a."

St uden t G ui de P age No . 91

181

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Organizing Documents in a View...(continued)

Sort documents by column value


Explain the options on the Sorting tab. Demonstrate how to:

Sort the documents in a view using the column properties. Use the Refresh icon to display the changes to the view.

In the View Demo view of the Instructor database, sort the documents in ascending order by last name.

182

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Organizing Documents in a View...(continued)

Sorting documents by column value


Follow these steps to sort documents based on the contents of a column.
Step 1 2 3 4 5 Action 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 refine the sort: Case-sensitive sorting Accent-sensitive sorting Click column header to sort

St uden t G ui de P age No . 92

183

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Organizing Documents in a View...(continued)

Describe the different sort order options

184

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Organizing Documents in a View...(continued)

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 further sort the view. For example, if the primary sort column is last name, the secondary could be the first name. Note: this column can be sorted in either ascending or descending order only.

Descending

Both

Secondary Sort Column

St uden t G ui de P age No . 93

185

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Organizing Documents in a View...(continued)

Introduce the Guided Practice


Allow students 5 minutes for this Guided Practice.

186

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Organizing Documents in a View...(continued)

Set sort columns


In this Guided Practice you will modify the Employee Information view so users can sort the view by last name then first, if necessary. Follow these steps to create user sorted columns.
Step 1 Action In the Practice database, open the Employee Information view in Designer. Double click the Last Name column to open the Column properties box. Click on the Sorting tab and make the following selections: Click on column header to sort: Both Secondary sort column: First Name Order: Ascending Preview your changes. Result The view opens in the Work pane

The Column properties box opens.

The Last Name column has a two headed arrow in the column title header.

St uden t G ui de P age No . 94

187

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Organizing Documents in a View...(continued)

Demonstrate creating a categorized view


In the Instructor database, create a view that displays documents created with the Demo form. Include the First name and Last name categorized by department.

188

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Organizing Documents in a View...(continued)

Categorized columns
A categorized column groups related documents together in a view based on the column value. The following graphic shows a categorized view.

Categorizing documents by column value


Always categorize the left-most columns of the view. Typically you will insert a new column to group related documents together in the view. Follow these steps to categorize a view.
Step 1 2 3 Action Select the column whose value will categorize the documents. Open the Column properties box. On the Sort tab, select Categorized.

St uden t G ui de P age No . 95

189

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Organizing Documents in a View...(continued)

Demonstrate setting view category best practices


Demonstrate what the view looks like if the best practices listed in the student guide arent followed. For example, use a title for the category column, dont use twisties, etc.

190

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Organizing Documents in a View...(continued)

Guidelines for formatting categorized columns


A view displays the column value of a categorized column in its own row. The following table lists some best practice guidelines to follow and why.
Guideline Do not use a title for the column. Why The column values appear in the view and should be self-explanatory. A column title would be redundant. This helps save room in the view to see more data. This simplifies expanding and collapsing different categories for end users. This helps the user differentiate between the category headers and the documents.

Set the width of the column to 1. Show twisties when the row is expandable. Use bold and color to make the categorized column value stand out from other information in the view.

St uden t G ui de P age No . 96

191

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Formatting a View
Set view properties
Do not spend too much time on the Options and Security tabs. Demonstrate how to set the following properties and display the results:

Background color Alternating row colors Row spacing

In the Instructor database, modify the view properties for the View Demo view.

192

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Formatting a View
Use the View properties box to format the view.

Formatting a view
The following table describes some of the properties in the View properties box.
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 color to the views background. Apply an image to the views background. Display alternate rows in different colors. Display totals in the column. Set row spacing.

Advanced Security

Determine when Domino refreshes the view index. Set colors for links in a Web browser. List users who will use the view in the database.

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.

St uden t G ui de P age No . 97

193

Preview

Lesso n 4 Wo rk ing Wit h V iew s

Exercise: Create a Categorized View


Present the review questions
Before introducing the exercise, go over the following review questions:

What is a view and what is its function? Why should you use the sort capability of a view, rather than build one view for each way that your users want documents to be sorted? What should you consider when designing a view? List the ways that you can determine the values that a column displays. What are some best practice guidelines you should use when categorizing a view?

Introduce the exercise


Discuss the knowledge and procedures required to complete the exercise. Open the Policy form and talk through the data the students should display in the view. Encourage students to sketch the view before they start building it. Direct students to create the view from scratch. Allow 20 minutes for this exercise.

194

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 4 Wo rki ng Wit h V iew s

Exercise: Create a Categorized View


Worldwide Corporation wants to provide a new way of organizing its policies and procedures in the Policies and Procedures application. The view should do the following:

List documents created with the Policy form. 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).

Tasks

Build a view according to the requirements stated above.


Name the view Policies.
Test the view in Notes.

St uden t G ui de P age No . 98

195

Preview

Lesso n 5 Wo rk ing wi th Pag es

Working with Pages

Introduce the lesson


Pages contain content created by application developers. This content can be displayed to users. This lesson examines pages, shared image resources, and sections.

196

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Working with Pages

A page is a design element similar in concept to a static HTML page. Domino pages contain text, graphics, and links, and are used to display information. This lesson introduces the information you need to create and modify a page in an application.

Objectives
After completing this lesson, you should be able to:
9 Describe the page design element.
9 Describe the differences between pages and forms.
9 Create and modify a page in an application.
9 Create and incorporate shared resources.
9 Format information in section.
9 Display pages.

St uden t G ui de P age No . 99

197

Preview

Lesso n 5 Wo rk ing wi th Pag es

What Are Pages?


Define a page
Pages and forms share many elements. However:

Pages do not have fields to collect and calculate data. Users can not create pages. Only developers can.

Note that HTML on a page CAN define fields. Students familiar with HTML may bring this point up.

Describe the types of data stored on a page


Discuss the elements that can be stored on a page.

198

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

What Are Pages?


The page design element is similar in concept and usage to a static HTML page. Domino pages structure and display information that remains relatively stable. Application users do not create pages or add content to pages, but use them to discover information and navigate through a site or application. Pages can consist of the following:

Information Organizing elements Programmable elements Navigational elements

All of the elements available to pages are available to forms; however, not all elements available to forms are available to pages. Caution

Types of information on a page


The following table lists the types of information that can be incorporated on a page.
Element Text Graphics Description Static data such as a company name Images such as GIF, JPEG, and BMP files

Organizing elements
The following elements can be used to organize and display information on a page.
Element Tables Sections Layers Description Information organized in rows and columns Collapsible and expandable areas that can include text, graphics, and objects Control the placement, size, and content of information in overlapping blocks.

St uden t G ui de P age No . 100

199

Preview

Lesso n 5 Wo rk ing wi th Pag es

What Are Pages?...(continued)

Describe the types of programmable elements on a page

Describe the types of navigational elements on a page

200

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

What Are Pages?(continued)

Programmable elements
The following programmable elements can be used on pages.
Element Applets HTML Javascript libraries Actions OLE objects Computed Text 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 JavaScript library is a place for storing and sharing common JavaScript programs and code. You can insert an existing JavaScript library into a page, form, or subform. Buttons or hotspots which automate tasks for a user. Links or objects which represent data in another application. Generates dynamic text based on formula results.

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. You can embed the following elements in a page: A view or folder pane Navigator Outlines Date picker Use these elements alone or combine them to control how users navigate through your application.

Embedded elements

St uden t G ui de P age No . 101

201

Preview

Lesso n 5 Wo rk ing wi th Pag es

What Are Pages?(continued)

Introduce the Guided Practice


Students will open the First Look page. Allow 5 minutes for this Guided Practice.

202

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

What are Pages?(continued)

Examine a page
Follow these steps to examine a page, its elements and properties.
Step 1 2 3 4 Action In the Design pane, select Pages. Double-click the First Look page to open it. Choose Design Page Properties. Single click on the following elements to see the different properties boxes: The IBM logo The picture The text Close the properties box. Result A list of pages appears in the Work pane. The First Look page opens The Page properties box opens. The properties box changes to Pictures and Text.

St uden t G ui de P age No . 102

203

Preview

Lesso n 5 Wo rk ing wi th Pag es

Differences Between Forms and Pages


Open and run the PagesForms.exe file
Talk through the differences between pages and forms.

Describe the elements available on forms and pages


Open the Designer 6 Help on Designing Pages to direct students to more information

204

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Differences Between Forms and Pages


Pages and forms are similar in many ways. Both display and organize information and both share many elements. Forms, however, can collect information and contain certain elements not available on pages.

Using pages
When developing or updating an application, designers determine when to use a page versus a form to display information. The following table lists the conditions used to determine whether to use a page or a form.
If the goal is to... Display static information such as company data and background information Collect and store information from end users Use a... Page to structure and display information

Form to structure and display the data

Elements not available on pages


The following table lists the elements available to forms but not to pages.
Design element Layout regions Subforms Fields Shared Fields Embedded elements: File upload Scheduler Editor No No No No No Page Yes Yes Yes Yes Yes Form

St uden t G ui de P age No . 103

205

Preview

Lesso n 5 Wo rk ing wi th Pag es

Creating a Page
Explain the process for creating a page.

Create a page

Walk through each phase of creating a page as you discuss the process.
Create a new page in the Instructor database.
Point out the similarities between creating a page versus a form.

206

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Creating a Page
Application developers design, create and control the display of pages. Application users see pages as they navigate through the application. When developing pages:

Create the page Set the page properties. Add the required elements.

Creating a page
Follow these steps to create a page.
Step 1 2 3 4 5 6 7 Action In the Design pane, click Pages. In the Work pane, click New Page. Select Design Page Properties Enter a name in the Name field. Close the properties box. Add appropriate elements to the page. Save the page.

St uden t G ui de P age No . 104

207

Preview

Lesso n 5 Wo rk ing wi th Pag es

Setting Page Properties


Explain page properties

Reference the diagram of the properties box on the Student Guide page.

208

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Setting Page Properties


In addition to the content that resides on the page, a page contains properties or attributes of its own. Like forms and views, the properties of a page are modified through the properties box. The following graphic shows the Page properties box.
Element Name Expand/ Collapse Icon

Tabbed Panes Close Icon Individual Properties

Context Sensitive Help Icon

St uden t G ui de P age No . 105

209

Preview

Lesso n 5 Wo rk ing wi th Pag es

Setting Page Properties...(continued)

Introduce the Guided Practice


Allow 5 minutes for the Guided Practice. If some students have more time, encourage them to experiment setting the page properties, such as background color.

210

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Setting Page Properties...(continued)

Use properties to specify attributes or aspects of a page such as:

Page name and alias


Background color
Background graphic

Create a page
Follow these steps to create a logo page.
Step 1 2 3 4 5 Action Open the Practice database in Designer. Select Pages in the Design List Click on New Page. Name the page: Practice Page Type the following text at the top of the page Practice Page. Leave the text left-justified and format it however you like. Save and preview the page. The Pages design list appears. A blank page opens in the Work pane. The page name is set. Result

St uden t G ui de P age No . 106

211

Preview

Lesso n 5 Wo rk ing wi th Pag es

Incorporating Graphics
Explain the ways to add graphics

Copy and paste. Import an image. Insert a shared image.

This lesson covers importing an image and inserting a shared image. There are two different menu bar options when importing a graphic from the file system:

File Import Create Picture

Both produce the same result, an imported graphic image. Make sure to note that image size in bytes remains the same regardless if it is scaled down. Images should be optimized prior to importing.

Describe the differences


Briefly describe the differences between:

Copying and pasting a picture Importing it from the file system and Inserting it as a shared resource

Talk about your experience with the pros and cons of each option.

212

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Incorporating Graphics
The use of graphics can make an application more appealing and effective. Domino provides several tools for incorporating graphics. You can:

Copy and paste a graphic from the clipboard. Import an image from a file. Insert a shared image from the shared resources area of the Domino database.

The following image types can be used:


BMP (Bitmap) CGM JPEG GIF Lotus PIC PCX Tiff 5.0

Images can be used in pages and forms. Note: Web browsers support GIF and JPEG formats directly. Use these formats when designing for the Web.

St uden t G ui de P age No . 107

213

Preview

Lesso n 5 Wo rk ing wi th Pag es

Incorporating Graphics...(continued)

Import an image
Open the page you created earlier and demonstrate importing an image. Show both methods of importing an image:

CreatePicture File Import

214

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Incorporating graphics...(continued)

Importing an image from a file


Follow these steps to import an image from a file.
Step 1 2 3 Open the Page in Designer. Place the cursor where you want the graphic to appear. Choose one of the following: CreatePicture
File

Action

Import

Select the images file type. Result: The Create Picture dialog box displays only image file types. File Import displays all file types that can be imported into a Designer page or form. Select or enter the file name. Click Import. Result: The image is inserted onto the page.

5 6

St uden t G ui de P age No . 108

215

Preview

Lesso n 5 Wo rk ing wi th Pag es

Incorporating Graphics...(continued)

Describe Picture properties


Point out that the students have already set properties for Pages and now will set properties for a picture. Describe picture properties and how to use them. The following properties are typically associated with HTML and web pages:

Alternate Text Caption Hotspots

216

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Incorporating Graphics...(continued)

Picture properties
A picture, like other elements, has properties which are modified 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 Border style Alignment Margins

The following graphic shows the Picture properties box:


Element Name Expand/ Collapse Icon Close Icon

Tabbed Panes

Context Sensitive Help Icon Individual Properties

St uden t G ui de P age No . 109

217

Preview

Lesso n 5 Wo rk ing wi th Pag es

Using Shared Resources


Define a shared resource

Explain the advantage of using a shared resource


Example: If you use your company logo in many locations throughout an application and the design of the logo changes, you need only change it once, in the image resource. The change will be implemented everywhere that the image is referenced. Also, mention the security benefit of containment of resources in the database.

Expand the list of resources


Examine the Resources in the Design list. Note that there are Shared Resources and Shared Code.

218

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Using Shared Resources


A shared resource is an element, such as a graphic file, stored within a Domino database. Each database can contain a library of its own shared resources. Shared resources let you reference a resource multiple times throughout a database, while only having to maintain the resource in one location.

Types of shared resources


Each database can contain a library of shared resources consisting of:

Images
Files
Applets
Style Sheets
Data Connections

Shared resource advantages


Using shared resources reduces database 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.

Adding shared resources


To use a shared resource it needs to be imported to the Domino Database. Its native format is maintained during this process.

St uden t G ui de P age No . 110

219

Preview

Lesso n 5 Wo rk ing wi th Pag es

Using Image Resources


Now that the students have been introduced to shared resources, they will be using shared images.

Native format is maintained


Point out that the native format of an image resource is maintained. Once added to the database, the resource can be exported in its native format.

Select an image from image resources and choose export from the Resource menu.

Add an image resource


Demonstrate how to create an image resource in the Instructor database.

Select Shared Resources Images in the Design list. Click New Image Resource. Select the any of the available image files.

220

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Using Image Resources


As you saw earlier in this lesson, you can import an image from the file system. However, if the graphic file changes, the image in the application is not updated unless you import it again.

Adding an image resource to a database


The first step in the process of using a shared image is to create an image resource. Follow these steps to create an image resource.
Step 1 2 2 3 Action 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 file type. Navigate to the correct directory and select the file name. Click Open.

St uden t G ui de P age No . 111

221

Preview

Lesso n 5 Wo rk ing wi th Pag es

Using Image Resources...(continued)

Specify resource properties


An image resource has properties like other design elements. The difference is the actual image is not opened in the Work pane to access the properties.

222

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Using Image Resources...(continued)

Image Resource properties


Like other Domino Designer elements, image resources have properties which are modified using a properties box. Use the Image resource properties to specify attributes such as:

Name and alias Source file information

The following graphic shows the Image Resource properties box.

St uden t G ui de P age No . 112

223

Preview

Lesso n 5 Wo rk ing wi th Pag es

Using Image Resources...(continued)

Insert an image resource


Insert a shared image into the Page you created earlier. Preview the Page in Notes and a Web browser.

Show the source information in the properties box


In the Demo page, demonstrate how to:

View the source information for: An imported picture A shared image resource

Note that a pictures source is computable, if appropriate.

224

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Using Image Resources...(continued)

Inserting an image resource


The second step in the process of using a shared image is to insert the image resource where needed. Follow these steps to insert an image resource.
Step 1 2 3 4 5 6 Action Create a new, or open an existing, Page in Designer. Move the cursor to where you want to the image to appear. Choose Create Image Resource from the menu. Choose the type of image (GIF, JPEG, All Images). Click the file name listed in the list box. Result: A thumbnail view of the image displays in the dialog box. Click OK.

Identifying a pictures source


To identify the source of a picture on a page, use the Picture properties box. The following graphic shows the source of an image added using the Create menu.

The following graphic shows the source of an image that is a shared resource.

St uden t G ui de P age No . 113

225

Preview

Lesso n 5 Wo rk ing wi th Pag es

Using Image Resources...(continued)

Introduce the Guided Practice


In this Guided Practice, students are adding to the Practice Page they created earlier. Provide students with the location of WWGlobe.gif. Allow 10 minutes for this Guided Practice.

226

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Using Image Resources...(continued)

Add and use a shared image


In this Guided Practice, create a shared image to use throughout the World Wide Corporation database. This image is part of the companys new logo. Follow these steps to complete the Guided Practice.
Step 1 Action Create a shared image resource. In the Element list, click Shared Resources. Then, click Images. Click the New Image Resource button. Locate and add WWGlobe.gif. Open the Practice Page you created earlier. Add the shared image below the text you added earlier. Choose Create Image Resource. Select the WWGlobe.gif image. Click OK. Save and preview the page. The Practice Page opens in the Work pane. WWGlobe.gif is added to the page. Result WWGlobe.gif is added to the list of image resources.

2 3 4 5

St uden t G ui de P age No . 114

227

Preview

Lesso n 5 Wo rk ing wi th Pag es

What Are Sections?


Define sections
Describe sections and how to use them.

Show a section and how it works


Provide some common examples of sections. For example:

At the bottom of Designer Help documents, there is a section labeled Related topics. The Lotus Web site also uses sections.

228

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

What Are Sections?


A section is a group of paragraphs that users can collapse to a single line. It is an area on a page or form that can be collapsed or expanded by clicking the mouse. The following table contains examples of a collapsed and expanded section.
If Section State Is... Collapsed It Looks Like This...

Expanded

Uses for sections


A section can include text, fields, and graphics. Consider using a collapsible section to:

Make a page less cluttered. Collapse information that is referred to only occasionally. Collapse information that is not of interest to all users.

St uden t G ui de P age No . 115

229

Preview

Lesso n 5 Wo rk ing wi th Pag es

Creating Sections
Create a section
Open your page:

Create an untitled section that includes some text and a graphic.


Open the sections properties.
Name the section.
Examine the other section properties.

Where can sections be used?


Discuss your experiences using sections.

230

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Creating Sections
It is more efficient to add content such as text and graphics to a page and then group that content by creating sections. However, it is possible to create sections prior to adding content.

Creating a section
Follow these steps to create a section.
Step 1 2 Create or open a page. If the content exists on the page, highlight the information to be used in the section. Choose Create Section from the menu. Result: The section is created. The first line of the section becomes the section title. If the content does not exist, place the cursor where you want to locate the section. Choose Create Section from the menu. Action

Specifying section properties


The Section properties box allows you to specify the following characteristics:

Section title border style Font attributes for the sections title Expand and collapse options

Follow these steps to specify section properties.


Step 1 2 3 Action Select the section by clicking the section title. Choose Section Section Properties from the menu. Make the desired changes to section properties. Result The Section menu becomes available. The Section properties box displays.

St uden t G ui de P age No . 116

231

Preview

Lesso n 5 Wo rk ing wi th Pag es

Displaying Pages in Domino Designer


Discuss the methods for displaying a page.
In this lesson the students will simply create a page and preview it in Notes.

232

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Displaying Pages in Domino Designer


Pages can be displayed to the user in several ways:

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.

St uden t G ui de P age No . 117

233

Preview

Lesso n 5 Wo rk ing wi th Pag es

Exercise: Create A Page


Present the review questions
Before introducing the exercise, go over the following review questions:

What is a Domino page and what can it consist of? How does a page differ from a form? What is the benefit of using a shared resource? When would you use sections?

Introduce the exercise


Tell the students where the image files are located. Allow 15 minutes to complete the exercise

234

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 5 Wo rk ing wi th Pag es

Exercise: Create a Page


Worldwide Corporation needs a page in the Policies and Procedures application that gives people an overview of the company. In this exercise you will create a page and preview it in the Notes client. This work should be done in your Policies database.

Tasks

Create the following shared images: LOGO WW1.GIF bluerule.GIF Create a page named Info that displays the company logo, Logo WW1.gif and the company address 123 Worldwide Blvd. Metropolis, PA 45555 in a table. Place bluerule.GIF below the table. Enter the following text that describes the company. Give the text a heading. Worldwide 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 who work from their homes. Create a section that contains the text. Save and preview your work.

St uden t G ui de P age No . 118

235

Preview

Lesso n 5 Wo rk ing wi th Pag es

236

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

C
Programming in Domino Applications
Lesson 6 Introducing Formula Language Lesson 7 Using Formula Language in Forms

C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Introducing Formula Language

Introduce the Lesson

238

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Introducing Formula Language

In this lesson you will learn the basics of working with the Formula Language. You will use this information throughout the rest of the course.

Objectives
After completing this lesson, you should be able to:
9 Define the rules and syntax of Formula Language
9 Compute values
9 Compare values using operators
9 Use @Functions in formulas
9 Perform Formula language best practices
9 Interface with the user

St uden t G ui de P age No . 120

239

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Working with the Formula Language


Provide simple examples

Instructor Action Computing values examples: Computing the average salary of a group of employees Computing the number of products in an inventory

Important Information Point out that the students can find more detailed information on Formula language rules, syntax, etc., in Designer Help.

Comparing values examples:


Comparing dates in a scheduling

application Comparing two values to see which is higher or lower Automating tasks examples: Updating fields in a group of documents Notifying users in a workflow application

Statements
Describe the elements listed in the table.

240

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Working with the Formula Language


The Formula language provides a straightforward and simple programming interface within Domino applications. Like other programming languages, the Formula language has rules and syntax. Formula language code is generally best used for working with the element that the user is currently processing. The Formula language can be used to perform many types of operations. Some of the more common examples are:

Computing values Comparing values Automating tasks

Statements
Formulas consist of one or more statements that are made up of a combination of the following components:
Element Variables Constants Description Variables can be fields or temporary variables. A constant is something whose value does not change. Constants can be text, numeric, or time-date. Operators assign values, modify values, and combine values into new values. @Functions are built-in formulas that perform a particular calculation and return a value. Keywords are reserved words within the Formula language that perform special functions.

Operators @Functions Keywords

St uden t G ui de P age No . 121

241

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Working with the Formula Language...(continued)

Explain syntax rules and where to code Formula language

Instructor Action Briefly discuss syntax rules and where to code the Formula language. Show them the Objects tab in the Programmers pane.

Important Information

This leads into a further discussion of objects and events in the next section.

242

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Working with the Formula Language...(continued)

Syntax rules
All programming languages have rules. The Formula language is no exception. A formula must conform to the following general rules:
Rule title Statement separators Rule description Separate multiple statements using a semicolon. For example:
@IsNewDoc(TrueArgument;FalseArgument)

Spaces

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 significant 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

Operators and values

Where to use Formulas


Formulas can be used in many design elements such as forms, views, pages, fields, buttons, actions, and so on. Code is entered in an event of an object in the Programmers pane.

St uden t G ui de P age No . 122

243

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Triggering Events
Describe objects and events
Objects contain events. Events contain code. Discuss Domino objects, their events, and what triggers the events. Emphasize that the students need to be aware of the event triggers as they plan the code for the application. Use Domino Designer Help for a complete list of events, their descriptions, and sequencing. Look for the following topics:

Event descriptions Event sequencing

244

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Triggering Events
Code is placed in an event of an object in the Programmers pane. The term object refers to the element, such as the form, field, etc. For instance, you might create a formula to compute the default value of a field. The list of Domino objects includes, but is not limited to:

Databases Agents Actions Views Forms Fields Buttons

Description of events
Code executes in response to an event in a Domino object. Events include opening a database, opening a view, opening a document, moving the cursor into or out of a field, etc. The following table describes several common objects, some of their related events, and what triggers their execution:
Object Database Page or Form Event & Timing Postopen - After a database is opened Queryclose - When a database is being closed onHelp - When Help is selected, i.e., when F1 is pressed onLoad - When the Form or Page is loaded PostRecalc - After the object is refreshed (and values are recalculated) Default value - When document is created Input translation - When document is saved onBlur - When the field loses focus onFocus - When the field gets focus Click - When the button is clicked

Field

Button

St uden t G ui de P age No . 123

245

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Triggering Events...(continued)

Order of field evaluation

Instructor Action Demonstrate this concept using the Demo form in the Instructor demo database.

Important Information The FullName field is computed based on the values in the FirstName and LastName fields. Note that you have to save or refresh the document for the FullName field formula to run.

246

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Triggering Events...(continued)

Order of field evaluation on a form


Fields on a form are evaluated left to right, top to bottom. It is important to keep the order of evaluation in mind when designing the forms in your application. For instance, if a field is computed based on the values in one or more other fields on the form, the computed field must be placed after the field(s) used in the computation.

St uden t G ui de P age No . 124

247

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Computing and Comparing Values


Describe constants and fields

Constants represent static values. Fields represent values (items) in a document. You will see text constants enclosed in both brackets and quotation marks throughout this course.

248

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Computing and Comparing Values


This section describes how to write formulas to compute and compare values.

Using constants in formulas


Constants represent static information in a formula. The following table shows examples of the three types of constants available in the formula language.
Constant Text Rules to Apply
Enclose characters in quotation marks. Enclose characters in braces.

Examples
Hello world. {Hello world.} 10 -6.37 37E6. [5:30 PM] [13:50] [7/11] [10/18/71 6:30 AM]

Numeric

Specify the sign of the number using a

plus or minus sign as the first character.


Use E for scientific notation.

Date-Time

Enclose a date in square brackets. Use AM and PM to represent time in a

12-hour format.

St uden t G ui de P age No . 125

249

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Computing and Comparing Values... (continued)

Describe how to combine values using operators


Operators combine field values and static values. The values that the operators act on must be compatible. If they are not, there are functions available to convert between data types.

Give some examples of using field values in simple formulas


TotalPrice := Price * Quantity
FullName := FirstName + + LastName

Discuss the order of evaluation in a formula examples

250

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Computing and Comparing Values... (continued)

Combining values using operators


You can only combine values of the same type. For example, you can only multiply numbers. The following table describes how to use operators to combine values.
To Combine... Number values Use the Operators...
+ / * +

For Example...
10 + 2.37 + 15 6.05 - 2.35 TotalScore / Quantity TotalPrice * DiscountRate Welcome, + FirstName

Text values

Order of evaluation of operations in a formula


When creating formulas that compute values, keep the following in mind:
Order Parenthesis Description Using parenthesis you can explicitly force the order of evaluation. Operations within parentheses occur first. Example: (5-3) * (6-4) = 4 Precedence Operations not in parenthesis occur in order of precedence. Example: 5 - 3 * 6 - 4 = -17 Left to right Operation of equal precedence occur left to right. Example: 8 / 4 * 2 = 4

St uden t G ui de P age No . 126

251

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Computing and Comparing Values...(continued)

Explain how to use temporary variables


Students should be able to interpret the @functions used in the example, but you should clearly state their behavior.

Write a few simple formulas on the white board

252

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Computing and Comparing Values...(continued)

Using field values in formulas


A formula has access to the field values in the document being processed. If a formula refers to a field by name, it will use the value of the field from the current document. You can use the name of the field as a variable in the formula.

Using temporary variables


Temporary variables only exist within a formula. Use them to make your formulas more modular and readable. You do not need to declare temporary variables before you use them. Assign a value to a temporary variable using the assignment operator (:=). For example:
x := @Power(a; 2) + @Power(b; 2);

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 it.

St uden t G ui de P age No . 127

253

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Computing and Comparing Values

Describe how to compare values using operators


As with combining values, the values must be the same data type in order for the comparison to make sense.

Write a few simple comparison formulas on the white board

254

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Computing and Comparing Values


This section describes how to compare values in formulas.

Comparing values using operators


Compare values of the same type using the operators. The following table illustrates how comparison operators work.
This Expression. .. A=B A<B A <= B A>B A >= B A <> B A >< B A != B (A < B) & (B < C) (A < B) | (A < C) !(A < B) Evaluates to True if... Evaluates to False if...

The values of A and B are equal. The value of A is less than the value of 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. The values of A and B are not equal.

The values of A and B are not equal. The value of B is greater than or equal to the value of A. The value of B is greater than the value of A. The value of B is less than or equal to the value of A. The value of B is less than the value of A. The values of A and B are equal.

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.

St uden t G ui de P age No . 128

255

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Working with @Functions


Discuss how to access information about the application
Discuss these and other useful @functions.

Use Designer Help for more information on @functions


Open Designer Help to @functions A-Z and scroll through the list. Open one or two Help documents of the functions listed on the Student Guide page or show other useful examples.

256

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Working with @Functions


@Functions are built-in formulas that perform calculations and return a value, or
perform an action. @Functions are used in Domino design elements to perform
tasks such as:

Accessing information about the application, its data, and the user
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 arguments, if any. The general format of an @function is:
@FunctionName(argument1; argument2; argument3);

Accessing information about the application


The following table describes some of the @functions that return data about the application.
For Information about the... Current document State of the current document View Database User User environment Web client Use the Function @Created @IsNewDoc @ViewTitle @DbName @UserName @ClientType @BrowserInfo 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 file name of the current database The current users name Notes if the client is Lotus Notes or Web if the client is a Web browser Determines the capabilities of a Web client

St uden t G ui de P age No . 129

257

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Working with @Functions... (continued)

Show a few simple @functions


Use the Formula form to demonstrate several @functions. The Formula form also contains an @If to demonstrate.
Instructor Action Demonstrate how to use a form that displays the formula and then executes it in a field. Important Information Do not try to explain the context of the formula. Focus on the formula itself.

258

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Working with @Functions... (continued)

Examples of @functions
The following table contains common examples of formulas.
This Formula...
@Adjust ([2/11/99]; 0; 1; -4; 0; 0; 0) @Text (10) @ProperCase (hello world.) @Trim ( hello world. )

Returns... The date-time value, 3/07/99 The text value, 10 The text value, Hello World. The text value, hello world.

Acting on a condition
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 - the first parameter is the condition to check True statement - the action to perform if the condition is true False statement - the action to perform if the condition is false

@If statements are evaluated from left to right. The first true condition evaluated causes its corresponding True statement to be processed. If an @If statement contains two conditions, the syntax is:
@If( condition1; TrueStatement1; condition2; TrueStatement2;
False statement)

The following table shows examples of conditional statements.


This Conditional Statement...
@If (3<10; True; False) @If (Author = @UserName; My document; Not mine)

Returns... True My document if the field Author contains the name of the current user.

St uden t G ui de P age No . 130

259

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Formatting and Commenting Formulas


Explain why formatting formulas is a good idea
We want to teach developers new to Domino good coding habits from the very beginning. Therefore this section of the course includes information on coding best practices.

260

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Formatting and Commenting Formulas


In order to make your code easier to read and debug, it is good practice to include comments and formatting. This not only helps the person who developed the code, it also helps any developer who may have to modify the code at a later date.

Formatting Formula language


Formulas can get quite lengthy, particularly when using nested @If statements. To make complicated formulas easier to read, use line breaks and indenting. For example, look at the following formula. Even an experienced Domino developer would have to study this code to interpret what it does.
@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";"Invoi
ce"+ invoiceno+" for purchases made under PO#"+Pono+"))

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, True, and False statements start on separate lines. The statements related to a condition are indented under the condition. The formula gets even easier to understand when you add comments.

St uden t G ui de P age No . 131

261

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Formatting and Commenting Formulas...(continued)

Explain the importance of commenting code


Commenting code is very good habit to develop so that with a quick glance one can look at a piece of code and know what it is supposed to do immediately without having to take it apart and figure it out.

262

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Formatting and Commenting Formulas...(continued)

Commenting Formula language


By adding explanatory text to any code that you write, your applications become much easier to maintain. Documenting code is best done while you are writing it. Use the REM keyword to include comments in Formula language code. The syntax is: REM { 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 email 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 email };
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 email 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"))

St uden t G ui de P age No . 132

263

Preview

Lesso n 6 I ntr odu cing Fo rmu la L angu age

Exercise: Interpret Formulas


Present the review questions
Before introducing the exercise, go over the following review questions:

Describe the types of operations you can perform with the Formula language.
What is an event?
What are constants?
What is a temporary variable and when do you use them?

Introduce the exercise


Direct the students to use Help if they do not know what the @function does. Allow 10 minutes for this exercise.

Review the exercise


Discuss the knowledge and procedures required to complete the exercise. Go through the formulas together so students can be sure they got them right. Describe the behavior of the @functions. Discuss and resolve any doubts on the results of the formulas.

264

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 6 In tr odu cing For mul a La ngua ge

Exercise: Interpret Formulas


A document contains the following fields and values:
FirstName: Susan
LastName: Sunshine
Created on 3/7/99 at 11:59:37 PM

Tasks
Based on the information above, determine the result for each formula in the following table.
Formula 1 2 3 4 5 6 7 8 9 10
FirstName LastName FirstName + LastName LastName + , + FirstName FirstName = Susan (FirstName != Larry) & (LastName = Sunshine) @Adjust (@Created; 0; 6; 0; -2; 0; 0) @If (@Created < @Today; Old; New) @Text (10.22) fullName := FirstName + + LastName; Welcome back, + fullName

Result

St uden t G ui de P age No . 133

265

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Using Formula Language in Forms

Introduce the lesson


Using formulas in forms and fields allows you to calculate, display, and store dynamic information. This lesson will take a closer look at the Programmers pane.

266

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Using Formula Language in Forms

Use formulas in forms to automatically add, calculate, and format data. With formulas, you can:

Display one title when the document is new, and another title when the document is being edited. 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 specified fields left empty. Format user entries to be consistent in all documents.

Objectives
After completing this lesson, you should be able to:
9 Set the window title of a page or form.
9 Create computed text fields to dynamically display values.
9 Use values in a view column as choices in a field.
9 Create computed fields to dynamically store values.
9 Set default values for editable fields.
9 Write input translation formulas to automatically format user entries.
9 Write input validation formulas using @Failure and @Success.
9 Write reusable code
9 Interact with users using prompts

St uden t G ui de P age No . 134

267

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Adding Code to a Form


Describe adding code to a form
The Programmers pane gives the designer a different look at the same design elements in the Work pane. It exposes properties and events of the objects on the design element and the design element itself.

Examine the Programmers pane


Students have already worked with the Programmers pane. Now take a little time and walk them through it.

Open a form in Designer and show students where to add formulas and how to use the reference tabs. Open the Programmers Pane properties box and customize the colors.

268

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Adding Code to a Form


Use formulas to perform such operations as:

Set the window title for a page or form. Display values on a page or form. Compute choices for a list field. Compute values to store in a document. Add logic to editable fields.

Programming a form
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.

Adding a formula in the Programmers pane


Follow these steps to add a formula to an object in the application.
Step 1 Action Select the object either: On the form in the Work pane From the Objects tab in the Programmers pane Select the property or event to which you want to add a formula. At the top of the Script area, select Client and Formula. Enter the formula. Save the formula. Result Designer highlights the object in the Objects tab and displays the programmable properties and events of the object. Designer highlights the property or event. The Reference tab lists the database fields and @functions that can be used in the formula. Designer highlights different elements of the formula with colors. Designer checks the syntax of the formula.

2 3

4 5

St uden t G ui de P age No . 135

269

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Creating a Window Title


Demonstrate using window titles
In this demo, take the students through the following progression:
Instructor Action Show the students a form which has no window title. Use the Demo form in the Instructor demo database. Preview the form in the Notes Client. Enter a hard-coded window title such as Demo Form. Preview the form in Notes. Next, enter a formula such as the following: {Demo form for } + FirstName Now talk about the difference between a new document and an existing document. Tell the students that two @functions that are particularly useful for this type of window title are @If and @IsNewDoc. Continue this demonstration on the next page after discussing @IsNewDoc. Important Information Point out that the title displays as Untitled.

The title displays the text entered.

This time when you preview the form in the browser, note that the text displays, but no name exists yet to display. This leads to the next step. They have seen @If already. @IsNewDoc is discussed on the following page.

270

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Creating a Window Title


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.

Guidelines
It is good practice to always set the window title when designing forms and pages. If the form or page opens in a frameset, the window title will not display in a Web browser.

Setting the window title


Follow these steps to set the window title of a form or page.
Step 1 2 3 4 Action In the Object tab of the form or page, select window title. Enter a formula that results in a text value. Save the formula. Preview the page or form.

St uden t G ui de P age No . 136

271

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Creating a Window Title... (continued)

Continue the window title demo after discussing @IsNewDoc

Instructor Action Ask the participants how to write a formula to display some text plus the contents of the FirstName field if the document has been saved. Go back to the Demo Form in Designer and add the following formula: @If(@IsNewDoc;New Demo Document; Demo document for + FirstName)

Important Information This will reinforce what they learned in the previous lesson.

Point out that when the new document first opens it displays New Demo Document. You can enter a value in the First Name field then save, but do not close the document. Point out that the window title changed.

Note: use the formatting guidelines discussed in the last lesson whenever you enter a formula. Preview the form in Notes. Note: You dont actually need to specify a window title for a page unless you want to display something other than the page name. Unlike forms, pages do not display untitled.

272

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Creating a Window Title... (continued)

Using @IsNewDoc
The function @IsNewDoc is particularly useful when creating a window title. Window titles that incorporate a field from the document will not display the window tittle correctly when the document is new and there is no data yet. By combining @IsNewDoc and @If you can create a formula that displays one text phrase if the document is new, and another if the document is not new. The syntax for @IsNewDoc is simply:
@IsNewDoc

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.

Example of writing a formula using @If and @IsNewDoc


The following example illustrates how to combine @If and @IsNewDoc to create a meaningful window title:
@If(@IsNewDoc;"New Document";Subject)

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 field of the document.

St uden t G ui de P age No . 137

273

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Displaying Computed Values


Discuss useful @functions
Describe other simple @functions that are useful. Name a function and ask students to describe its functionality. Encourage the participants to use Designer Help.

Set the values of Computed for display fields


Show the students how to:

Use functions and fields as values in Computed for display fields. Identify when the formula executes. Use the Document properties box to verify that the document does not store the value.
Instructor Action Important Information This field should display the creation date of the document.

In the Instructor database, add a Computed for display field to the Demo form.

274

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Displaying Computed Values


Among the ways to compute values that display on a form, are:

Computed for display fields Computed text

Using Computed for display fields


Computed for display fields are recalculated every time a user opens or saves a document, or when the document is refreshed. The contents of a computed for display field are not stored in the document. The following table describes examples of using Computed for display fields.
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 field when the document is open
@Now @UserName @Created WorkType

Example

Computed for display fields require a formula. The formula must evaluate to a value suitable for storage in the field. For example, if the type of field is date-time, the formula must result in a date-time value.

St uden t G ui de P age No . 138

275

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Displaying Computed Values... (continued)

Add computed text to a page and form


Show participants how to:

Use functions and fields as values in computed text. Identify when the formula executes. Use the Document Properties box to verify that the document does not store the value.

Instructor Action Create a new page and name it Welcome Page. Add computed text to the top and format the text to be big and bold in order to make it stand out. Enter a formula that welcomes the current user to the application, for example: "Welcome to the class " + @Name([CN]; @UserName)

Important Information

276

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Displaying Computed Values... (continued)

Using computed text


Computed text is another element you can add to a form or page. It is similar to a Computed for display field, except that the result of the formula must be a text value. You can format computed text like other text elements using the Computed Text properties box. The following table describes examples of using computed text.
Use Computed Text to Display... Different text based on a condition Dynamic messages Example
@If ((DueDate < @Today) & (Status != Complete); This is late!; ) Welcome, + @Name([CN]; @UserName)

Adding computed text


Follow these steps to add computed text to a form.
Step 1 2 Action Open the form or page in Designer. Place the cursor where you want the result of the computed text to appear. Choose CreateComputed Text. The Computed Text properties box opens. The value property of the new computed text object is highlighted in the object list. Designer checks for formula syntax errors. The result of the formula in Step 4 will display according to the properties you set. The result of the formula displays in the form or view. Result The form appears in the Work pane and the Programmers pane opens.

Enter a formula that evaluates to a text value in the Script area of the Programmers pane. Set properties to format the text.

Preview the page or form.

St uden t G ui de P age No . 139

277

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Exercise: Create a Dynamic Title for the Policy Form


Introduce the exercise
Allow 10 minutes for this exercise.

278

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Exercise: Create a Dynamic Title for the Policy Form


Worldwide Corporation would like to customize the titles displayed to users when they open certain documents. The tasks below describe what you need to do.

Tasks

When a Policy document is opened, check to see if it is new or not. Display either the title of the Policy, or New Policy depending on the state of the document.

St uden t G ui de P age No . 140

279

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Storing Computed Values


Explain how to work with computed fields
Provide further information on, and examples of, when to choose which type of field to store information.

Set the value of a computed field


Demonstrate how to write formulas for Computed and Computed when composed fields to store values in documents. Preview the form and save the document. Open the document again and force the computed field to recalculate. In the Instructor database on the Flower form, do the following:

Modify the FlowerEnterer field so it has the following properties: Type: Computed when composed Value: @UserName Add another field with the following properties: Name: FlowerTotalPrice Type: Number, Computed Value: FlowerShipPrice + FlowerPrice Illustrate the behavior of both types of computed fields by creating and editing documents with the modified form.

280

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Storing Computed Values


To store values in a document, you must use one of the following types of fields:

Computed
Computed when composed
Editable

This section describes how to use these field types and set their values.

Working with computed fields


The following table describes Computed and Computed when composed fields.
Field Computed Calculates a Value... Each time users create, refresh, or save the document. Only the first time users save the document. Example The result of a calculation involving other fields, such as calculating a total The original author A value that never changes The date the document was created.

Computed when composed

Setting the value of a computed field


Follow these steps to add a formula to calculate the value of a computed field.
Step 1 2 3 4 5 Open the form in Designer. Select the field. Under the field in the Objects tab, select Value. Enter the formula to compute a value suitable for storage in the field. Test the formula by previewing the form. Action

St uden t G ui de P age No . 141

281

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Storing Computed Values... (continued)

Explain using formulas in editable fields

Explain how to specify a Default value


This is very similar to setting the value of a computed field.

282

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Storing Computed Values... (continued)

Using formulas in editable fields


Gather information from users through editable fields. To improve the usability of editable fields, you can use formulas to:

Compute a default value when users create documents. Translate or reformat the value when users save documents. Validate or verify the value when users save documents.

Specifying a Default value


Specify an initial value for an editable field in the Programmers pane. Add the formula to the fields Default value property. The formula executes only when users create documents.

St uden t G ui de P age No . 142

283

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Translating Field Values


Explain how to work with input translation formulas
Input translation formulas:

Run before saving to ensure consistent user input. Do not apply to rich text fields.

Discuss text formatting functions


Direct students to Designer Help for more information on these and other useful functions.

284

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Translating Field Values


You can automatically format data by specifying an input translation formula for editable fields. Using an input translation formula, you can format such things as:

Telephone numbers, by adding parentheses, hyphens, or periods Proper nouns, by capitalizing only the first letter

Working with input translation formulas


The input translation formula is triggered when the document is saved or refreshed. The input translation formula adjusts or re-formats the value. The result of an input translation formula must evaluate to the same type of value specified by the field. For example, if you are translating a text field, the formula must evaluate to a text value.

Text formatting functions


There are several @functions available for formatting text. The following table describes some of these functions.
Function @Trim @ProperCase @UpperCase @LowerCase Description Removes leading, trailing, and redundant spaces in a text string. Capitalizes the first 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.

St uden t G ui de P age No . 143

285

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Translating Field Values... (continued)

Write an input translation formula


Demonstrate how to write a simple input translation formula for a field. In the Instructor database on the Flower form, write an input translation formula for the FlowerShipTime field to round the users entry to the nearest whole number using @Round.

Introduce the Guided Practice


Instruct students to use Help for any @functions they dont know.

286

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Translating Field Values... (continued)

Writing an input translation formula


Follow these steps to write an input translation formula.
Step 1 2 3 4 5 Select the field. In the Objects tab of the Programmers pane, select the fields Input Translation event. Write the translation formula in the Script area. Save the form. Test the formula: Preview the form. Enter a value and refresh the document. Action

Interpret input translations formulas


Follow the steps below to complete the Guided Practice.
Step 1 2 3 4 Action Open the Practice database in the Notes client. Choose CreateTranslation Demo. Work through the translation formulas. Click Mark Now to see your results

St uden t G ui de P age No . 144

287

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Validating Field Values


Explain how to work with input validation formulas
Input validation formulas:
Run before saving and after input translation to ensure correct user input.
Do not apply to rich text fields.

Discuss using @Success and @Failure


Use Designer Help for more detailed information on these functions.

288

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Validating Field Values


You can stop users from saving documents with incorrect or incomplete values by specifying an input validation formula when designing editable fields.

Working with input validation formulas


When users save or refresh documents, the input validation formulas are triggered. The input validation formula is a conditional statement that:

Determines if the value is acceptable or not. 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 operation.

Note: The input validation formula runs after the input translation formula.

Using @Success and @Failure


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 field values.
If the Field Value Is... Acceptable Not acceptable Use this Function... @Success @Failure To... Continue saving the document Display a pop-up message box directing users to fix the problem. Abort saving the document.

St uden t G ui de P age No . 145

289

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Validating Field Values... (continued)

Provide examples of input validation formulas


Provide more examples of input validation formulas.

Write a field input validation formula


Demonstrate how to write a simple input validation formula for a field and preview it in Notes. In the Practice database, write an input validation formula to abort saving if users do not specify a value for the FlowerName field.

290

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Validating Field Values... (continued)

Examples of input validation formulas


The following code verifies that a new number entered by a user is within a specific range.
@If (NewNumber >= LowValue & NewNumber <= HighValue;
@Success;
@Failure (Please enter a value between + @Text(LowNumber)
+ and + @Text (HighNumber))

The following code verifies the field contains a value.


@If (Title != ;
@Success;
@Failure(Please enter a value.))

Writing a field input validation formula


Follow these steps to write a field input validation formula.
Step 1 2 3 4 5 Select the field. In the Objects tab under the field, 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. Action

St uden t G ui de P age No . 146

291

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Exercise: Automate Data Entry and Formatting


Introduce the exercise
Allow 30 minutes for this exercise.

Show the students what the final form looks like to give them an idea of what they need to accomplish. Discuss the knowledge and procedures required to complete the exercise. Verify that students used the appropriate computed field types and formulas.

Notes for the Instructor: The students are likely to place the effective date field above the policy created date field on the form. This means the effective date formula wont work. You can either warn them, or let them do it wrong to help make the point about order of evaluation more clear.

292

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Exercise: Automate Data Entry and Formatting


During this exercise you are going to automate data entry and formatting in the Policy form. Here is a list of the functionality that Worldwide would like to incorporate into the application:

The policy title should be formatted using proper case. Create a field 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.

Tasks

Implement the above specifications. Preview the form and test your formulas.

St uden t G ui de P age No . 147

293

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Working with Lists


Explain the value of working with lists and the usefulness of the list-related @functions

294

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Working with Lists


In Domino a list is defined as a named entity that contains multiple values of the same data type. The return value of some @functions is a list. Fields that allow multiple values contain lists. Constants and variables in formulas can contain a list. You can also present lists to a user using a prompt box. Multiple elements in a list are separated by a colon (:). For example, the following code defines a temporary variable and assigns a list of text elements to it:
cities := {New York} : {London} : {Paris} : {Boston};

Using @functions to manipulate lists


The following table contains @functions useful for working with lists.
@Function @Elements(list) Usage Returns the number of elements in a list Splits a string into a list of values using the specified separator. Converts a text list into a string using the specified separator Returns true if the value is a member of the list Returns the number of the element in the list Returns a portion of the list containing the number of elements specified by num. Removes duplicates from a list Example
@Elements(Colors)

Returns: the number of elements in the Colors field.


@Explode(Red Green Blue; )

@Explode(String; separator)

Returns: Red:Green:Blue @Implode(Red:


Green:Blue;*)

@Implode(list;separat or)

Returns: Red*Green*Blue
@IsMember(Orange;Red : Green: Blue)

@IsMember(value; list) @Member(value;list)

Returns: 0 (False)
@Member(I;A: E:I:O:U)

Returns: 3 @Subset(list;number)
@Subset({A}:{E}: {I}:{O}:{U};2)

Returns: {A}:{E}
@Unique({A}:{E}: {I}:{E})

@Unique(list)

Returns: {A}:{E}:{I}

St uden t G ui de P age No . 148

295

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Working with Lists...(continued)

Working with Lists exercise


Have the students open the ListsDemo form in the Notes Client. Allow them 10 minutes to work through the formulas. The form is set up with a Mark Now button that evaluates their answers.

296

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Working with Lists...(continued)

Evaluate list formulas


Perform the steps below to complete this exercise. Use Designer Help to help evaluate the formulas.
Step 1 2 3 4 5 Action Open the Practice database in Notes client Choose CreateLists Demo. Evaluate the list formulas. Enter the result in the appropriate field. When you have evaluated all of the formulas, Click Mark Now to see your results.

St uden t G ui de P age No . 149

297

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Computing the Choices in List Fields


Describe how to create dynamic lists
Review the different types of list fields and describe the concept of creating dynamic lists with formulas.

Explain how to compute the list of choices in a field

Describe how to use @DbColumn


Describe the function.


Refer students to Help for more information.

298

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Computing the Choices in List Fields


In Module B: Working with Design Elements, you learned about the different
types of fields, which include fields that offer a pre-defined list of choices to the
user. To define the list of choices, you can do either of the following:

Enter each choice.


Write a formula to calculate the choices.

Adding a formula to compute the list of choices in a field


Follow these steps to create a list of choices using a formula.
Step 1 2 3 4 5 Action In the properties box of the List field, 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.

Using values in a view as choices in a field


The @DbColumn function returns an entire column of values from a view. By writing a formula with @DbColumn to compute the choices of a field, you can avoid updating the list manually as data changes.

St uden t G ui de P age No . 150

299

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Computing the Choices in List Fields... (continued)

Use @DbColumn in a list field


Write an @DBColumn formula to compute a list of departments. The Instructor demo database contains a Departments view with departments listed in the first column.
Instructor Action Open the @DbColumn demo form. Make the Departments field an editable dialog list. On the Control tab, select Use formula for choices. Enter the following formula. Explain the code as you enter it. source := "Notes":""; location := "":""; view := "Departments"; colNumber := 1; @DbColumn(source; location; view; colNumber) The use of temporary variable in @DbColumn formulas is good practice and makes the code much easier to read. Important Information

300

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Computing the Choices in List Fields... (continued)

Working with @DbColumn


The syntax of @DbColumn is:
@DbColumn( class : mode ; server : database ; view ;
columnNumber )

The following table describes each parameter in the formula.


Argument
class : mode

Data Type Text list

Description
Indicates the type of database (class) you are

accessing and whether to cache the results.


For example, "":"", accesses a Domino

database and caches the results.


server : database

Text list

Specifies the location and file name of the

database For example,"":"", refers to the current database. Text Number


Specifies the name of the view. Specifies the column number within the view.

view columnNumber

Example of using @DbColumn


The example formula below is based on the following characteristics:

The view name is In Progress.


The view is located in the Tracking database on Server01.
The first 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)

St uden t G ui de P age No . 151

301

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Exercise: Compute a List of Choices for a Field


Introduce the exercise
Discuss the knowledge and procedures required to complete the exercise. Allow 30 minutes.

302

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Exercise: Compute a List of Choices for a Field


To make the policy application easier to maintain over time, create a view that contains the policy categories in the first 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 containing a field called Category. Create Category documents with the following categories: Office Guidelines Benefits Holidays Grievance Procedures Security Email 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 field.

Hint: The view should only display documents created with the Category form.

Tasks

Implement the above specifications. Preview the form and test your formulas.

St uden t G ui de P age No . 152

303

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Interfacing with the User


Discuss uses for @Prompt

304

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Interfacing with the User


What do you do when you need to prompt a user for information in your application? If youre working with the formula language you use the @Prompt function. @Prompt allows you to create a more interactive interface for Notes applications. The @Prompt function allows users to enter values, respond to questions or choose from a list of choices. There are many different styles of prompt boxes, and the prompt boxes can be triggered in different ways. @Prompt can be used in fields, hotspots (buttons), agents, and toolbar buttons.
@Prompt does not toggle the modified flag of the document. Therefore, if a forms uses only @Prompts to collect data and set fields, the user could close the document and not be prompted to save it. Caution

Syntax for @Prompt


The syntax for @Prompt is:
@Prompt( [style] : [ NOSORT ] ; title ; prompt ; defaultChoice ;
choiceList ; filetype )

The following table describes the parameters for @Prompt.


Argument style NOSORT title prompt defaultChoice choiceList filetype Data Type Keyword Keyword Text Text Text Text list Text Description Indicates the type of dialog box to display. Indicates whether to sort the list of choices or not. The title for the dialog box. The text your 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 files to display when using the LOCALBROWSE style

The following example shows a simple @Prompt formula:


@Prompt([OK];Prompt box;You did it! Click OK to close.)

St uden t G ui de P age No . 153

305

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Interfacing with the User...(continued)

Demonstrate different @Prompt formulas


Instructor Action In the Instructor database, open the Prompt Demo form in the Notes Client. Click each button to demonstrate each type of @Prompt. Discuss what you would use each type of @Prompt for. After stepping through the form in the Notes client, review the button formulas in Designer. Important Information This form resides in the Practice database as well. Have the students open it, too. Have the students follow along.

Demonstrate when form events are triggered


Instructor Action Use the Events form in the Instructor database to demonstrate when form events are triggered. Important Information This form exists in the Practice database as well if you want to have the students follow along.

306

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Interfacing with the User...(continued)

Triggering @Prompts
Prompt dialog boxes can be triggered in the following ways:
Trigger Field formulas Button formulas Form and View action buttons or manual agents Description Use @Prompt to prompt the user to enter a value in a field. @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 field based on what the user enters. In combination with @Password, @Prompt can be used to prompt for a password on a form.

Password field formulas

Using 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 fields, prompt users, or perform background processing. The following table lists most of the form events and when they evaluate.
Form Event QueryOpen PostOpen QueryModeChange PostModeChange PostRecalc QuerySave PostSave QueryClose 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. After the document has recalculated, usually after F9 Before the document is saved After the document is saved Before the form is closed.

St uden t G ui de P age No . 154

307

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Creating Reusable Code


Explain the benefits of writing reusable code.

Demonstrate the use and reusability of formulas created using @ThisValue and @ThisName
Instructor Action In the Instructor database, open the form named Portable Code and preview it in Notes. Try to enter an email address without first entering a Contact name. Click OK to close the error message. Enter a Contact name, then try to select an item without entering a phone number. Click OK to close the error message. Open the Portable Code form in Designer and show students the identical input formulas for each of the three fields (ContactName, ContactPhone and ContactEmail). Switch back to the Portable Code form in preview mode, and now that you have filled in the three contact fields, click the Get Prices action without first selecting an item in the Items field. Point out that the code in the Contact name, Phone number, and Email fields is exactly the same. Important Information

308

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Creating Reusable Code


The ability to create reusable code is possible in Formula language using @ThisValue, @ThisName.
This feature is new in Domino 6 and will not work on previous versions of the software. Caution

Accessing fields without hard-coding the field names


Creating reusable code means creating code that can be used in multiple places without changes to the code. Developers can save time by writing a formula once and reusing it in many different places. Using @This Value and @This Name has the following benefits:

You do not need to hard code field names. You can write code once that you can then cut and paste into multiple fields throughout an application. You do not need to manually revise code every time a field name changes.

Using @ThisValue and @ThisName


@ThisName and @ThisValue are especially useful for creating reusable input translation and validation formulas. The purpose of these @functions is described in the table below.
@Function @ThisValue @ThisName Purpose Returns the value of the current field. Returns the name of the current field.

For example, in an input validation formula for a listbox field 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)

St uden t G ui de P age No . 155

309

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

Exercise: Create Reusable Code


Present the review questions

What types of operations would you perform using formulas in a form? What types of fields display, but do not store, computed values on a document? What types of fields store computed values in a document? Why would you use an input translation formula? Why would you use field validation? Does it run before or after the input translation event? What are the two ways that you can build a list in a field? What @function lets you gather information from a user in a dialog box? Which @functions return the value and the name of the current field and what are the benefits of using them?

Introduce the exercise


Allow 20 minutes.

310

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 7 U sin g F orm ula Lang uage in For ms

Exercise: Create Reusable Code


To ensure that certain fields are populated on your Employee Information form, create reusable code that checks to see if a value is entered in the first name, last name, and salary fields.

Tasks

Create a reusable formula. Copy it into the appropriate fields. Save and test your form.

St uden t G ui de P age No . 156

311

Preview

Lesso n 7 U sin g Fo rmu la L angu age in F or ms

312

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

D
Enhancing Design Elements
Lesson 8 Enhancing Forms Lesson 9 Enhancing Views

C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Lesso n 8 E nhan cing For ms

Enhancing Forms

Introduce the lesson


This lesson covers a diverse set of topics which are all related to enhancing the appearance and functionality of forms.

314

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Enhancing Forms

Earlier in the course you created forms to collect and display information. In this lesson you will learn to use form design elements to increase the functionality and presentation of the forms in your Domino application.

Objectives
After completing this lesson you should be able to:
9 Use layers to control the display of information.
9 Create subforms.
9 Add a subform to a form.
9 Add a calculated subform to a form.
9 Create shared fields.
9 Add shared fields to a form.
9 Inherit data from one document to another.
9 Create response documents.

St uden t G ui de P age No . 158

315

Preview

Lesso n 8 E nhan cing For ms

Working with Layers


Introduce layers

316

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Layers


Layers are used to position overlapping blocks of content on a form, subform or page. Make note of the following when working with layers on forms and pages:

Layers on a form or subform can contain anything a form can contain. Layers on a page can contain anything a page can contain.

This lesson focuses on using layers on a form.

Benefits of working with layers


There are many benefits to working with layers. Benefits include:

Precise positioning to allow for complex layout options. Stacking layers provides great design control and flexibility. 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, type directly in the layer, or add graphics.

St uden t G ui de P age No . 159

317

Preview

Lesso n 8 E nhan cing For ms

Working with Layers...(continued)

Demonstrate creating layers


Create a layer on the Demo Form.


To make it more visible, type some text into the layer.
Show how a layer can be dragged anywhere on the form.

Show the layer anchor


Show the layer anchor that was created when the layer was created. Demonstrate that moving a layer does not move the anchor.

318

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Layers...(continued)

Creating a layer
Follow these steps to create a layer on a form.
Step 1 2 3 Action Open a form, page, or subform in 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. Click inside the layer and add the layers content. Save and preview the form.

4 5

The layer anchor


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 image shows a layer and its anchor.
Layer Anchor

Layer with selection handles

St uden t G ui de P age No . 160

319

Preview

Lesso n 8 E nhan cing For ms

Working with Layers...(continued)

Show the Layer Properties box


Note that the name of the layer is contained in the HTML tab.

320

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Layers...(continued)

Layer properties
After you create a layer, you can change the following properties:

Background color and image HTML properties Position

Layer background
The layers background color can be the system color, gray, transparent, black, or an RGB value. The following table lists the color icon choices in the Layer properties box.
Icon System color Function

Transparent

Black (0,0,0)

Red, Green, Blue (RGB)

St uden t G ui de P age No . 161

321

Preview

Lesso n 8 E nhan cing For ms

Working with Layers...(continued)

Add a background color


Create another layer on the Demo form. Change the name of the layer to BackgroundColor. Change the background color.

Add a background image


Add an image from the image resources to the layer with a background color. Demonstrate the various display options, center, tiled vertically, etc.

322

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Layers...(continued)

Layer background images


Layers can contain a background image in addition to, or instead of, a background color. The image used for the layer background must be a shared image resource. Images can be displayed once in the layer, or tiled horizontally, vertically, or continuously.

Modifying the background of a layer


Follow these steps to modify a layers background.
Step 1 2 3 4 5 Select the layer Select LayerLayer Properties to open the Layer properties box. Click the Background tab. To change the layers color click on the drop-down arrow to the right of Color. Choose one of the color options:
System Transparent Black RGB

Action

6 7 8

Click on the folder, to the right of Images, to insert an image resource. Select one of the image repeat values. Save and preview the form.

St uden t G ui de P age No . 162

323

Preview

Lesso n 8 E nhan cing For ms

Positioning Layers
Demonstrate resizing and repositioning a layer by dragging and dropping
Use the layers you have created on the Demo Form.

324

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Positioning Layers
A layer can be resized and repositioned several different ways:

It can be dragged and dropped. Its position can be set explicitly. It can be positioned in relationship to other layers on the form.

Layer position values


The position of a layer on the screen, its size, and the position of the layer in
relationship to other layers is displayed and/or modified in the Layer position tab of
the Layer properties box.
When you drag and drop a layer, or resize it using the layer window handles, the
Top, Left, Width, and Height parameters change to reflect the new position or size.
These values can also be changed to set the size and position of a layer explicitly.
The z-index parameter determines the order in which the layer appears if there
are multiple layers on the form, page, or subform. Think of the layers as stacked
one upon the other. If there were three layers, the lowest layer would have a z-
index of zero, the middle layer would have a z-index of one, and the top layer
would have a z-index of two. Other facts about the z-index parameter:

0 is the default.
1 appears above 0.
Multiple layers can have the same level.
Negative values are placed behind the parent element.

St uden t G ui de P age No . 163

325

Preview

Lesso n 8 E nhan cing For ms

Positioning Layers...(continued)

Demonstrate setting layer coordinates


Open the properties box for the background colored layer you created earlier. Set the Z-index to -1. Create a third layer with the system color and set its Z-Index to 1 to demonstrate the differences between a negative and positive Z index and zero. Dont worry if this third layer covers text, youre just using it to demonstrate
different layer properties.

Discuss the difference between the different coordinate value choices:

Pixels
Inches
EM units
A percentage of the distance from the parent element
Auto

Work with multiple layers


Demonstrate the multiple layer options listed on the student guide. Use the three layers you created earlier. Make sure to emphasize the flexibility and control this feature allows

326

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Positioning Layers...(continued)

Setting a layers coordinates


Follow these steps to modify the layers position properties.
Step 1 2 3 4 5 6 7 Select the layer. Choose Layer Layer Properties. Click the Positioning tab. Type in the appropriate coordinates to align the layer from the top or left edge of the parent element. Type in the appropriate coordinates to change the layers height and width. Type in the appropriate integer for the layers Z index. Save and preview the form. Action

Working with multiple layers


There are different ways to align multiple layers.
The following table lists the tools for aligning multiple layers.

To Select multiple layers Follow these steps


Select the first layer. Press CTRL and click the other layer(s).

Result: There will be selection handles around the selected layers.


Align multiple layers
Select the layers to align. Choose Layers Align. Select from the available options.

Adjust layer sizes.

Select the layers to adjust. Choose Layer

Make same size.

Select from the available options.

St uden t G ui de P age No . 164

327

Preview

Lesso n 8 E nhan cing For ms

Hiding Layers
Hide a layer using Hide/When

Select the layer anchor of one of the layers that you created in the earlier demos. Choose TextText Properties. Note: Clarify that the hiding of a layer in this case has to do with text properties, and that you can hide a layer dynamically like other text and fields. This is as opposed to using the Layer Tree to hide a layer. Click the Hide/When tab and select to hide the layer from Notes R4.6 or later and web browsers. Save and preview the form in both the Notes Client and a web browser.

Hide a layer using the Layer Tree


Note that hiding a layer using the Layer Tree is useful when developing a form with multiple layers.

328

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Hiding Layers
The layer tree
Like other design elements, layers can be hidden using Hide/When properties. For ease of development, however, Designer provides another method for hiding layers. The layer tree hides one or more layers for the current session. You can work on one layer without another layer, or layers, getting in the way. If a layer is hidden, a grey circle appears next to the name of the layer; otherwise, the circle is empty. The following image shows a layer tree properties box with three hidden layers:

Note: When a hidden layer is selected, the top button in the properties box toggles from Hide to Show.

Hiding a layer
Follow these steps to hide a layer:
Step 1 2 3 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. Action

St uden t G ui de P age No . 165

329

Preview

Lesso n 8 E nhan cing For ms

Work with Layers


Introduce the Guided Practice
In this Guided Practice, students will add a layer to the Employee Information form. Allow 10 minutes for this Guided Practice.

330

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Work with Layers


Create a layer, add content and a background
In this Guided Practice you will add a layer with a background image for visual appeal. You will copy the form fields and labels into the layer. Follow these steps to complete the Guided Practice.
Step 1 2 Action Open the Employee Information form. Place the cursor below the other content on the form. Select Create Layer. Drag the layer handles so that the layer is approximately as large as the area of the field labels and fields on the form. Highlight the fields and the label text. Press CTRL-X to cut the fields. Place the cursor inside the layer. Press CTRL-V to copy the fields into the layer. Resize and reposition the layer by dragging it so that it is under the form title. Choose LayerLayer Properties. Click the Background tab. Click the folder icon next to the Source dialog. Select lesson_menu_background.gif. Click OK. Select Repeat horizontally in the Repeat dialog. Select the HTML tab. Enter Image_and_Fields in the ID field. Save and preview the form. The background image appears in the layer. The fields appear inside the layer. Result The form appears in the Work pane. A blank layer is added to the form.

The layer, along with its fields and text are repositioned. The layer properties box appears.

7 8 9

10 11 12 13

The background image fills the layer.

St uden t G ui de P age No . 166

331

Preview

Lesso n 8 E nhan cing For ms

Working with Subforms


Introduce subforms

332

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Subforms


A subform is a collection of form elements stored as a separate design element. Subforms can be used in multiple forms in a database. A subform can contain anything a form can contain.

Benefits of subforms
The benefits of using subforms in your application include:

Saving design time Ensuring design consistency

A form can contain one or more subforms. One subform can be used in many different forms within the same database or across different databases. Subforms can also be used conditionally depending on the results of a formula. The following graphic shows one subform being used in multiple forms:

St uden t G ui de P age No . 167

333

Preview

Lesso n 8 E nhan cing For ms

Working with Subforms...(continued)

Describe when to use subforms


Present the examples listed on the Student Guide and ask the students for more ideas of when to use subforms.

Discuss how subforms work


Subforms can only be used as part of a form. Changes that are made to the subform affect all other forms that use the subform.

334

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Subforms...(continued)

When to use subforms


Examples of when to use a subform include:

To add a formatted logo or letterhead


To ensure consistency and standards in form design
To start building new forms quickly

How subforms work


Subforms can only be used as part of a form. Every time a document is created or opened the form references the subform. Elements of a subform automatically become part of the form when displaying documents. Changes made to a subform affect all forms and documents that include the subform.

Creating a subform
Creating and using a subform in a database is a two-part process:

First, create the subform.


Second, include the subform as part of a form.

St uden t G ui de P age No . 168

335

Preview

Lesso n 8 E nhan cing For ms

Working with Subforms...(continued)

Discuss the subform properties box


Discuss the difference between the two display options:

Include in Insert Subform dialog Include in New Form dialog

Also mention the do not add field na,es to index option and its purpose.

Create a subform

Create a subform to be used as an address footer, for example:


123 Culpepper Drive
Mahoopney, IA 55623

Name the subform subAddress. Leave the text on two lines, left justified.

336

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Subforms...(continued)

Creating a subform
Follow these steps to create a subform.
Step 1 2 3 4 5 Open the database in Designer. Choose Shared Code in the Design list. Select Subform from the Shared Code list. Click New Subform in the Work pane. Result: A new blank subform opens in the Work pane. Choose Design Subform Properties to open the properties box Action

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.

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. Specify display options for the subform.

St uden t G ui de P age No . 169

337

Preview

Lesso n 8 E nhan cing For ms

Working with Subforms...(continued)

Add a subform to a form


Add the subAddress form to the bottom of the Demo form. To illustrate one of the advantages of subforms, do the following:

Point out that the address is currently on two lines and left justified.
Go back to the subAddress subform.
Change the text to be all on one line and centered.
Reopen the Demo form and show that the address format has changed.

338

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Subforms...(continued)

Including a subform in a form


Follow these steps to insert a subform in a form.
Step 1 2 3 Open a form in Designer. In the Work pane, click where the subform will appear. Choose Create ResourceInsert Subform. Action

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 specified place in the form.

Computed subforms
You can have different 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.

St uden t G ui de P age No . 170

339

Preview

Lesso n 8 E nhan cing For ms

Working with Subforms...(continued)

Discuss computed subforms

340

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Subforms...(continued)

Checklist: Computed subforms


Complete the following tasks to implement computed subforms:
Step 1 2 3 4 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). Action

Creating a computed subform formula


You could use the following formula to include different subform headings in the same form, depending on whether a user is posing a question, replying to a question or adding a comment.
@If(MsgType=question;"QuestionSub"; MsgType="reply";
"ReplySub"; "CommentSub")

The value in the MsgType field determines which subform is used.

St uden t G ui de P age No . 171

341

Preview

Lesso n 8 E nhan cing For ms

Working with Subforms...(continued)

Add a computed subform


Use the subNewDoc and subSavedDoc subforms. Use the following formula to compute which subForm appears on the Demo form:
@If(@IsNewDoc;"subNewDoc";"subSavedDoc");

342

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Subforms...(continued)

Including computed subforms in forms


Follow these steps to include a computed subform in a form.
Step 1 2 3 4 5 6 7 Open the form. Click where you want to add the subform. Choose Create ResourceInsert Subform. Select Insert Subform based on formula. Click OK. Enter a formula in the Programmer's pane that determines which subform to display. Save the form. Action

St uden t G ui de P age No . 172

343

Preview

Lesso n 8 E nhan cing For ms

Working with Shared Fields


Introduce shared fields

Create a shared field


Create a shared keyword field that has the following characteristics:

Name: Creator Type: Names, Computed Formula: @Username

344

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Shared Fields


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

Benefits of shared fields


The benefits of using shared fields include:

Maintaining consistent formulas throughout an application Providing single point maintenance for a given field Standardizing keyword lists

Creating a shared field


Follow these steps to create a shared field.
Step 1 2 3 4 5 6 Action Expand Shared Code in the Design pane. Click Fields. Click New Shared Field. Enter a name for the shared field. Assign a field type and choose Editable or a computed option, if applicable. Close the Properties box. Close and save the shared field.

St uden t G ui de P age No . 173

345

Preview

Lesso n 8 E nhan cing For ms

Working with Shared Fields...(continued)

Insert a shared field

Convert a single field to a shared field


Convert any single field to a shared field.

346

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Working with Shared Fields...(continued)

Inserting shared fields


Follow these steps to insert a shared field onto a form or subform.
Step 1 2 Action

Open a form or subform and position the cursor where you want the field to appear. Choose CreateInsert Shared Field. Result: The Insert Shared Field dialog box appears. Select the shared field you want to use and click OK. To select a shared field from another database, click the Database pull-down list, highlight a database, select a shared field in that database, and click OK.

Converting single to shared fields


Follow these steps to convert a single-use field to a shared field
Step 1 2 3 Action

Open the form. Click the field to be shared. Choose DesignShare This Field.

St uden t G ui de P age No . 174

347

Preview

Lesso n 8 E nhan cing For ms

Inheriting Information
Introduce inheritance
Inheritance is introduced before response documents so that the students do not get the mistaken idea that inheritance is dependent upon a parent/child document relationship.

348

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Inheriting Information
Designer allows you to create fields that inherit values from other fields. The source fields and target fields can be in separate documents or in the same document. Therefore, data can be entered or assigned once and reused as needed in multiple places. For example, when an employee is first hired there are many forms that need to be completed that include the employees name, address, employee number, job title, etc. Using inheritance this information need only be entered once. Domino provides for this sharing of information by providing a method for inheriting information from one document to another.

Benefits of inheritance
The ability to inherit information automatically from one document to another has a number of benefits, including:

It is more efficient than typing the same information multiple times. It helps preserve the accuracy of the information contained in each document.

St uden t G ui de P age No . 175

349

Preview

Lesso n 8 E nhan cing For ms

Inheriting Information...(continued)

How it works
Make the point that inheritance is not dependent upon a parent/child or main/ response relationship between the documents.

350

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Inheriting Information...(continued)

How inheritance works


Fields can inherit values from fields in other documents in the same database or from fields on the same document. The following diagram illustrates how one source document contains field data that can be inherited by multiple receiving documents.

St uden t G ui de P age No . 176

351

Preview

Lesso n 8 E nhan cing For ms

Inheriting Information...(continued)

Demonstrate how inheritance works


Instructor Action From the Notes client, open the Demo\Views view. To demonstrate how inheritance works, highlight a document in the view, and select Create The first and last name fields are populated. Point out that this is a simple example of how a form can inherit data from an existing document. Important Information

Demo\InheritedFields

Note that inheritance is a one-time occurrence. The data in the documents are not linked based on the fact that one value was inherited from another document.

Demonstrate how to enable inheritance on a form


Instructor Action Important Information

Open the Demo\InheritedFields form in Designer. Open the Form properties box and show the Defaults tab. Open the properties box for the InheritFName field. Show the formula for the field in the Programmers pane.
Point out the On Create options dealing with inheritance. Point out that is a Computed when Composed field. In this case the field is text to match the field it is inheriting from. Note that the formula is simply the name of the field being inherited.

352

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Inheriting Information...(continued)

Enabling inheritance
Forms can be designed to inherit information from an existing document. Fields can receive information from fields in other documents, or fields in the same 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. Create field(s) containing the following characteristics: Computed when composed field type Includes a formula that specifies the source field

Enabling inheritance on a form


Follow these steps to enable inheritance for a form.
Step 1 2 3 4 5 6 Action Create a form or open an existing form in 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 field(s) that will inherit information. Write a formula for the inheriting field(s) that evaluates to the source field name. Save the form. To test your work, highlight an existing document that contains the field(s) to inherit, then create a document with the new or revised form.

Tip: Fields that inherit information do not need the same field name as their source fields; they do, however, need to be the same data type.

St uden t G ui de P age No . 177

353

Preview

Lesso n 8 E nhan cing For ms

Inheriting Information...(continued)

Introduce the Guided Practice


Students will create a new form and use it to inherit information from the Employee Information documents. Allow 15 minutes for this Guided Practice. Note: This is a two-part Guided Practice.

354

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Inheriting Information...(continued)

Enable a form to use inheritance


In this Guided Practice you will create an Employee Benefits form that inherits an employees first and last name from documents created in the Working with Forms lesson. Follow these steps to enable a form to inherit information from an existing document.
Step 1 Action Create a form and name it Employee Benefits with an alias of eb. Choose Design Form Properties. Click the Defaults tab. Select On Create: Formulas inherit values from selected document. Close the properties box. Create a field with the following characteristics: Name: InheritFName Type: Text, Computed when Composed In the Programmers pane for the InheritFName field: Type the formula: FirstName Create a field with the following characteristics: Field name: InheritLName Type: Text, Computed when Composed Formula: LastName Result The form appears in the work pane.

2 3

The Defaults tab of the Form Properties box appears. The property is set and the Form properties box closes.

The InheritFName field is created.

The FirstName field is added as a formula. The InheritLName field is created.

(continued on next page...)

St uden t G ui de P age No . 178

355

Preview

Lesso n 8 E nhan cing For ms

Inheriting Information...(continued)

Introduce this portion of the Guided Practice


Allow the students 5-10 minutes with this Guided Practice.

356

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Inheriting Information...(continued)

Enable a form to use inheritance, continued


Follow these steps to enable a form to inherit information from an existing document.
Step 7 8 Action Create a rich text field named Comments. Save your changes. You will test the form in the next Guided Practice. Create an Employee Benefits view in order to see the new documents you will create. Result

Create documents that inherit information


Follow these steps to create a document that inherits information
Step 1 Action In the Notes client, open the Employees view. Select one of the employee documents that you created in Working with Forms. Choose Create. Select Employee Benefits. Save the new document. A new Employee Benefits form opens with the appropriate fields populated from the selected document. Result

St uden t G ui de P age No . 179

357

Preview

Lesso n 8 E nhan cing For ms

Creating Related Forms


Introduce the topic
Give several everyday examples of a response hierarchy--email, threaded discussions in a newsgroup, a message board, etc. Have students talk about how and why these types of documents need to be related, what benefit is there to having them set in a hierarchical fashion?

358

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Creating Related Forms


In almost every application there is a need to create information that is related to other information. A typical example of this is a question and answer structure. Another very familiar example is a discussion forum.

Form types
Domino provides for this type of main/response structure, sometimes referred to as a response hierarchy, by letting the developer designate a forms type. The following table lists the three Domino form types and how they are used.
Form Type Document Description This document type is the default for 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. Creates response documents associated with a main document. Response documents are sometimes referred to as response or child documents. Creates response documents associated with either a main document or a response document.

Response

Response-to-response

St uden t G ui de P age No . 180

359

Preview

Lesso n 8 E nhan cing For ms

Creating Related Forms...(continued)

Explain the response hierarchy diagram


As you talk about the diagram keep in mind that you are talking about the relationship of the documents to each other. The students will learn about showing response documents in a view in the next lesson.

360

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Creating Related Forms...(continued)

The response hierarchy


The following diagram illustrates the relationship between main documents, response documents and response to response documents.

St uden t G ui de P age No . 181

361

Preview

Lesso n 8 E nhan cing For ms

Creating Related Forms...(continued)

Show the form response type property


Open the Demo Form and show the form type property. Discuss the differences between the Response type and Response to Response. Include an example of where you might use each response type. For example,

Imagine a company which makes and sells a product. Document - Details of the product (the product specification). Response - An order for the product (You can't order something we don't sell!) Response to Response - Customer comments based on either the product ("Why don't you make them in blue?" "Why don't you sell them in boxes of 100?") or orders which have been placed ("Arrived two days late!" "Great service! Thank you!")

362

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Creating a Related Forms...(continued)

Designating a form as a response


By default the Domino form type is set as Document. To designate that a form is a response or a response to a response, change the Form Type property. The following image shows the Form Type property.

Creating a response form


Follow these steps to create a response form.
Step 1 2 3 Action Create a form or open an existing form in Domino Designer. Choose Design Form 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 Save the form.

St uden t G ui de P age No . 182

363

Preview

Lesso n 8 E nhan cing For ms

Creating Related Forms...(continued)

Explain how the relationship between main and response documents is established

Discuss how inheritance is used with related documents


Again make the point that there does not need to be a main/response document relationship for inheritance to work.

Explain the different ways to inherit the contents of a main document to a response

Create a response form


Create a new form. For the sake of clarity, name it Response to Demo. Have it inherit a couple of fields from Demo documents. Open a Demo document and create a Response to Demo. Do this several times as you will use these documents when you demonstrate creating a hierarchical view.

364

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Creating Related Forms...(continued)

Establishing the relationship between documents


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.

Inheritance and related documents


Inheritance is frequently used to transfer information between main and response documents. For instance, in a discussion application you would typically repeat the subject of the main document in the response. As with document to document inheritance, the main document must be selected or open when a response is created for inheritance to work correctly.

Making a thread easier to follow


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 Domino form properties, the developer can design the response form to:

Create a link to the main document in a rich text field. Copy the contents of the main document as collapsible rich text. Copy the contents of the main document into a rich text field.

Linking to the main document takes up much less disk space and is generally the preferred method.

St uden t G ui de P age No . 183

365

Preview

Lesso n 8 E nhan cing For ms

Creating Related Forms...(continued)

Introduce the Guided Practice


Students will add a link from the Employee Benefits form to the Employee Information form. Allow 5 minutes for this Guided Practice.

366

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Creating Related Forms...(continued)

Add a link to a main document


In this Guided Practice you will make the Employee Benefits form a response form and include a link to the parent document.
Step 1 2 Action Open the Employee Benefits form in Domino Designer. Create a field with the following characteristics: Name: ParentDoc Field type: Rich Text Choose DesignForm Properties. Click the Defaults tab. Select On Create: Inherit entire selected document into rich text field. Result The form appears in the Work pane. The new field is created.

3 4

The Form properties box opens. You will see the following choices:

Select the ParentDoc field from the drop down list. Select Link. On the Form Info tab, select Response as the form type. Save the form. To test your changes, select a document in the Employees view and create an Employee Benefits document. Note that there is now a link to the parent document.

The form properties are set.

6 7 8

St uden t G ui de P age No . 184

367

Preview

Lesso n 8 E nhan cing For ms

Exercise: Create Question and Answer Forms in the Policies Database


Present the review questions

What are layers and what are the benefits of using them? What is a subform, what the benefits of using one. When would you use a subform? What is a shared field? What are the benefits of using a shared field? What is inheritance and how does it work? What does the developer need to do to allow one document to inherit a value from another document? How do you create related forms? How does the user establish a main document/response document relationship when creating a response document? Is inheritance dependent upon a relationship between documents? What things can you do to make a discussion thread easier to follow?

Introduce the exercise


In this exercise the students will create the Question and Answer forms. In the next lesson they will create a view to display Question and Answer documents correctly. Show the students what the finished forms might look like so they get some ideas. Suggest that they read the entire exercise before they begin. Allow 30 - 45 minutes for this exercise. Note: This exercises spans two student guide pages.

368

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Exercise: Create Question and Answer Forms in the Policies Database


The Worldwide Corporation wants to make it easier for employees to ask questions and receive answers about company policies. In this exercise 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 exercise has the following parts:

Use a layer and the mod_menu_background.gif file to enhance the look of the forms. Create a subForm that can be used to provide a consistent header to both forms. Design and create the Question form. Design and create the Answer form.

In the next lesson you will create a view to display the question and answer documents correctly.

Guidelines for the Question form


The Question form needs to gather certain information. The table below describes the information to be gathered and lists suggested field names and types.
Information to be gathered The users first name The users last name The category that the question falls into. The categories are: Office Guidelines Benefits Holidays Grievance Procedure Hint: Is there a shared field that you might use? The subject of the question. The question. The date the question was created. Subject, Text. Question, Rich text QuestionDate, Date-time Suggested Field Name and Type FName, Text LName, Text Category, Dialog List with the following choices

St uden t G ui de P age No . 185

369

Preview

Lesso n 8 E nhan cing For ms

Exercise: Create Question and Answer Forms in the Policies Database...(continued)

370

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 8 En hanci ng For ms

Exercise: Create Question and Answer Forms in the Policies Database...(continued)

Guidelines for the Answer form


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 field names and types.
Information to be gathered The subject of the question The date the answer was created A link to the question The answer The date the answer was created. Suggested Field Name and Type QuestionSubject, Text AnswerDate, Date-Time QuestionLink, Rich text Answer, Rich text AnswerDate

Create several questions and associated answers.

Challenge
Use tables to create a more pleasing, balanced look and feel for the fields and field labels. Apply any subForm you create in this exercise to the Policy form as well.

St uden t G ui de P age No . 186

371

Preview

Lesso n 9 E nhan cing Vi ew s

Enhancing Views

Introduce the lesson

372

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 9 E nha ncin g V iew s

Enhancing Views

This lesson includes more tools for creating more efficient, easier to read views.

Objectives
After completing this lesson you should be able to:
9 Write a view selection formula. 9 Concatenate values in a view column. 9 Display response documents in a view.

St uden t G ui de P age No . 187

373

Preview

Lesso n 9 E nhan cing Vi ew s

Writing View Selection Formulas


Explain how to include specific documents in a view
The conditions that students created with Search Builder in Module B served as a document selection shortcut. View selection formulas give the developer tighter control, and work more efficiently. The diagram on the student page was used in Module B. It is used again here for illustration purposes.

374

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 10 E nha ncin g V iew s

Writing View Selection Formulas


Views can include all documents in a database or a subset of those documents. The selection condition, whether it is created with Search Builder or a View Selection Formula, controls the document displayed. All documents that match the selection criteria are displayed in the view. In Working with Views, you used simple conditions to select which documents to display in a view. View selection formulas, however, provide more control over which documents a view displays.

Including documents in a view


The following graphic illustrates the view selection process.

St uden t G ui de P age No . 188

375

Preview

Lesso n 10 E nha ncin g V iew s

Writing View Selection Formulas... (continued)

Describe the parts of a view selection formula


Condition formula SELECT keyword

Provide other examples of view selection formulas

Show an example of a view selection formula


Open the Date Hired view to show a view with a selection formula. Show where the formula is entered in the Programmers pane.

376

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 10 E nha ncin g V iew s

Writing View Selection Formulas... (continued)

The view selection formula


When a view is first created the default selection formula is SELECT@All. Using this formula, all documents in the database are included in the view. In Working with Views, the Simple Search selection builder was used to create more specific views. However, using the SELECT statement allows greater control of the selection of documents. The view selection formula syntax is as follows:
SELECT Condition formula;

The following table describes the parts of a view selection formula.


Part SELECT keyword Condition formula Function Includes a document based on the result of the comparison formula. A formula that evaluates to either True (1) or False (0). It can use constants, fields, operators, and @Functions.

Examples of view selection formulas


The following table describes a few examples of view selection formulas.
This View Selection Formula...
SELECT @All

Includes All Documents That... Are in the database. This is the default formula for view selection. Were created using a form with the name or alias ei. Contain a field called Price whose value is less than 1000 and a field called Instock whose value is Yes. Were created using the form named ei and contain a field named Department whose value is not equal to Accounting.

SELECT Form = ei

Select (Price < 1000) & (InStock = Yes) SELECT Form = ei & Department != Accounting

St uden t G ui de P age No . 189

377

Preview

Lesso n 10 E nha ncin g V iew s

Writing View Selection Formulas...(continued)

Introduce the Guided Practice


The Guided Practice asks students to build a view based on the Employee Info view they created earlier. The new view includes only employees whose salaries are greater than $30,000. Allow 10 minutes for this Guided Practice.

378

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 10 E nha ncin g V iew s

Writing View Selection Formulas...(continued)

Write a view selection formula


In this Guided Practice you will create a view selection formula that selects documents of employees whose salaries are over $30,000. Follow these steps to complete the Guided Practice.
Step 1 Action Open the Practice.nsf database. Click Views in the Design Elements list. Create a view based on the Employee Info view. Name the view Salaries. Open the view. Select View Selection in the Objects pane. In the Programmers pane, select Formula in the Run dropdown list. Delete the selection formula. Enter the following formula:
SELECT Form="ei" & Salary>30000

Result A list of views appears in the Work pane. The view is created and appears in the Design list. The view appears in the Work pane.

3 4 5 6

SELECT @All appears in the Programmers pane. The new formula is created.

Save the view. Preview your work in the Notes Client.

St uden t G ui de P age No . 190

379

Preview

Lesso n 10 E nha ncin g V iew s

Concatenating Values in a View Column


Explain how to display multiple values in a single view column
To display multiple values in a view column, you must:

Use conversion functions to make the values the same data type. Concatenate the values with operators or functions.

Demonstrate converting values to text


Open the Date Hired view.


Select the Date Hired column.
Choose Formula in the Programmers pane and type the following formula:

@Text(DateHired; S0D2);

Explain what S0D2 does to the value. Refresh the view.

380

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 10 E nha ncin g V iew s

Concatenating Values in a View Column


Concatenating text values, or strings, is useful when you want to combine related fields in a single column or when the field value requires supporting text to make sense to users. The + sign is used to concatenate text into a single string. For example, the following view column formula displays the first name and last name with a space between them in a single column.
FirstName + + LastName

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. Concatenate the text values.

Converting values to text


To combine different types of values, you must first make sure that the values are the same data type. For example, to display number and text values in a view column, convert the number to text, then concatenate the text values. Use @Text to convert number and date-time values to text. @Text offers options to control the format of the resulting text. The syntax for @Text is as follows:
@Text( value ; "format-string" );

Where:

Value can be a number, time-date, 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.

St uden t G ui de P age No . 191

381

Preview

Lesso n 10 E nha ncin g V iew s

Concatenating Values in a View Column...(continued)

Using @Text
Have the students open Designer Help for @Text and look at the Examples. This has a more complete listing of the @Text format-string components.

Demo how to concatenate multiple values in a view column

382

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 10 E nha ncin g V iew s

Concatenating Values in a View Column...(continued)

Using @Text
There are two types of format string components available for text values: date-
time components and numeric value components. These components can be
combined in various ways. Listed here are several of the more commonly used
string components and what they display:
D0 - year, month, day
D2 - month and day
S1 - Time only
C - Current
The following table provides some examples of converting values to text.

Original value The Sales field contains the value 800. The Date field contains 12/31/99 11:59:59 PM. The Date field contains 12/31/99 11:59:59 PM.

Formula
@Text(Sales; "C,2")

Result $800.00 12/31 11:59:59 PM.

@Text(Date; "S0D2")

@Text(Date; "S1T0")

Creating a formula that concatenates multiple values in a view column


Follow these steps to enter a column formula that concatenates multiple values.
Step 1 2 Action 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 (+).

Save and preview the view.

St uden t G ui de P age No . 192

383

Preview

Lesso n 10 E nha ncin g V iew s

Concatenating Values in a View Column...(continued)

Introduce the Guided Practice

384

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 10 E nha ncin g V iew s

Concatenating Values in a View Column... (continued)

Concatenating text and number values


In this Guided Practice you will create a view that quickly shows a list of employees and their date of hire. Follow these steps to complete the Guided Practice.
Step 1 2 3 4 Action Create a view in the Practice database called Date of Hire. Select the default column. Delete the column header. In the Script area for the column, click the Formula button. Replace the default formula with: FirstName+ + LastName " was hired on + @Text(DateHired; "S0D1"); Sort the column in ascending order. In the Selection Formula object, enter the following formula:
SELECT Form=ei

Result The view appears in the Work pane. The default column header is deleted.

Employees first names and hire date will appear. If the employee was hired this year, only the day and month will display.

5 6

The view will only display documents created with the Employee Information form.

Save and preview the view.

St uden t G ui de P age No . 193

385

Preview

Lesso n 10 E nha ncin g V iew s

Creating a Hierarchical View


Present the process of creating a hierarchical view
Open the Hierarchical View Demo Page contained in the Instructor database. The page contains a table that you can use to present the process of creating a hierarchical view. Notes for the Instructor: Make sure you study this page before presenting the information to the students. There is explanatory text in the cells of the table that you need to be very familiar with prior to doing this in the classroom.

386

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 10 E nha ncin g V iew s

Creating a Hierarchical view


In Enhancing Forms you created Question and Answer forms. Unless you design a view to display this document hierarchy, the documents are not easy to find and their relationship is not necessarily apparent. A hierarchical view is a view that displays main documents and their associated response documents, and visually distinguishes between them. Each main document has its response documents indented under it. Displaying response documents beneath main documents helps to view the progression of a discussion. Each level is indented three spaces under its parent document.

Displaying documents in a hierarchy


Follow these steps to display main documents and response documents in a hierarchy.
Step 1 2 3 4 5 6 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 form. Action

St uden t G ui de P age No . 194

387

Preview

Lesso n 10 E nha ncin g V iew s

Displaying Response Data in the View


Displaying response data
Create a simple view that displays documents and response documents. Base the view on the Demo and Response to Demo documents. Note: Do not create the responses only column yet. You will do that on the next page.

388

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 10 E nha ncin g V iew s

Displaying Response Data in the view


View columns are structured to display data from fields in the main document. The view displays little, if any, data from response documents. If the response form happens to contain fields with the same names as those specified in the column formulas, that data will appear in the view. Otherwise, the rows representing responses show no meaningful data. To specify information to be displayed about each response document, use a responses-only column.

Using a responses only column


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.

St uden t G ui de P age No . 195

389

Preview

Lesso n 10 E nha ncin g V iew s

Displaying Response Data in the View...(continued)

Demonstrate creating a responses only column


Add the responses only column to the view you just created. Add a formula to the responses only column to display some data from the response documents.

390

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 10 E nha ncin g V iew s

Displaying Response Data in the View...(continued)

Selecting multiple forms to display in a view


To this point the views you have worked with display data using only one form. When using more than one form in a view, the view selection formula must be written to select both of them. The following code is an example of a view formula that uses two forms, Main and Response:
SELECT (Form = "Main") | (Form = "Response)

The code could also be written as:


SELECT Form = "Main" | @AllDescendants

Creating a responses only column


Follow these steps to add a responses-only column to a view.
Step 1 2 3 Open the view in 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. 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 Notes. Action

4 5 6

Example of a formula used in a responses only column


Typically a responses only column contains information from several fields. The following example formula concatenates two fields and adds static text. Notice that the Date field has been changed to text.
Subject + " - " + @Text(Date)

St uden t G ui de P age No . 196

391

Preview

Lesso n 10 E nha ncin g V iew s

Exercise: Display the Question and Answer Documents in a View


Introduce the exercise
In preparation for this exercise, do the following:

On the white board, draw a form that represents the Question form. Include the fields. Do the same for the Answer form. Ask the students how they would set up the view: What would the selection formula be? What data would they show from the Question documents? What data would they show from the Answer documents? How would the data in the view be presented? (sorted? categorized?)

Allow 30 minutes for the following exercise.

392

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Lesso n 10 E nha ncin g V iew s

Exercise: Display the Question and Answer Documents in a View


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 exercise you will create a hierarchical view that displays the question and answer documents. Note: Make sure you do this work in your Policies database.

Tasks

Create a view that displays the subject field of the question document, and the date the question was created. Show the subject of the answer document, along with the date the answer was created, in a single column. Display the questions by category.

St uden t G ui de P age No . 197

393

Preview

Lesso n 10 E nha ncin g V iew s

394

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

E
Automating Tasks
Lesson 10 Using Actions to Automate Tasks Lesson 11 Using an Agent to Update Documents

C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

10

Using Actions to Automate Tasks

Introduce the lesson


Automation can be activated by users or by the application itself. This module concentrates on user-activated automation using:

Actions Agents

396

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

10

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Using Actions to Automate Tasks

Actions make it possible for you to set up user-activated shortcuts in forms and views to perform routine tasks. You make the action available in the actions menu or as a button in the action bar. In this lesson, you will learn how to use actions to automate common user tasks.

Objectives
After completing this lesson, you should be able to:
9 Create form and view actions.
9 Create shared actions.
9 Format how actions are displayed.
9 Create sub-actions.
9 Create action hotspots.

St uden t G ui de P age No . 200

397

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Defining Actions
Provide examples of using actions

Create an Edit Info action


Open the Demo form in Designer.


Create an Edit Info form action.
Open one of the documents created with the Demo form.
Click the Edit Info button.

398

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Defining Actions
An action is a program associated with either a view or form and used to automate tasks for users. Actions are added to applications in order to:

Speed up repetitive tasks. Update information. Simplify the usage of the database. Perform complex calculations. Check for errors.

Examples of actions
You can use an action to:

Recreate Notes menu commands as buttons. For example: Create a document Edit a document Save a document Mail the current document. Move user selected documents in a view. Calculate complex formulas that dont need to be saved with individual documents.

Checklist: Designing actions


Before creating an action, you should consider the following checklist:
Task 1 2 3 4 5 Procedure Define the purpose of the action. Define the most appropriate programming language for the action. Define where the action appears. Define when the action appears. Define the actions formatting.

St uden t G ui de P age No . 201

399

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Defining Actions...(continued)

Describe how to program actions


Briefly list the Action coding options from the Student Guide.

Explain where actions appear to users


The Action bar is discussed in more detail at the end of this lesson.

Explain when actions appear to users


Open the Edit Info Action Properties box and select the Hide/When tab. Show that the options selected so that the Action does not appear when the document is in Edit mode, but does appear when the document is in Read mode.

400

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Defining Actions...(continued)

Programming options available in actions


Like other design elements, you can program actions using one of the following options:

Simple actions Formulas LotusScript JavaScript

Note: Simple actions cant be customized and are not supported in Web applications.

Where actions appear to users


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. Users access actions either from:

The Notes actions menu command An action bar button

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.

When actions appear to users


You can conditionally restrict the availability of an action using the actions Hide/ When properties. These are the same Hide/When properties available to other design elements. Use these properties to make an action visible when it is relevant. For example:

Hide an action that edits a document when the document is in Edit mode. Hide an action that saves a document when the document is in Read mode.

St uden t G ui de P age No . 202

401

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Working with Actions


Describe the Action pane
Show students two ways to manually open the action pane:

By sliding it open.
By using the menu option. ViewAction pane.

402

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Working with Actions


Once you have designed your action, you can create it on the appropriate form or view.

The Action pane


The Action pane displays the actions available to a particular form or view. You can select an action from the action pane in order to open, edit or delete the action. The following graphic shows the Action pane for a form.

Action pane

St uden t G ui de P age No . 203

403

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Working with Actions...(continued)

Describe the Action Properties box


Describe the difference between the action name and label.


Describe the display options.
Describe the icon options.

404

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Working with Actions...(continued)

The Action Properties box


Like other Designer features, actions are modified using its properties box. The following graphic shows the Action Properties box.
Action Hide/ When

Basics Tab

Where action appears

Choose icon style and location

St uden t G ui de P age No . 204

405

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Working with Actions...(continued)

Introduce the Guided Practice


Allow 5 minutes for this Guided Practice.

406

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Working with Actions...(continued)

Create an edit action


In this Guided Practice you will create a button on the Employee Information form that will allow users to edit documents. Follow these steps to complete the Guided Practice:
Step 1 2 3 4 Action Open the Employee Information form in Designer. Choose CreateActionAction from the menu. In the Action Properties box, name the action Edit Employee Info. Select the following display options:
Type: Button Include action in Action Bar Include action in Action menu

5 6 7

Ensure that Client and Formula are the defaults in the Programmers Pane. In the Script area of the Programmers pane enter the formula:
@Command([EditDocument])

Save the form and test the action on an existing document.

St uden t G ui de P age No . 205

407

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Working with Actions...(continued)

Explain system actions in Notes


You cant change the "System actions" functionality, but you can customize their appearance in the action bar.

408

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Working with Actions...(continued)

System actions
By default, new forms and views do not contain actions. Designer provides a set of pre-defined system actions for common tasks. System actions can be added to a form or view. The following is a list of Domino system actions:

Categorize Edit Document Send Document Forward Move to Folder Remove from Folder

System actions can not be modified; individual actions can be removed if they arent needed. System actions do not translate to Web applications. You can create your own actions to perform the same functions using the Formula language instead.

St uden t G ui de P age No . 206

409

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Working with Actions...(continued)

Demonstrate inserting system actions


Add system actions to any existing form or view.

Show references for @commands


Instructor Action Show students that they can open Designer Help or use the Reference tab to get more information on @Commands. Important Point @Command ([Compose]) may not be intuitive to the students. Explain that compose is a historical term from the early days of Lotus.

Note: If the users notes.ini file includes the following statement, the @Command formula will not execute:
NoExternalApps=1

410

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Working with Actions...(continued)

Inserting system actions


Follow these steps to insert system actions onto a form or view.
Step 1 2 Open the form or view in Designer. Choose CreateActionInsert System Actions. Result: The system actions are added to the Action pane. Save the form or view. Action

Formula language commands that simulate Notes menu commands


@Commands are special functions that simulate the functionality of Notes menu commands. For example, use @Command ([Compose]) to create a button that creates a new document based on a specific form. The syntax for using @commands is:
@Command([command];parameters);

St uden t G ui de P age No . 207

411

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Working with Actions...(continued)

Discuss order of evaluation for @commands


The order of formula evaluation was discussed in Module C. However, there are several @commands that are an exception to the general rule. Direct students to help if they want the specific @command functions that are evaluated as encountered or after all @functions are executed. For example, the following is an abbreviated list of @command functions that are evaluated as encountered or immediately.
Evaluated after all @functions EditClear EditProfile FileCloseWindow FileExit ViewChange Clear EditProfileDocument CloseWindow ExitNotes SwitchView Evaluated immediately

412

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Working with Actions...(continued)

Commonly used @commands


The following table contains examples of commonly used @commands.
@Command Compose Function Creates a new document with the specified form. Saves the current document. Closes the current window. Opens the currently selected document for editing. Example
@Command ([Compose]; Response)

FileSave FileCloseWindow EditDocument

@Command ([FileSave])

@Command ([FileCloseWindow])

@Command ([EditDocument])

Caution

To Web-enable all action buttons in a database as well as certain @commands, select the database property "Web access: Use JavaScript when generating pages." Without this property set, Domino recognizes only the first button in a document and treats it by default as a Submit button that closes and saves the document.

Order of evaluation for @commands


Domino evaluates formulas from top to bottom and left to right, completing each statement before proceeding to the next. @Commands are evaluated in one of two ways: as encountered or after all @functions. In most cases the @command runs in the order specified in the formula.

St uden t G ui de P age No . 208

413

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Shared Actions
Review the concept of shared resources

Display and review the types of shared code in the Design pane. Review the benefits of using shared resources.

Create a shared action


Instructor Action In the Instructor database, demonstrate how to create a shared action that creates a new document. Create a shared action that creates a new Demo document. Important Information Describe the similarity between creating a shared action and creating an action in a form or view. Also note that this action is available to all forms and views in the database.

In the next demo you will insert this action.

Explain how to set shared action properties


Properties cannot be changed when you insert the action in a view or form. However, the position of the action can be changed. Changes must be made to the shared action under shared code/actions, not in the view or form where it was inserted.

414

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Shared Actions
Shared actions are actions that you create as resources for the entire database. Once you create a shared action you can insert it in multiple views and forms. If you need to modify the action, the modification will take effect in every form or view that refers to it.

Creating a shared action


Follow these steps to create a shared action.
Step 1 2 3 4 5 Open the database in Designer. In the Design pane, click Shared Code. Then, click Actions. Click New Shared Action. Result: The Shared Action Properties box opens. Create the shared action as you would any action. Save the shared action. Action

Setting shared action properties


A shared action has the same properties as a standard action. You set the properties when you create the shared action. These properties determine how the action will behave in every form or view that uses it. The only property you can change on each form or view is the actions position on the action bar.

St uden t G ui de P age No . 209

415

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Shared Actions...(continued)

Insert a shared action on a form or view


In the Instructor database, insert the shared action in the:

Demo view Demo form (hide when editing)

416

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Shared Actions... (continued)

Inserting a shared action on a form or view


Follow these steps to insert a shared action on a form or view.
Step 1 2 Action In 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 Select the shared action you want to insert. Click Insert. Click Done. Result: The shared action is inserted into the action pane. Preview the form or view, and test the action.

3 4 5

St uden t G ui de P age No . 210

417

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Controlling How Actions Display


Demonstrate adding sub actions to a form or view
Instructor Action In the instructor database create subactions on the Demo form. Show results in the Notes client Important Information For example, group a FileCloseWindow action and a FileSave action together under a single action heading, such as, Document Options.

Use these actions to demonstrate action bar properties and the action bar applet in the following sections.

418

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Controlling How Actions Display


There are a couple of ways to enhance the display of actions. This section examines how to:

Create actions with sub actions. Customize the action button bar.

Sub actions
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

Adding sub actions to a form or view


Follow these steps to add subactions to a form or view.
Step 1 2 Action 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. Type a name for the sub action. Program the sub action. Save and preview the form or view. To add more subactions, select the placeholder then choose CreateAction.

3 4 5 6

St uden t G ui de P age No . 211

419

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Controlling How Actions Display...(continued)

Demonstrate rearranging the order of form or view actions


Open a form or view with actions.


Rearrange the actions by dragging and dropping them.

Demonstrate hiding action buttons

420

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Controlling How Actions Display...(continued)

Rearranging action order


Actions and sub actions appear in the order they were created. You can rearrange this order in a more logical sequence. Follow these steps to rearrange the order of actions and subactions.
Step 1 2 3 4 5 Action Open the form or view with actions in 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.

Hiding action buttons


Like other form or view elements, actions and action buttons can be hidden under certain conditions. Follow these steps to hide an action or action button.
Step 1 2 3 4 5 6 Open the form or view. Select the action. Choose Design Action Properties. Click the Action Hide When tab. Select the appropriate options. Save and preview the form or view. Action

St uden t G ui de P age No . 212

421

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Controlling How Actions Display...(continued)

Emphasize the following points regarding action bars


When users scroll the form or view, the action bar remains at the top of the screen. Domino provides an applet that displays a fully functioning action bar to Web users. The action bar applet is not completely functional on web. Some formatting is lost.

422

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Controlling How Actions Display...(continued)

Customizing the action bar


The action bar displays action buttons at the top of a form or view. 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 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.

St uden t G ui de P age No . 213

423

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Controlling How Actions Display...(continued)

Change the action bar


In the Instructor database:

Demonstrate how to change the size and colors of the action bar on the Demo form. Show results in Notes.

Note: You will continue to modify the action bar in the next demo (Enable the action bar applet demo).

Transition to action bar applets


The action bar in the Web browser does not look as good as it does in Notes. Choose the Using Java Applet option.

424

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Controlling How Actions Display...(continued)

Changing action bar properties


Follow these steps to enhance the look of an action bar.
Step 1 2 3 Action Open the form or view in Designer. Select any action in the Action pane. Choose DesignAction Bar Properties from the menu. Result: The Action Bar Properties box opens. In the Action Bar Info tab:
Select the button bar alignment. Select to display the button bar for Web users.

5 6

In the Action Bar Size tab:


Select the button bar size.

In the Action Bar Background tab: Select the button bas background color. Select the button bar background image and how it is displayed. In the Action Bar Borders tab: Select the button bar border style and effect. In the Button Properties tab:
Select button size. Select button display options. Select button background color or image.

7 8

The changes affect all buttons on the action bar. 9 10 In the Button Font tab: Select the font properties for all buttons on the Action bar. Close the Action Bar Properties box.

St uden t G ui de P age No . 214

425

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Controlling How Actions Display...(continued)

Enable the action bar applet


In the Instructor database:

Demonstrate the Display Using Java Applet for the action bar on the Demo form. Show the results on the Web.

426

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Controlling How Actions Display...(continued)

Using the action bar applet


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 Notes client. Supports cascading actions. When the user clicks the main action, the action selections appear as a second row of slightly smaller buttons.

Enabling the action bar applet


Follow these steps to enable the action bar as an applet.
Step 1 2 3 Action Open the Action Bar Properties box. In the Basics tab, select Using Java Applet under Web Access Display. Close the Action Bar Properties box.

St uden t G ui de P age No . 215

427

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Action Hotspots
Introduce action hotspots . In addition to action hotspots the other hotspot types are:

Link Text pop-up Button Formula pop-up

Demonstrate creating an action hotspot


Instructor Action Open the Demo form in the instructor database. Select an existing image or create a new one. Create an action hotspot with the following formula:
@Prompt([Ok];"OK";"This action is done with Formula language")

Important Information

You must click and drag to select the image, if you just select it you will not be able to create an action hotspot.

Create a second action hotspot using the following JavaScript code: window.alert("This action is done with JavaScript!");

Create a new document using the Demo form. Click the action hotspot(s) you just created.

428

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Action Hotspots
Action hotspots are programmable areas on a form, subform or page that can complete an automated task. Hotspots can be associated with:

Text Graphics

Creating an action hotspot


Follow these steps to create an action hotspot.
Step 1 2 3 Open a form, subform or page. Click and drag to select the text or image to be associated with a hotspot. Choose Create Hotspot Action Hotspot. Result: An Action Hotspot Properties box appears. In the run area of the Programmers pane select either Web or Client from the drop down list. Select a programming language from the code drop down list. Type the code in the Programmers pane. Save and preview the form, subform or page. Action

4 5 6 7

St uden t G ui de P age No . 216

429

Preview

Lesso n 10 U sin g A cti ons to Au toma te T asks

Exercise: Adding Automation to the Policies Application


Present the review questions

How would you use actions and where? What programmatic feature can you use in an action to simulate some Notes menu options? When would you use sub-actions?

Introduce the exercise


Allow 20 to 30 minutes for this exercise. The exercise has students creating shared action buttons to create new documents, save and edit existing documents. The following table describes the actions and their implementation:

Action Create Policy Edit Policy Create Question Edit Question Create Answer Edit Answer Policies View

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.

430

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 10 U sing A ctio ns t o A ut omat e Ta sks

Exercise: Adding Automation to the Policies Application


Worldwide Corporation would like to automate creating and editing documents in the Policies 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.

Tasks

Make a list of actions you need to create and where they are to be used. Determine which of them could be shared. Create the actions and add to the appropriate views and forms. Hide the actions at the appropriate times. For instance, if a document is in edit mode there is no reason for the Edit action to be available.

St uden t G ui de P age No . 217

431

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

11

Using an Agent to Update Documents

Introduce the lesson

432

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

11

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Using an Agent to Update Documents

Agents are programs that perform a series of automated tasks. 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, fields, and databases. In this lesson, you will create an agent that updates existing documents.

Objectives
After completing this lesson, you should be able to:
9 Define an agent and describe its benefits.
9 Create an agent that modifies data in existing documents.

St uden t G ui de P age No . 218

433

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Defining Agents
Explain the following:

The benefits of using agents The differences between actions and agents.

434

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Defining Agents
Agents are programs within a Domino application. The benefits of using agents include:

Agents can run manually by users or automatically in the background as scheduled agents. Agents are not associated with a specific design element. Agents can be run on a specific server, on several servers, on workstations, or the Web. Agents can call other agents. Agents can consist of simple actions, formulas, LotusScript, or Java programs. Agents can be distributed easily because they can be replicated. Agents can be shared or private.

Actions versus Agents


Agents are different from actions in that:

Form and view actions work only when the form or view is open. Agents are not restricted to a specific form or view. Use agents to set up useractivated tasks or background tasks in any part of a Domino application.

St uden t G ui de P age No . 219

435

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Defining Agents...(continued)

Explain when to use agents


Use agents for complicated automated tasks and for automated tasks that are database-wide and domain-wide. Examples of shared and private agents:

Shared agent: An agent to archive or delete all documents in a database on a regular scheduled basis. Private agent: An agent used by one person to mark documents in a view as read, move them to a folder, mark them as "approved"

436

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Defining Agents...(continued)

Examples of agents
Use agents to:

Update a group of documents. Archive documents. Send messages and documents. Run other agents.

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.

St uden t G ui de P age No . 220

437

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Defining Agents...(continued)

Describe the parts of an agent


Click the New Agent button to open a new blank agent. Point out the parts of the screen as shown in the Student Guide.

438

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Defining Agents...(continued)

Parts of an agent
The following table describes the parts of an agent.
Part Trigger Target Program Function Specifies when the agent program should run. Selects which documents the agent program acts upon. Specifies the code to execute.

Use options in the Agent Properties box to run a program:


Manually or automatically
Against all documents or a subset of documents in a database

The Agent Work pane


The following graphic shows the Agent Work pane:

Object pane

Programmers pane

Agent Properties box

St uden t G ui de P age No . 221

439

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Defining Agents...(continued)

Describe the options in the Basics tab

440

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Defining Agents...(continued)

The Agent Basics tab


In addition to naming an agent and determining its trigger and target, the Basics tab of the Agent Properties box has a few more options. The following table lists these options and their function.
Option Store search in search bar menu Store highlights in document Run in background client thread Function Displays the search query in the search bar. 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 benefit of this feature, the database should reside on a server and the agent must be invoked via the client.

St uden t G ui de P age No . 222

441

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Designing an Agent
Run the Agent Demo

Look at the document properties of a document in the Demo form documents view. Note that there is no AgentField in the document. Run the Agent Demo agent. The agent runs on all documents in a view. After running the agent, open the document properties of a document in the view. Show the new field in the Document Properties box.

Discuss the programming languages that can be used to create agents.


This course focuses on building agents with formulas.

442

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Designing an Agent
Before creating an agent, consider the following:

When the agent runs. Which documents the agent processes. What program the agent runs.

Checklist: Designing an agent


Before creating an agent you should consider the following checklist.
Task 1 2 3 4 Procedure Decide what the agent is to accomplish. Decide when it should run. Define what documents it should run against. Decide where the agent is going to run.

Programming languages used to create agents


Agents can run any of the following types of programs:

Simple functions Formula LotusScript Java

You can program an agent to do almost anything in an application.

Common formula agent tasks


Two common tasks in formula agents are to:

Refine which documents the agent processes. Update fields in documents.

St uden t G ui de P age No . 223

443

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Designing and Agent...(continued)

Describe the Agent Properties box

444

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Designing an Agent...(continued)

The Agent Properties box


The following graphic shows the Agent Properties box.
Basics tab

Trigger

Trigger options

Target options

St uden t G ui de P age No . 224

445

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Designing an Agent...(continued)

Show the SELECT statement in the Agent Demo agent


Compare this to the view selection formulas seen earlier in the course.

Show the formula in the Agent Demo agent


Explain that this type of agent can be very useful as you design and test an application.

446

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Designing an Agent...(continued)

Refining which documents to process


Formula-based agents run iteratively on the target documents. The number of documents that an agent processes directly affects the time it takes to execute the agents formula. To limit the target documents, use the SELECT statement. The syntax for using SELECT is:
SELECT logicalValue

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, Domino Designer appends the following formula to your code:
SELECT @All

Generally a SELECT statement must be the first statement in a formula. SELECT


@All is the only one that can be placed at the end of a formula.

Updating fields in documents


Agents can add new fields to existing documents or modify existing fields. 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 field. The syntax for using FIELD is:
FIELD fieldname := value

The following example changes the LastName field value to Sunshine:


FIELD LastName := Sunshine

Note: If the LastName field does not exist in the document, it is added along with the value Sunshine. The field does not become visible unless you add it to the form design, but you can access it by naming it in formulas.

St uden t G ui de P age No . 225

447

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Designing an Agent...(continued)

Explain when and where the agent runs


Where the agent is in a client-server application influences when the agent runs. Agents can be run manually or automatically, based on a schedule.

Manual agents run on the local Notes client. Scheduled agents can run locally or on a server.

Creating agents to run from a server poses deployment issues involving security and performance. Security will be handled in the next module, Module F. The focus of this lesson is creating an agent.

448

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Designing an Agent...(continued)

When the agent runs


Once you have decided what the agent is to do, you need to determine how you want it activated. The following table describes design options for when the agent runs.
Agents Can Run... Manually When triggered by an event According to a schedule Example By the user via the Actions menu in the Notes client If documents have been created or modified Every day at 1:00 AM

Agent events
The following table describes the events that can trigger an agent and examples of when to use them.
Event Before new mail arrives After new mail arrives When to use it. Before mail is deposited in the mail database; 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 database and need to be modified as they are being pasted; for example, to add the current date to the document.

After documents are created or modified When documents are pasted

St uden t G ui de P age No . 226

449

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Designing an Agent...(continued)

Demonstrate creating a scheduled agent


Modify the Agent Demo agent to run at 10:00 pm.

Explain which documents the agent processes


This is similar to a view selection formula.

450

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Designing an Agent...(continued)

Scheduled events
The following table lists when agents can be scheduled to run.
Schedule More than once a day Use for Critical tasks that are updated constantly. Note that a servers performance can be adversely affected. Important tasks that arent as high priority as critical tasks; for example, sending a company wide email. 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 which are disabled or called by other agents.

Daily

Weekly Monthly Never

Which documents the agent processes


Options for which documents the agent processes depend on when the agent runs. The following table shows examples of which documents different agents can process.
An Agent that Runs... Manually from the Actions menu When triggered by an event According to a schedule Can Process...
Documents that users select All documents in a view Only new and modified documents All documents in the database New documents and documents modified

since the last run of the agent.

St uden t G ui de P age No . 227

451

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Creating an Agent
Naming the agent
Discuss the best practices for naming agents.

452

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Creating an Agent
Create the agent after you have defined what your agent should do as well as when and where it should run.

Agent names
Agent names within the same database need to be unique. However, if the same
agent is used in several different databases use the same agent name to help
users recognize the agents purpose.
Agent names:

Are case-sensitive.
May include letters, numbers, spaces and punctuation.
Should be self-descriptive.
Should be short if appearing as an Action menu option.

The names you give to manually-run agents appear as options in 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.

St uden t G ui de P age No . 228

453

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Creating an Agent...(continued)

Create an agent
In the Practice database, demonstrate how to build an agent with the following
options:

Shared
Act on documents created using the Demo Form.
Add a dateModified field with the current date as its value.

454

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Creating an Agent...(continued)

Creating an agent
Follow these steps to create an agent.
Step 1 2 3 4 5 6 7 8 9 10 11 12 Open the database in 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 drop down list. Select the appropriate documents for the agent to target from the target option drop down list. Close the Agent Properties box. Select the appropriate programming type from the drop list. Type the programs code into the Programmers pane. Save and test the agent. Action

St uden t G ui de P age No . 229

455

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

Exercise: Update Existing Documents


Present the review questions

When would you use an agent rather than an action? What do you use to reduce the number of documents an agent has to process? What are the rules and guidelines you use when naming an agent?

Introduce the exercise


This exercise gives the students more practice writing the Formula language. You may need to lead the students through working out the formula. The formula is listed here for your convenience.
REM {Select the rightmost 6digits of the number};
REM {and make it text.};
Temp := @Right(@Text(@DocumentUniqueID);6);
REM {Set the PolicyNo field to "PN" plus Temp};
FIELD PolicyNo := "PN" + Temp;
SELECT @All

456

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Le sson 11 Us ing an A gen t t o U pd ate Doc ument s

Exercise: Update Existing Documents


So far you have either left the policy number blank on Policy documents, or made one up. In this exercise you will write an agent that computes a policy number for all existing policies. The policy number should be formatted as PN999999 where the characters PN are the first two characters in the policy number, and 999999 is calculated based on the right-most six characters of the documents unique ID.

Tasks

Write a formula that computes the policy number and saves the new policy number in the PolicyNo field. The agent should run on all existing policy documents. Run the agent and check the results.

Hint: Look up the @DocumentUniqueID. Challenge: Modify the Policy form so that it computes a new policy number when a new Policy document is created.

St uden t G ui de P age No . 230

457

Preview

Lesso n 11 U sin g an A gent to U pdat e D ocum ents

458

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

F
Working with Security
Lesson 12 Defining Access to a Database Lesson 13 Accessing Elements within a Database

C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

12

Defining Access to a Database

Introduce the lesson


The Access Control List (ACL) defines which users can perform what tasks in a Domino application. This lesson describes access control levels, options, user types, and user roles.

460

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

12

L esson 12 D efin ing Ac cess t o a D atab ase

Defining Access to a Database

Domino offers database security at several levels. This module focuses on security to a database and within a database.

Objectives
After completing this lesson, you should be able to:
9 Describe how access control levels restrict access to a database. 9 Describe how access options refine the access control levels. 9 Describe how user types provide additional security to the access control

levels. 9 Set the access restrictions for a database.

St uden t G ui de P age No . 232

461

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

Database Security
Discuss the information on the student page
Discuss each of the levels depicted in the diagram.
Layer in the Diagram Network Authentication Description 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 specific database. This refers to anything from read access lists to controlling who can see a particular design element based on who they are. This refers to Readers and Authors fields. This refers to encryption. Note that the field on the form is where encryption is enabled. It is actually the data stored in the document that is encrypted.

Domino Server Security Database Access (ACL)

Design Element Security

Document Security Field Security

Note: Typically the system administrator deals with the first three levels, so do not go into any detail about these. The database developer/manager deals with the last four layers of security.

462

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 12 D efin ing Ac cess t o a D atab ase

Database Security
Until this point, the focus of your database design has been on building an application that meets the needs of the users. Now that the process is near completion, database security becomes more critical. This includes securing the database from unauthorized entry as well as restricting user access within the database. Dominos layered security model provides many ways to customize security to the database and its content.

Dominos layered security model


Dominos layered security model provides increasing refinements to the security of the network, the Domino server, applications, and elements within each application. This model is depicted in the following diagram:

St uden t G ui de P age No . 233

463

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

Working with Access Control Levels


Explain server access control
Typically, the Domino database manager, along with the Domino system administrator, determine which servers will be included in the ACL. Therefore, this lesson does not intend to cover access levels for servers beyond mentioning that they also must be included in the ACLs.

464

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 12 D efin ing Ac cess t o a D atab ase

Working with Access Control Levels


Access restriction begins at the network level. Once a user has been authenticated at this level, the next restriction is at the server level. Typically, network administrators and system administrators configure and maintain these two levels. Once a network and server admits a user, that user encounters access restrictions or controls at the database level. Typically, Domino database managers configure and maintain this level using Access Control Lists (ACLs).

Access Control Lists


Every database includes an Access Control List. Manager access is required to modify the ACL. Managers of a Domino database add users (individually or in groups) to the ACL and assign them a certain access level that entitles them to work within the application. When users attempt to open a database, Domino refers to the Access Control List to determine their privileges within the database.

St uden t G ui de P age No . 234

465

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

Working with Access Control Levels...(continued)

Describe the types of access control levels


Open the Instructor database ACL as a visual aid as you walk through the table on the Student Guide.

466

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 12 D efin ing Ac cess t o a D atab ase

Working with Access Control Levels...(continued)

Types of access control levels


The following table lists each access control level and the privileges it gives to a user.
Access Control Level No Access Depositor Reader Author Editor Designer Privileges No access to the database 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 specified in the document itself. Editors can create, read, and edit all documents unless there are restrictions on specific documents. Designers can perform the same functions as an Editor, except where restrictions exist on specific documents. Designers also can modify the database design, but cannot delete the database or change its ACLs. Managers can perform all functions, including creating and modifying the ACLs and deleting the database.

Manager

St uden t G ui de P age No . 235

467

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

Working with Access Control Levels...(continued)

Describe the Access Control List box

468

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 12 D efin ing Ac cess t o a D atab ase

Working with Access Control Levels...(continued)

The Access Control List box


The following graphic shows the Access Control List box.

Content Pane

Name List

Select access options

Roles List

St uden t G ui de P age No . 236

469

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

Working with Access Control Levels...(continued)

Explain how to identify users in the Access Control List

Show the groups and users in the Domino Directory


Briefly show students the groups and users that exist in the Domino Directory.

Discuss Anonymous access and Notes users


Domino servers can be set to accept Anonymous users accessing databases via Notes clients.

470

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 12 D efin ing Ac cess t o a D atab ase

Working with Access Control Levels...(continued)

Identifying users in the Access Control List


Domino identifies users listed in the Domino Directory. The Domino Directory is like a phone book of all the users and servers in the Domino environment. System administrators set up user names and groups of users that developers can use when defining access to applications. The Access Control List defines access rights for users in four ways. The following table describes the purpose of each option.
Option/Description Default Groups Defines Access for... Any user who is not specifically listed in the ACL (individually or in a group).
A list of people who can all access the same

functionality in the database If a user is a member of two groups, and both groups appear in the ACL, the user receives the higher access level. Individual names
A specific Notes or Web user This will override settings for any group to which the

individual belongs. Anonymous


Any unauthenticated Notes or Web user. If there is no Anonymous entry in the Access

Control List, unauthenticated users will use the Default access level.

St uden t G ui de P age No . 237

471

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

Working with Access Control Levels...(continued)

Describe user access levels


Describe the user access levels from the student guide and from your own experience.

472

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 12 D efin ing Ac cess t o a D atab ase

Working with Access Control Levels...(continued)

Setting user access levels


The following are some examples of setting user access levels:
In order to... Set...

Prevent unknown users from accessing the database 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 database design

Default to No Access. Anonymous to the Reader access. Students to Designer access. Anonymous to Author access.

St uden t G ui de P age No . 238

473

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

Working with Access Control Levels...(continued)

Display a databases ACL


Demonstrate how to display an ACL and use it to restrict access.

In the Instructor database on the server, modify the ACL so that the Students group has Depositor access. Ask each student to create and save a document using the Demo form. Have them use their own name (or their class user name) so they can recognize the their own documents. Ask them to try to read the document they just saved. They cant open the document. Change the students ACL access from Depositor to Author. While the ACL dialog box is open, take the opportunity to ask students about their own access levels and the default access levels. Ask students to create, save, and read another document.

474

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 12 D efin ing Ac cess t o a D atab ase

Working with Access Control Levels...(continued)

Displaying a databases ACL


Any user with access to a database is able to see its ACL. Follow these steps to display the ACL of a database.
Step 1 2 Action Select or open the database in either the Notes Client or Domino Designer. Choose FileDatabaseAccess Control from the menu. Result: The Access Control List dialog box appears.

The Access Control List dialog box


There are four panels in the Access Control List dialog box. The following table lists each panel and its function.
This Panel... Basics Roles Log ...Is Where the Domino Database 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

St uden t G ui de P age No . 239

475

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

Refining Access Control Levels


Describe the different types of access options
Note that when Authors are given the option to delete documents, they can only delete documents that they created. To identify the author of a document requires an Authors field type.

Show the effect of changing an access option


Using the Instructor database:

Ask students to try deleting one of the documents they created in the previous demonstration. Select the Delete Documents option for the Student group. Ask students to try deleting the document again.

476

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 12 D efin ing Ac cess t o a D atab ase

Refining Access Control Levels


Each access level has up to eight options that Domino database managers can turn on or off, further refining users privileges. For example, you can control whether users with Editor access can delete documents.

Types of access options


The following table describes the default and optional access privileges and which levels they are associated with.
Access Level No Access Depositor Reader Automatic privileges
None

Optional privileges
Read public documents Write public documents

Create documents

Read public documents Write public documents

Read public documents

Create private agents Create personal folders/views Create Lotus-

Script/Java agents
Write public documents

(continued on next page...)

St uden t G ui de P age No . 240

477

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

Refining Access Control Levels...(continued)

Continue describing the different types of access options


Do not spend time going over every single access option. It will be too confusing for the students. The entire list is here for clarity and reference.

478

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 12 D efin ing Ac cess t o a D atab ase

Refining Access Control Levels...(continued)

Types of access options


The following table continues listing the default and optional access privileges.
Access Level Author Automatic privileges
Read public documents

Optional privileges
Create documents Delete documents Create private agents Create personal folders/views Create LotusScript/Java agents Write public documents

Editor

Create documents Read public documents Write public documents

Delete documents Create private agents Create personal folders/views Create shared folders/views Create LotusScript/Java agents

Designer

Create documents Create private agents Create personal folders/views Create shared folders/views Read public documents Write public documents

Delete documents Create LotusScript/Java agents

Manager

Create documents Create private agents Create personal folders/views Create shared folders/views Create LotusScript/Java

Delete documents

agents
Read public documents Write public documents

Enable the read and write public documents options to give users with No Access or Depositor access limited access to specific forms, views, and documents.

St uden t G ui de P age No . 2416

479

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

Providing Additional Restrictions with User Types


Discuss other ways to prevent access
Referring to the scenario on the student page, ask students what other ways they could use to prevent Chris Jones from accessing the database.

Show where the Domino database manager applies user types


Show students where the database manager applies user types.

Discuss unspecified users


Depending on how much time you have, and the needs of the students, tell students that selecting Unspecified Users in the advanced panel attempts to lookup user types from the directory based on the name. The database manager selects this option.

480

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 12 D efin ing Ac cess t o a D atab ase

Providing Additional Restrictions with User Types


User types specify whether a name in the ACL is a person, server, or group. They can protect your database from the following scenario.

Chris Jones opens the ACL to the Policies and Procedures database 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 database 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.

Types of user types


The following table lists each user type, to whom it can be assigned, and what it does.
User Type Person Assigned to... An individual user, including individuals on a server workstation A single server, including a server console and server workstation A group of servers A group of individual users A group of servers and individual users Any user, group, or server Description Enforces access as a single user.

Server

Prevents someone from accessing the database from a Domino workstation using the server ID. Identifies a group of servers that will host replicas of the database. 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 Domino look up the user type in the Address Book.

Server Group Person Group

Mixed Group Unspecified

The database manager applies user types to meet the access restrictions.

St uden t G ui de P age No . 242

481

Preview

Lesso n 12 D ef inin g A ccess to a D at abase

Exercise: Set Access Restrictions to the Database


Introduce the exercise
Lead the students in a discussion about who will need to access the database and how much access these users need to have. Modify the ACL of the Instructor copy of the Policies and Procedures database. The results of this exercise will be used in the next lesson and exercise. Students will copy this file and use it for the next few exercises. Allow 10 to 20 minutes for this group exercise.
User/Group Default Anonymous Employees Policy Makers Department Head Managers Designer Depositor No Access Author Editor Author Manager Designer Access Control Level

Optional: If time allows, discuss the different privileges that students would or would not grant the user groups. For example, would Employees be allowed to create documents?

Suggested questions
The following questions can be used to help students design their ACLs.

What type of access should regular employees have?


How will the database handle non-recognized users?
Who will control the database?
Who can edit documents?
Who can create and edit documents?

482

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 12 D efin ing Ac cess t o a D atab ase

Exercise: Set Access Restrictions to the Database


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 exercise you will determine the access control levels required for set the appropriate users.

Tasks

Working with the instructor and the rest of the class, plan the ACL

Use the following table as a starting point to plan the access restrictions.
User/Group Default Anonymous Employees Policy Makers Department Head Managers Designer Access Control Level

St uden t G ui de P age No . 243

483

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

13

Accessing Elements within a Database

Introduce the lesson

Notes to the instructor


In this lesson the students will COPY their databases to the server in order to properly test security functionality. This sets up for showing the difference between copying and replicating. Replication is covered in the next module.

484

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

13

L esson 13 A ccessi ng E leme nts with in a D atab ase

Accessing Elements within a Database

After users open a database, security measures can limit access to data and design elements such as documents, forms and views.

Objectives
After completing this lesson you should be able to:
9 Describe User Roles
9 Control access to various elements using User Roles
9 Describe Readers and Authors fields
9 Use Readers and Authors fields to control access to documents

St uden t G ui de P age No . 244

485

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Setting Roles in a Database


Describe how to use roles
Describe examples of using roles in applications. For example, hiding a Create action prevents the user from being able to create a document.

Roles and groups


Explain the difference between roles and groups. Mention that groups can only be created and maintained by someone with administrative rights to the Domino Directory. Describe how roles work on local databases. Give examples of how roles can be used to refine access to elements in the application. Solicit other suggestions from the students.

Create user roles


Demonstrate creating roles in the Instructor database. Create at least three roles: one that all the students are members of and two more that divide the students into two groups, perhaps Aisle and Wall, or RightSide and LeftSide.

486

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Setting Roles in a Database


Roles provide a way to define a group within the database. Users and groups are assigned roles to refine access to particular views, forms, documents, or sections. Instead of assigning access to specific users and groups, assign access to the role. Roles are functional after being:

Defined in the ACL Used in a design element.

Advantages of using roles


Some of the advantages of using roles are that they:

Provide a flexible method of restricting access to a specific set of users. Can be used in formulas. Provide a method to define a set of users within an application. Do not need to be maintained or added as a group in the organizations Domino Directory. Make it unnecessary to modify the application when users leave or new users join.

Creating a role in the ACL


Follow these steps to create a role in the ACL.
Step 1 Action Choose FileDatabaseAccess Control. Result: The Access Control List box opens. Click Roles in the Contents pane. Click Add. Result: The Add Roles dialog box appears. 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.

2 3 4 5

St uden t G ui de P age No . 245

487

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Setting Roles in a Database...(continued)

Assign a role
Demonstrate assigning roles in the Instructor database. Assign the roles you created in the previous demonstration to the appropriate students.

488

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Setting Roles in a Database... (continued)

Assigning roles to users


Once a role is created, assign it to the appropriate users or groups listed in the ACL. Follow these steps to assign roles to users or groups.
Step 1 2 3 4 5 Action Open the database in either the Notes Client or Domino Designer. Choose FileDatabaseAccess 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. Click OK.

Once roles have been assigned to users, you can use them to determine what users can do or see in the database.

St uden t G ui de P age No . 246

489

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Using Roles to Determine What the User Can Do or See


Explain the finished result of the next section--how to hide certain elements within a document from users whose role doesnt match an approval list.

Describe how to capture a users role with @Functions


Provide examples of using these functions:

@UserRoles @UserNamesList @IsMember

Direct students to Designer Help for more information and examples.

490

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Using Roles to Determine What the User Can Do or See


Incorporate roles into formulas to control access to parts of the application and to define 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.

Using roles in formulas


You can apply roles to further refine control within the application. For example,
with roles you can control who can:

Access specific views and folders


Create documents
Read the documents
Edit the documents
Access sections within the document

This section shows how to write a formula to determine who can see a specific
design element based on a role. This involves capturing the current users role
and comparing it in a Hide When formula.

Capturing the users role


Use the following functions to capture the current users role(s).
Function @UserRoles @UserNamesList 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 Any roles for current user

St uden t G ui de P age No . 247

491

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Using Roles to Determine What the User Can Do or See...


(continued)

Explain the different ways formulas can compare user roles


Make note of the difference between !@IsMember and @IsNotMember. The two are not synonymous with each other.

492

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Using Roles to Determine What the User Can Do or See...


(continued)

Comparing the users role


Once a users role is determined, it needs to be compared against a list. The formulas course of action is based upon whether or not the role matches an entry on the list. Use the @IsMember function to determine if a user has a specific role. This function determines if a text string matches an item in a text list. The syntax for using @IsMember is:
@IsMember(textValue; textListValue);

Use the @IsNotMember function to determine if a text string does not match an item in a list. The syntax for using @IsNotMember is:
@IsNotMember(textValue; textListValue);

The following table provides some examples of using @IsMember and @IsNotMember.
Example
@IsMember("[Student]"; @UserRoles)

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.

!@IsMember("[Student]"; @UserNamesList) @IsNotMember("[Student]"; @UserRoles)

St uden t G ui de P age No . 248

493

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Using Roles to Determine What the User Can Do or See...


(continued)

Write a Hide When formula based on a user role


Use the Demo form to demonstrate how to write a Hide When formula that shows the Salary field to users with a particular role. For example, use @IsMember and @UserRoles to hide the field for everyone except the users in the Wall role. Test the formula by having students open Demo documents. Certain students will see the field, and other wont depending on which Role they are included in.

Refer to the caution


Explain that Hide When is not true security.

494

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Using Roles to Determine What the User Can Do or See...


(continued)

Using a formula to set the Hide When property


Follow these steps to hide a field with a formula.
Step 1 2 3 4 Action 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). Using Hide When to hide the contents of a field does not provide true security. Users can still see the contents of the field by using the Document properties box. Use encryption to secure the data in a field for Notes clients.

Caution

St uden t G ui de P age No . 249

495

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Exercise: Create Roles


Introduce the exercise
Work through the first step with the class so that they all enter the same roles. Refer to the results of the previous exercise. The roles should be:
Role Employees PWriters Designers Managers Employee Policy and Procedure Writer Database Designer Manager Description

Note: In this exercise the students create the roles in the ACL. They will apply the roles in design elements later in this lesson.

496

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Exercise: Create Roles


In this exercise, you will create roles for the Policies and Procedures application and assign these roles to different users. For example, there are policy makers who should be able to view all documents and assign questions to the appropriate experts.

Tasks
Perform the following tasks to complete this exercise:

Determine appropriate roles for the application. You will do this in conjunction with the instructor and the rest of the class. Create the roles in the Policies and Procedures database.

St uden t G ui de P age No . 250

497

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Controlling Access to Documents


Lead a discussion
Discuss the various options for controlling who can create, read, or edit documents. When discussing who can read documents, note that the Read access list is a means of creating a $Readers field. Using a Readers field on the form is the preferred method.

498

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Controlling Access to Documents


Individual documents sometimes contain sensitive information. Domino's layered security model provides mechanisms to restrict access to a document. The following table lists what methods control who can create, read, and edit documents.
Access Read access to documents Edit access to documents Create access Controlled by
Read access lists Readers fields Authors fields Controlled Access sections Form property: Show in Create menu Create access lists

This section focuses on using Readers and Authors fields to control document access.

St uden t G ui de P age No . 251

499

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Using Readers Fields


Describe Readers fields

Describe the relationship between Readers fields and the ACL. Emphasize in this section that it is NOT a best practice to explicitly list users and servers in readers fields. Ensure that servers are somehow included in the Readers field on every form so that documents will replicate among servers.

500

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Using Readers Fields


A Readers field restricts readership of a document to those users and servers that are listed in the field. It is a special type of text field designed to interact with the Access Control List (ACL). By specifically listing users, groups, and roles in a Readers field, you can control who can read individual documents. This can be very useful in a scenario requiring an approval process. With a Readers field, you can restrict access to any documents that are not approved; if the documents are approved, the restrictions are unnecessary.

How Readers fields work with the ACL


Entries in a Readers field cannot give a user more access than what is specified in the ACL; they can only further restrict access. Users with No Access cannot gain access to a database even if their names are listed in a Readers field in a document in that database. For example, users with Editor access or above in the ACL can be restricted from reading documents that have a Readers field if their names are not included in that field. This type of access control only takes effect when the database is on a server. If you develop a database locally, you cannot test this feature until you copy the database to a server.
Caution

Viewing documents with Readers fields


When Domino builds a view, it indexes all documents that meet the selection criteria, regardless of whether those documents contain a Readers field. When that view is displayed:

Documents that do not contain a Readers field are visible to all users. Documents with a Readers field are only visible to users listed in the Readers field. Other users do not see those documents.

Thus, you do not need to alter the view to hide certain documents from general viewing.

St uden t G ui de P age No . 252

501

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Using Readers Fields...(continued)

Demonstrate creating and using a Readers field


In the Instructor database, use the Demo form to create a Readers field. Compute the value using @UserName. Create a document and have the students try to open it. Go back and change the formula to include @UserName plus a role that contains all of the students. Have the students create another Demo document. Now have the students try to open it. Ask them if they can edit it.

Note: Make sure the students understand that the Readers field restricts access. Even an Editor or Manager can be restricted from reading (and therefore editing) a document

502

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Using Readers Fields...(continued)

Specifying Readers
Entries in a Readers field must compute to a text value. Designers and managers specify readers in a Readers field 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 field editable, so application Authors and Editors can select and change readers.

Creating a Readers field


Follow these steps to create a Readers field.
Step 1 2 3 Open a form in Designer. Create a field, selecting Readers as the field data type. Specify the readers. Action

St uden t G ui de P age No . 253

503

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Using Authors Fields


Explain how to use Authors fields
Users with Author access (in the ACL) cannot edit the documents they create, unless their names are in the documents Authors field. An Authors field identifies which users or groups with Author access to the database can edit a document. The name in the Authors field must be the complete Notes hierarchical name.

504

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Using Authors Fields


A user with Author access to a database 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 field in the document. This section describes how to use an Authors field to define editing capabilities for users with Author access to the database.

Describing Authors fields


An Authors field is a type of field that works in conjunction with the Author access level in the databases Access Control List. Authors fields 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 field of a document. Similarly, users with a level of No Access cannot edit a document, even if their names are in the Authors field.

When to create an Authors field


Include an Authors field on the form to store the name of the user when the document is created. An Authors field can store one or more user names or groups and can be editable or computed.

St uden t G ui de P age No . 254

505

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Using Authors Fields...(continued)

Describe how Authors and Readers fields work together


To get the point across about how Authors and Readers fields work separately and together, work through the table on the Student Guide with the students. This table is not meant to be all-inclusive. It is simply a representative sample of the possible permutations of access control within a database.

506

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Using Authors Fields...(continued)

How Authors and Readers fields work together


The following table is a representative sample of the possible permutations of access control within a database.
ACL Level Authors Field Exists and User Is in It Yes No No Yes No No Yes No No Yes No No Readers Field Exists and User Is in It No Yes No No Yes No No Yes No No Yes No Can Read Document Can Edit Document

Author Author Author Manager Manager Manager Editor Editor Editor Reader Reader Reader

Yes Yes No Yes Yes No Yes Yes No No Yes No

Yes No No Yes Yes No No Yes No Yes No No

St uden t G ui de P age No . 255

507

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Using Authors Fields...(continued)

Discuss using editable vs. computed Authors fields


When would you use an editable Authors field?


When would you use a computed field?
What type of computed field would you use?
Would you ever use a Computed for display field for an Authors field?

Create an Authors field


Demonstrate how to create an Authors field.

Ask students to try to edit the documents they created in the Instructor database. Add an Authors field with @UserName to the Demo form.

Ask students to create a new document with the Demo form and then to try to edit it.

508

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Using Authors Fields...(continued)


As with Readers fields, you can compute the value of an Authors field, or allow the user to select Authors for the document. Use the @UserName function to capture the name of the current Notes user. You can use this function to dynamically compute the value of an Authors field.

Creating an Authors field


Follow these steps to create an Authors field.
Step 1 2 3 Action Create a field on the form from which the documents will be created. In the Field properties box, on the Basics tab, select Authors as the field type. Select one of the following to determine when the field obtains its value.
Editable allows those who create the document to designate who can

edit the document. Computed fills 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 field. 4 Enter a formula to calculate the value of the field. Note: Computed fields must have a formula. Editable fields can use a formula to calculate a default value that the user can change.

St uden t G ui de P age No . 256

509

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Controlling Access for Anonymous Users


Discuss the material on the student page
In some cases, anonymous users will be allowed access to the server. This does not mean that anonymous users will automatically have access to a database on that server. In fact, you may want to restrict access to the database by anonymous users. If anonymous access to the database is required, then anonymous users must be accounted for in the ACL of the database. Discuss the sample ACLs for lowsecurity and high-security databases. Note the differences in the low-security and high-security ACLs.

510

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Controlling Access for Anonymous Users


Users who have Internet or intranet access to a database cannot be identified by Notes in the way Notes users are identified. Domino provides ways for you to determine the maximum Internet name and password access level.

Setting up anonymous access


Follow these steps to allow anonymous users to access a database.
Step 1 2 3 4 Open the database in Designer. Open the databases Access Control List. Add an entry for the group Anonymous. Assign the access level you want to give to anonymous users. Action

Setting a low security ACL for a Web database


The following table illustrates an ACL for a low-security discussion database.
Web User -DefaultAnonymous Supervisors Maximum Internet name and password access Author Author Editor Editor Access Level

St uden t G ui de P age No . 257

511

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Controlling Access for Anonymous Users...(continued)

Discuss the difference between the low and high security ACL examples

512

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Controlling Access for Anonymous Users...(continued)

Setting a high security ACL for a Web database


The following table illustrates an ACL for a high-security confidential database.
Web User -DefaultAnonymous Authorized readers Contributors Supervisors Maximum Internet name and password access Access Level No Access No Access Reader Author Editor Reader

St uden t G ui de P age No . 258

513

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

Exercise: Control access to documents in the Policies and Procedures application


Introduce the exercise
This is a very involved exercise. In order for the students to effectively test their work, create teams of students to work together after they have implemented their changes. Make sure that they are using the Policies database that they copied from the instructor so that they have the same groups, users and ACLs.

514

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

L esson 13 A ccessi ng E leme nts with in a D atab ase

Exercise: Control access to documents in the Policies and Procedures application


In this exercise 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.

Tasks
This exercise involves making changes to the ACL and the Policy, Question, and Answer forms. Determine the changes that need to be made and implement them. Work with other students to help test that your application works as expected.

St uden t G ui de P age No . 259

515

Preview

Lesso n 13 A cces sing El ement s wit hin a D at abase

516

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

G
Deploying the Application

Lesson 14 Preparing and Deploying the Application

C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

14

Preparing and Deploying the Application

Introduce the lesson

518

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

14

Less on 1 4 Dep loyi ng t he App lic atio n

Preparing and Deploying the Application

After an application has been designed, developed, and tested, there are a few more things to do before putting it into production.

Objectives
After completing this lesson you should be able to:
9 Create a template from an existing database
9 Create a new database from the template
9 Link a database template to a database
9 Set the ACL of your application to allow proper replication
9 Describe Dominos replication process
9 Create a database replica on a server

St uden t G ui de P age No . 262

519

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Controlling Application Maintenance

Discuss the checklists on the student page

520

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Controlling Application Maintenance


There are a number of ways to control application maintenance. Barbara A. Bolin and R. Benjamin Ordonez in their book Lotus Notes: The Complete Reference, published by The McGraw-Hill Companies, Inc., recommend that you use three templates:

A production template which contains the design of the production database. You update the production database with the production template. A development template which you use to perform updates and bug fixes. Once you finish testing the modifications, 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.

Checklist: Rolling out an application


The following checklist includes recommended steps to use when rolling out a new application:
Step 1 2 3 4 Process Create a template out of the new database. Create a new database from the newly created template. Modify the ACL of the new database so that it will replicate correctly. Create a new replica of the database on the server.

Checklist: Updating the design of an application


The following checklist includes recommended steps to use when updating an application design:
Step 1 2 3 Process Update the design of the template. Test. Refresh the design of the local database. Test. Replicate with the server to replicate the design changes. Test.

St uden t G ui de P age No . 263

521

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Database Templates
Show the list of standard design templates

522

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Database templates
A template is a Domino file that contains the design structure for a Domino database. File extensions differ for databases and templates. The file extension for a Domino database is .NSF. The file extension for a Domino template is .NTF. When you use a template to create a database, like you did in Module A, the database receives the design elements from the template. IBM Lotus Notes and Domino contain several standard database templates. You can create an application from a standard template, customize the standard templates to meet your needs, or create a custom template from scratch. Example standard Domino templates include:

Discussion Document Library Personal Journal Personal Address Book

St uden t G ui de P age No . 264

523

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Using Master Design Templates


Discuss the use of templates for controlling modifications to an application design
When you need to modify or add to your applications design, you can do the work in the template and refresh the design of the working, application database. You can choose to refresh all design elements, or individual elements. Ask: How many of you have ever refreshed the design of your mail file? When upgrading to new releases of Notes, users often need to refresh the design of their mail databases to have the latest forms and views, such as the calendar view.

524

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Using Master Design Templates


Design templates let you isolate the design and development of an application from the production environment. By managing application design modifications using a master design template, you avoid disruption to an application that has been deployed.

Creating a master design template


Create the master design template in two steps:

Extract the design elements of your database to a new database Designate the new database as a template.

Once the template is created, link the database template to your application database.

St uden t G ui de P age No . 265

525

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Using Master Design Templates...(continued)

Demonstrate creating a master design template

526

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Using Master Design Templates...(continued)

Extracting the design from the database


Follow these steps to extract the design elements to another database which will become the master design template:
Step 1 2 3 4 5 Action

Select the database in either Notes or Designer. Choose File Database New Copy. Select the location to store the new database. Enter a title. Enter a file name with the .NTF extension. Note: The NTF file extension does not make the file a template. It simply causes it to appear as a choice in the list of templates when you create a new database.

Click Copy: Database design only.

St uden t G ui de P age No . 266

527

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Using Master Design Templates(continued)

Demonstrate the procedures on the student page

528

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Using Master Design Templates(continued)

Turning a database into a template


Follow these steps to turn a database into a template:
Step 1 2 3 4 5 Select or open the database. Open the Properties box. Click the Design tab. Click the check box to enable the Database file is a master template property. Enter the template name. The template name is the link between the template and the database or databases. Action

Linking the application database to the master design template


Once you create the master design template, follow these steps to link it to your application database:
Step 1 2 3 4 5 Select or open the database. Open the Database Properties box. Click the Design tab. Click to place a checkmark next to Inherit from template. Enter the name of the template. Action

St uden t G ui de P age No . 267

529

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Exercise: Create a design template and a new database

530

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Exercise: Create a design template and a new database


Now that the Worldwide Policies application has been designed, developed, and tested, it is time to make a design template from the database and prepare to deploy the application.

Tasks
In order to complete this exercise, do the following:

Create a template from the Policies database you created during the course. Create a new Policies database from the template. Make sure that the new database is set to inherit future design changes from the template.

St uden t G ui de P age No . 268

531

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Describing the Domino Replication Service


Explain what the Domino replication service does
Explain the replication process, including the following points:

Replication allows users on various networks in a variety of locations to share the same information. When you replicate, Notes updates the replicas, copying changes from one to the other. Domino eventually makes all replicas identical. You can replicate between two servers, or between a workstation (such as a laptop) and a server.

532

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Describing the Domino Replication Service


Replication is the process of synchronizing multiple instances, or copies, of a database on multiple servers and workstations. Running separate instances of a database on multiple servers provides two benefits:

It allows developers and administrators to distribute applications across geographic locations for faster access. It allows users to work with an application offline, and then add (or replicate) their changes when reconnected to the network.

The Domino replication service


The Domino replication service transfers new and modified notes between databases. The following diagram illustrates the concept of replication.

St uden t G ui de P age No . 269

533

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Describing the Domino Replication Service...(continued)

Define replica databases


A replica differs from a database copy, in that the original database and its replica have the same replica ID number.

Display a database replica ID


Open the Database Properties box and show students the replica ID on the Info tab.

Briefly explain what happens during replication


Describe the general process of replication. In the next section, we will examine how ACL and replication settings affect what replicates.

Describe why some data does not replicate


View indexes do not replicate because replica databases can contain different documents, so the indexes may not be correct. Also, view indexes can be very large and would slow down replication. Each replica database maintains its own file system information. This data is irrelevant to replication.

534

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Describing the Domino Replication Service...(continued)

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 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.

What happens during replication


Replication is initiated by a Domino server or a user in the Notes client. During the replication process, the two servers (or the client and server) do the following:

Authenticate with each other. Build a list of document, design element, and ACL changes since the last replication. Transfer the changes to the replica databases. 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. Domino can only transfer those changes permitted by the ACL.

Data that does not replicate


The following data does not ever replicate:

View and FullText indexes


File system information (for example, the database file name and path)

St uden t G ui de P age No . 270

535

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Controlling What Replicates


Explain the effects of the ACL on replication
Do not simply upgrade the server to editor to avoid listing the server name in the Authors item of a document. That is a violation of the first rule of security: Give the minimum access available to get the job done.

536

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Controlling What Replicates


This section describes the following three ways of controlling the data that
replicates:

Controlling server access to the database


Readers of a document
Replication settings of the database

Controlling server access to the database


The data that replicates is dependent on the rights of who is doing the replicating. The following table describes the effects of ACL settings on replication.
Server Access Level in the Replica Database ACL No Access Depositor Reader Author Effect on Replication

No replication occurs. Server can send new documents, but cannot receive any documents. Server can receive changes, but cannot send changes. Server can send the following changes:
New documents created since last replication. Modifications 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 database, the server (in addition to the user who created the document) must be listed in the Authors item for replication to occur. Editor Designer Manager Server can send all new documents and changes to existing documents. Server can send all new and modified documents and design elements. Server can send all new and modified documents, design elements, and the ACL.

St uden t G ui de P age No . 271

537

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Controlling What Replicates...(continued)

Readers and replication


A replicating server must be listed as a reader of a document.

538

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Controlling What Replicates...(continued)

Readers and replication


Documents that contain Readers items must list the replicating server as well as users. The server must be able to read the document to replicate it. If the server is not listed as a reader of the document, the document will not replicate.

Replication settings
Replication settings allow a further refinement of which documents are going to replicate between any two servers, and between client and server. The following table describes these settings.
Group Space Savers Settings
Remove documents not modified in the last Include specific Address Book fields. Replicate a subset of Documents.

n days.

Send

Do not send deletions made in this replica to other replicas. Do not send changes in database 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 modified after. CD-ROM publishing date.

Advanced

Replicate a subset of Documents between specified servers or

specified client and server. Replicate specific types of design elements.

St uden t G ui de P age No . 272

539

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Creating Replicas
Review the procedure
Make note that depending on the production environment, application developers may not be able to create new replicas on a production server.

540

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Creating Replicas
Creating replicas manually
Follow these steps to manually create a replica:
Step 1 2 3 4 5 6 Open the database. Choose FileReplicationNew Replica. Select the destination server (server on which to place the replica). Keep the default file 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. Action

St uden t G ui de P age No . 273

541

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

Exercise: Roll out the Policies application

Introduce the exercise

542

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Less on 1 4 Dep loyi ng t he App lic atio n

Exercise: Roll out the Policies application


In this final exercise you will make modifications to the Policies application that will allow for proper replication of the application. You will also test the application.

Tasks

Modify the ACL of the newly created Policies database so that all documents and design changes will replicate. Create a new replica of the Policies database on the classroom server. Create some new documents in the server copy of the database. Replicate with the local copy to show that the documents replicate properly. In the template, change the design of the Policy form. Perhaps modify the background or header. Refresh the design of your local Policies application. Open an existing Policy document to see the new change. Lastly, replicate the Policies application from local to server in order to see that the design change replicates.

St uden t G ui de P age No . 274

543

Preview

Lesso n 14 D epl oyin g t he A pp licat io n

544

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Appendix
Exercise Solutions

C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 3: Create a database, and a form that contains a table and fields
This solution has three parts:

Build a new database


Create a new form
Add elements, such as text and fields, to the form

Create a database
Follow these steps to create the Policies and Procedures database.
Step 1 2 3 Action Open Domino Designer. Choose File Database New. Accept the default of Local to create the database on the local computer. Enter the title Policies and Procedures for the database. Enter the file name Policies_ABC.nsf. Replace ABC with your initials Select -Blank- from the template list. Click OK. The new database is created. Policies and Procedures appears in the title box. The New Database dialog box appears. Result

Policies_ABC.nsf appears in the file name box.

6 7

A 2

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 3: Create a database, and a form that contains a table and fields...(continued)

Create a form
Follow these steps to create the Policy form.
Step 1 2 Action Open the Policies and Procedures database in Designer. In the Design pane, click Forms. In the Work pane, the list of existing forms appears. The New Form button appears on the button bar. Result

3 4 5

In the Work pane, click New Form. Choose Design Form Properties Enter Policy in the Name field. Note: It is a good idea to give the form an alias. Close the properties box. The Form properties box opens. Policy appears in the name box.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 3

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 3: Create a database, and a form that contains a table and fields...(continued)

Format the Policy form


Follow these steps to format the Policy form.
Step 1 2 3 4 Action Type Policies and Procedures at the top of the form. Press Enter several times to move the cursor below the title text. Click and drag to highlight the text. Choose TextText Properties. Change the font style and size. For example, Arial Black, 14 pts. Navy Blue. Close the Text Properties box. Click below the title text to position the cursor where youd like the table to appear. Choose CreateTable. Create a Basic table with the following options: 5 rows 2 columns Fixed Width Click OK. 9 Type the following field labels in the cells of the first column: Policy Number: Policy Title: Effective Date of the Policy: Category: Display Category: The field labels appear in each cell in the first column. The Create Table box opens. The table appears on the form. Result The text appears on the form. The cursor flashes to indicate its position. The Text properties box opens. The title text reflects the changes.

5 6

7 8

(continued on next page...)

A 4

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 3: Create a database, and a form that contains a table and fields...(continued)

Format the Policy form, continued


Follow these steps to format the Policy form.
Step 10 11 Action Click in the cell to the right of the first field label, Policy Number. Choose Create Field to create a field with the following characteristics: Field name: PolicyNo Field Type: Text, Editable Click in the cell to the right of the Policy Title field label. Repeat step 11 with the following characteristics: Field name: PolicyTitle Field type: Text, Editable Click in the cell to the right of the Effective Date field label. Repeat step 11 with the following characteristics: Field name: EffectiveDate Field type: Date/Time, Editable Click in the cell to the right of the Category field label. Repeat step 11 with the following characteristics: Field name: Category Field type: Dialog List, Editable Click in the cell to the right of the Display Category field label. Repeat step 11 with the following characteristics: Field name: DCategory Field type: Text, Computed The PolicyNo field is created in the first cell of the right column. Result

12

The PolicyTitle field is created in the the right column.

13

The EffectiveDate field is created in the the right column.

14

The Category field is created in the the right column.

15

The DCategory field is created in the the right column.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 5

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 3: Create a database, and a form that contains a table and fields...(continued)

Format the Policy form, continued


Follow these steps to format the Policy form.

Step 16

Action Select the Category field and click the Control tab. Type the following in the Choices box: Office Guidelines Benefits Holidays Grievance Procedures Click and drag to highlight the Category row. Click the Hide/When tab and select to Hide paragraph when document is: Previewed for reading Opened for reading Printed Select the DCategory row. Click the Hide/When tab and select to HIde paragraph when document is: Previewed for editing Opened for editing Close the Field properties box. Enter the following formula in the Programmers Pane of the DCategory field:
Category

Result The category choices are created.

17

The Categories row will not be seen when the document is in read mode.

18

The Display Category row will not display when the document is being edited.

19 20

The option selected in the Category field will display in the DCategory field when the document is in Read mode.

21

Save and test the form in the Notes client.

A 6

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 4: Create a Categorized View


Create a categorized view
Follow these steps to create a view that displays documents created using the Policy form.
Step 1 2 3 4 5 6 7 8 9 Action Open the Policies and Procedures database in Designer. In the Design Pane, click Views. In the Work pane, click New View. Name the view, Policies. Click OK. Open the Policies view. Click Add Condition in the View Programmers Pane. Select By Form from the Condition drop-down list. Select the Policy form. Click Add. Double click the first view column to open the Column Properties box. Select the following option on the Column Info tab: Name: Policy Width: 25 In the Programmers Pane, select Field. Select the PolicyTitle field. The first column displays the policy titles.
(continued on next page...)

Result The database opens in the Work pane.

The Create View box opens. The Policies view appears in the view list. The Policies view opens in the Work pane. The Add Condition dialog box opens. A list of the forms in the Policies and Procedures database appears. Uses Policy form appears in the Programmers Pane.

10

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 7

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 4: Create a Categorized View...(continued)

Create a categorized view, continued


Follow these steps to continue building a categorized view:
Step 11 Action Choose CreateAppend New Column to add a column to the right with the following options: Name: Effective Date Width:10 Field: EffectiveDate Save and preview the view. Result A column displaying the policy effective date appears to the right of the Policy Name column.

12

Create a categorized column


Follow these steps to add a categorized column to the Policies view.
Step 1 2 Action Open the Policies view in Designer. Choose CreateInsert New Column to add a column to the left with the following options: Name: blank Width: 1 Click the Sort tab and select the following options: Sort: Ascending Type: Categorized In the Programmers Pane, select Field. Select the Category field. Save and refresh the view The document categories are listed in the work pane. Result The Policies view opens in the Work pane. A new blank column is inserted to the left of Policy Name.

4 5

A 8

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 5: Create a Page


This solution has three parts:

Create shared images Create a page Modify the page

Create shared images


Follow these steps to create shared images for the Policies and Procedures database.
Step 1 2 3 4 Action 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, browse for and select the following image files: LOGO WW1.gif bluerule.gif Click Open. A list of shared images appears in the Work pane. The New Image Resource dialog box opens. The images are added to the shared resources list. Result

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 9

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 5: Create an Introduction Page...(continued)

Create an Information page


Follow these steps to create an Information page in the Policies and Procedures database.
Step 1 2 3 4 5 Action Click Pages in the Design list. Click New Page. Choose DesignPage Properties. Name the page, Information. Close the Page Properties box. Save the Information page. A new, blank page opens in the Work pane. The Page Properties box opens. Result

Modify the Information Page


Follow these steps to modify the Main page.
Step 1 2 3 4 5 Action With the cursor in the Information page, choose Create Table Create a fixed width table with 2 rows and 1 column. Click OK. Click in the top cell and choose Create Image Resource. Select the LOGO WW1.gif file and click OK. Click in the bottom cell and enter the following text: 123 Worldwide Blvd. Metropolis, PA 45555 Result The Create Table box opens. A table with 2 rows and 1 column is created. The Image Resource The Worldwide logo is added to the first cell. Worldwides address appears below the company logo.

A 10

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 5: Create an Introduction Page...(continued)

Modify the Information page, continued


Follow these steps to continue modifying the Main page.
Step 6 7 8 Action Click below the table. Choose CreateImage Resource. Select bluerule.gif. Click OK. Click below the bluerule.gif image. Enter the following text:
Worldwide 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 who work from their homes.

Result The Image Resource box opens. The bluerule.gif image is added below the table. The text is added to the page.

9 10

Click and drag to highlight the text. Choose Create Section. Choose SectionSection Properties and change the Title to About Worldwide. Select a border style. Save and preview the page.

A twistie appears to the left of the text. The Section heading About Worldwide is created with a border around it.

11

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 11

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 6: Interpret Formulas


Given the Following data:
FirstName: Susan
LastName: Sunshine
Created on 3/7/99 at 11:59:37 PM

The following table shows the results of each formula.


Formula
FirstName LastName FirstName + LastName LastName + , + FirstName FirstName = Susan (FirstName != Larry) & (LastName = Sunshine) @Adjust (@Created; 0; 6; 0; -2; 0; 0) @If (@Created < @Today; Old; New) @Text (10.22) fullName := FirstName + + LastName; Welcome back, + fullName

Result Susan LastName SusanSunshine Sunshine, Susan True True 9/7/99 4:59:37 AM Old Text value, 10.22 Welcome back, Susan Sunshine

A 12

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 7: Create a Dynamic Title for the Policy Form


Follow these steps to complete the exercise.
Step 1 2 3 Action Open the Policy form in Designer. In the Object tab, select Window Title. In the Script area, enter the following formula:
@If(@IsNewDoc;New Policy; PolicyTitle)

Result The form appears in the Work pane. The Programmers pane is empty. 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 field. Designer stores the changes in the database. The title should display as New Policy. The policys name is displayed in the title.

4 5 6

Save the form. Preview the form. Open an existing Policy in Notes.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 13

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 7: Automate Data Entry and Formatting


This solution consists of the following parts:

The policy title should be formatted using proper case. Create a field 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


Follow these steps to make sure the Policys title is always entered in proper case.
Step 1 2 3 Action Open the Policy form in Designer. Highlight the PolicyTitle field. In the Script area, enter the following formula in the Input Translation object for the field:
@ProperCase(PolicyTitle)

Result

The PolicyTitle field and its objects appear in the Objects list. The formula appears in the Script area.

Save and test the form.

A 14

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 7: Automate Data Entry and Formatting...(continued)

Have Domino enter the entry date


Follow these steps to have Domino automatically enter the documents entry date and display the date only.
Step 1 2 Action Place the cursor in the third row of the table on the Policy form. Choose Table Insert Row. In the left cell type the field label: Created Date: 3 4 Move the cursor into the right cell. Choose Create Field. Name the field PolicyCreatedDate with the following options: Field Type: Date/Time Computed Select the Value object for the PolicyCreatedDate field. In the Field info tab, change the field to Computed when composed. In the Script area, enter:
@Created

Result

A blank row is inserted above the Effective date row. The text appears in the left cell. The Create Field box opens. The PolicyCreatedField is added to the right cell.

5 6

7 8

The formula appears in the Script window. The Control tab of the field properties box is displayed.

Open the field properties box and click the Control tab. In the Show dialog box, select Only month, day, year. Save and test the form.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 15

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 7: Automate Data Entry and Formatting...(continued)

Calculate the EffectiveDate of the policy


Follow these steps to calculate the EffectiveDate of the policy based on the PolicyCreatedDate.
Step 1 2 3 Action Open the Policy form in Designer. Highlight the EffectiveDate field. Open the Field properties. Change the field from Editable to Computed. In the Script area, enter the following formula in the Value object for the field:
@Adjust(PolicyCreatedDate;0;1 ;0;0;0;0)

Result

The EffectiveDate field and its objects appear in the Objects list. The field type is changed to indicate that the field is going to be computed. The formula appears in the Script window.

Save and test the form.

A 16

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 7: Automate Data Entry and Formatting...(continued)

Verify fields before saving


Follow these steps to verify that certain fields contain a value before allowing a document to be saved.
Step 1 2 Action Highlight the PolicyTitle field. In the Script area, enter the following formula in the Input Validation object of the field:
@If (PolicyTitle != ""; @Success; @Failure("Please enter a Policy Title."))

Result The PolicyTitle field and its objects appear in the Objects list. The formula appears in the Script area.

Repeat Steps 1 and 2 for the following Category field. Use the following formula:
@If (Category != ""; @Success; @Failure("Please enter a Category."))

The formula appears in the Script area.

Preview the form to test the formulas.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 17

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 7: Compute a List of Choices for a Field


This solution consists of the following parts:

Create a Category form with a Category field Use the Category form to create several documents Build a view to display only Category documents Modify the Policy form so the Category field gets its value from the Categories view

Create a Category form


Follow these steps to build the Category form.
Step 1 2 Action Open the Policies database in Designer. In the Design pane, click Forms. In the Work pane, the list of existing forms appears. The New Form button appears on the button bar. Result

3 4 5

In the Work pane, click New Form. Choose Design Form The Form properties box opens. Category appears in the name box.

Properties
Enter Category in the Name field. Note: It is a good idea to give the form an alias. Close the properties box. Enter the field label, Category, at the top of the page. Choose Create Field to create a field with the following characteristics: Field name: Category Field Type: Text, Editable Save the form and test in the Notes client. A field named Category is created.

6 7 8

A 18

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 7: Compute a List of Choices for a Field...(continued)

Use the Category form


Follow these steps to build documents using the Category form.
Step 1 2 Action Open the Notes client Choose File Database Open. Browse for and open the Policies and Procedures (Policies_ABC.nsf) database. Choose Create Category to create a document using the Category form. Enter Office Guidelines in the Category field. Save and close the document. Repeat steps 3 and 4 with the following categories: Benefits Holidays Grievance Procedures Security Email Etiquette Diversity The database opens. Result

The Category form opens.

The document closes.

6 additional documents are created using the Category form.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 19

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 7: Compute a List of Choices for a Field...(continued)

Create the Category view


Follow these steps to create a view to display documents using the Category form.
Step 1 2 3 4 5 6 7 8 9 Action Open the Policies and Procedures database in Designer. In the Design Pane, click Views. In the Work pane, click New View. Name the view, Categories. Click OK. Open the Categories view. Click Add Condition in the View Programmers Pane. Select By Form from the Condition drop-down list. Select the Category form. Click Add. Double click the first view column to open the Column Properties box. Modify the column as follows: Name: Category Width: 25 In the Programmers pane, select Field. Select Category from the list of fields in the database. Save and preview the view. The Create View box opens. The Categories view appears in the view list. The Categories view opens in the Work pane. The Add Condition dialog box opens. A list of the forms in the Policies and Procedures database appears. Uses Category form appears in the Programmers Pane. The default column displays Category in its header and is 25 characters wide. Result The database opens in the Work pane.

10

The Category column displays the content of Category field.

11

A 20

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 7: Compute a List of Choices for a Field...(continued)

Modify the Policy form


To build a list of keyword choices from the Category view, do the following:
Step 1 2 3 4 Action Open the Policy form in Designer. Highlight the Category field and open the Field properties box. Click the Control tab. In the Choices dialog box, select Use formula for choices in the first dialog box. In the Choices dialog box, enter 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)

Result The form appears in the Work pane. The Field properties dialog box opens.

Save and test the form.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 21

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 7: Create Reusable Code


Use @ThisValue and @ThisName to create two input validation formulas. Perform these steps to complete the Guided Practice.
Step 1 Action In the Practice database, open the Employee Information form in Designer. Select the FirstName field. In the programmers pane, on the Object tab, select Input Validation. In the Programmers pane, enter the following formula: @If(@ThisValue="";@Failure("
Please enter your "+ @ThisName+".");@Success)

Result The Employee Information form opens in the Work pane.

The formula returns the message, Please enter your FirstName if the field is left empty.

Reuse this formula by copying it and pasting it as an Input Validation formula for the LastName field. In the Salary field, enter the following formula: @If(@ThisValue="";@Failure( "The "+@ThisName+"field must contain a value.");@Success) Save and preview the form in Notes.

The formula returns the message, Please enter your LastName if the field is left empty. The formula returns the message, The Salary field must contain a value if the field is left empty.

A 22

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 8: Create Question and Answer Forms in the Policies Database


This solution consists of the following parts:

Use a layer and the mod_menu_background.gif file to enhance the look of the forms. Design and create the Question form. Design and create the Answer form.

Create the header subform


Follow these steps to create the header subform.
Step 1 2 3 4 5 6 7 8 Action Open the Policies database in Designer. In the Design pane, select Shared Code Subforms. Click New Subform. With the cursor in the Info page, choose Create Table Create a fixed width table with 1 row and 2 columns. Click OK. Click in the left cell and choose Create Image Resource. Select the LOGO WW1.gif file and click OK. Click in the right cell and enter the following text: 123 Worldwide Blvd. Metropolis, PA 45555 Click below the table and choose Create Insert Resource. Select bluerule.gif and click OK. Close and save the subform as Worldwide Header. A list of current subforms appears in the Work pane. A blank subform opens in the Work pane. The Create Table box opens. A table with 1 row and 2 columns is created. The Image Resource box opens. The Worldwide logo is added to the first cell. Worldwides address appears below the company logo. Result

The bluerule.gif image is added below the table.


The subform closes and Worldwide Header appears as an available subform in the subforms list.

10

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 23

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 8: Create Question and Answer Forms in the Policies Database...(continued)

Create a shared image


Follow these steps to add a shared image.
Step 1 2 3 4 Action 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, browse for and select the following image files: mod_menu_background.gif Click Open. A list of shared images appears in the Work pane. The New Image Resource dialog box opens. The image is added to the shared resources list. Result

A 24

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 8: Create Question and Answer Forms in the Policies Database...(continued)

Create the Question form


Follow these steps to create the Question form.
Step 1 2 Action Open the Policies and Procedures database in Designer. In the Design pane, click Forms. In the Work pane, the list of existing forms appears. The New Form button appears on the button bar. Result

3 4 5 6 7 8 9

In the Work pane, click New Form. Choose Design Form Properties Enter Question in the Name field. Close the properties box. Choose Create Insert Subform. Select Worldwide Header. Click OK. Click below the subform and enter the following text: Question Position the cursor several spaces below the text and choose Create Table. Create a table with 5 rows and 2 columns. Click OK. The Create Table box opens. The Insert Subform box opens. The subform is inserted at the top of the Question form. The Form properties box opens. Question appears in the name box.

10

11

A table is inserted on the Question form.


(continued on next page...)

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 25

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 8: Create Question and Answer Forms in the Policies Database...(continued)

Create the Question form, continued


Follow these steps to continue creating the Question form.
Step 12 Action In the first row add the following filed label into the left cell and field into the right cell: Field label: Name: Field name: UserName, Field type: Text, Computed In the Programmers pane, enter the following formula:
@UserName

Result The first row is populated with a field label and field.

13

14

Repeat step 12 in the next row with the following changes: Field label: Date of Question Field name:QuestionDate Field type:Date/TIme, Computed In the Programmers pane, enter the following formula:
@Created

The row is populated with a field label and field.

15

16

Repeat step 12 in the next row with the following changes: Field label:Category In the right cell choose Insert Shared Field. Select Category. Repeat step 12 in the next row with the following changes: Field label: Subject Field name: Subject Field type: Text, Editable

The row is populated with a field label and field. The Category shared field is inserted in the right cell. The row is populated with a field label and field.

17 18

(continued on next page...)

A 26

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 8: Create Question and Answer Forms in the Policies Database...(continued)

Create the Question form, continued


Follow these steps to continue creating the Question form.
Step 19 Action Repeat step 12 in the next row with the following changes: Field label: Details Field name: Details Field type: Rich Text, Editable Click outside the table. Choose Create Layer. Choose Layer Layer properties. Set the z-index to 0 Click the Layer Background tab. Click Browse Images and select the mod_menu_background.gif image. Click OK. Set the image to Repeat horizontally. Resize the layer by clicking and dragging one of the layer corners. Position it behind the table of field labels and fields. Save and close the Question form. The layer serves as a background to the table. Result The row is populated with a field label and field.

20 21 22

A blank layer is inserted on the form. The layer is positioned behind the table. The mod_menu_background.gif image is added to the layer.

23 24

25

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 27

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 8: Create Question and Answer Forms in the Policies Database...(continued)

Create the Answer form


Follow these steps to create the Answer form. This form will inherit information from the Question form.
Step 1 2 Action Open the Policies database in Designer. In the Design pane, click Forms. In the Work pane, the list of existing forms appears. The New Form button appears on the button bar. Result

3 4 5 6

In the Work pane, click New Form. Choose Design Form Properties Enter Answer in the Name field. Select Response as the form Type. Click the Defaults tab and select On Create Formulas inherit values from selected document. Close the Properties box. Choose Create Insert Subform. Select Worldwide Header. Click OK. Click below the subform and enter the following text: Answer Position the cursor several spaces below the text and choose Create Table. Create a table with 5 rows and 2 columns. Click OK. The Create Table box opens. The Form properties box opens. Answer appears in the name box. When a document is created using the form it will inherit values from another document. The Insert Subform box opens. The subform is inserted at the top of the Question form.

7 8 9

10

11

A table is inserted on the Answer form.

(continued on next page...)

A 28

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 8: Create Question and Answer Forms in the Policies Database...(continued)

Create the Answer form, continued


Follow these steps to continue creating the Answer form.
Step 12 Action In the first row add the following filed label into the left cell and field into the right cell: Field label: Name: Field name: UserName, Field type: Text, Computed In the Programmers pane, enter the following formula:
UserName

Result The first row is populated with a field label and field.

13

The field derives its value from the UserName field. The row is populated with a field label and field.

14

Repeat step 12 in the next row with the following changes: Field label: Question Subject Field name: QuestionSubject Field type:Text, Computed In the Programmers pane, enter the following formula:
Subject

15

The field derives its value from the Subject field The row is populated with a field label and field.

16

Repeat step 12 in the next row with the following changes: Field label: Date of Question Field name:QuestionDate Field type:Date/TIme, Computed In the Programmers pane, enter the following formula: @Created. Repeat step 12 in the next row with the following changes: Field label: Answer Subject Field name: AnswerSubject Field type: Text, Editable

17

18

The row is populated with a field label and field.

(continued on next page...)

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 29

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 8: Create Question and Answer Forms in the Policies Database...(continued)

Create the Answer form, continued


Follow these steps to continue creating the Answer form.
Step 19 Action Repeat step 12 in the next row with the following changes: Field label: Answer Field name: Answer Field type: Rich Text, Editable Click outside the table. Choose Create Layer. Choose Layer Layer properties. Set the z-index to 0 Click the Layer Background tab. Click Browse Images and select the mod_menu_background.gif image. Click OK. Set the image to Repeat horizontally. Resize the layer by clicking and dragging one of the layer corners. Position it behind the table of field labels and fields. Save and close the Answer form. Create several the Question and Answer forms. The layer serves as a background to the table. Result The row is populated with a field label and field.

20 21 22

A blank layer is inserted on the form. The layer is positioned behind the table. The mod_menu_background.gif image is added to the layer.

23 24

25 26

A 30

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 9: Display the Question and Answer Forms in a View


Follow these steps to create a hierarchical view that displays the Questions with the answer below.
Step 1 2 3 4 5 6 7 8 Action Open the Policies and Procedures database in Designer. In the Design Pane, click Views. In the Work pane, click New View. Name the view, Q & A. Click OK. Open the Q & A view. Select View Selection in the Objects pane. In the Programmers pane, select Formula in the Run dropdown list. Delete SELECT @All. Enter the following formula:
SELECT Form=Answer

Result The database opens in the Work pane.

The Create View box opens. The Categories view appears in the view list. The Categories view opens in the Work pane. The Add Condition dialog box opens. SELECT @All appears in the Programmers pane. The new formula is created.

Double click the first view column to open the Column Properties box. Modify the column as follows: Name: Question Width: 25 In the Programmers pane, select Formula and add the following formula:
Subject + " - " + @Text(QuestionDate)

10

The Question column displays the content of the Subject and QuestionDate fields.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 31

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 9: Display the Question and Answer Forms in a View...(continued)

Create a responses only column


Follow these steps to create a responses only column in the Q & A view .
Step 1 2 Action Open the Q & A view in Designer. Choose Insert New Column to create a column to the left of the Question column. On the Basics tab of the Column Properties box: Leave the column title blank. Set the width to 1. Select Show responses only. In the Programmers pane, select Formula and add the following formula:
AnswerSubject + " @Text(AnswerDate) " +

Result

A new blank column is inserted in front of the Question column.

Save and preview the view.

A 32

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 10: Adding Automation to the Policies Application


This solution consists of the following parts:

Create a list of actions. Determine where they need to be executed and if they are shared. Create the actions. Add the actions to the appropriate views and forms. Hide the actions when appropriate. Save any of the documents by clicking a button instead of using menu commands.

List of actions
The following table lists the actions that need to be added to the Policies database.
Action Create Policy Edit Policy Create Question Edit Question Create Answer Edit Answer Save and close the document. Policies View 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 Policies View When policy, question or answer document is open in edit mode. Where used

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 33

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 10: Adding Automation to the Policies Application...


(continued)

Create the Create Policy button


Follow these steps to create the Create Policy button.
Step 1 2 3 4 Action Open the Policies view, from the Policies database, in Designer. Choose CreateAction from the menu. In the Name dialog box, enter Create Policy. Enter the following formula in the Script area for the Click object of the action:
@Command( [Compose];"Policy")

Result The view appears in the Programmers pane. The Action properties box opens. The action is named Create Policy. The formula appears in the Script area.

Save and close the form.

A 34

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 10: Adding Automation to the Policies Application...


(continued)

Create shared actions


Follow these steps to create the shared actions.
Step 1 Action With the Policies database open in Designer, click Shared CodeActions. Click New Shared Action. In the Name box, enter Edit Document. Select the Action Hide/When tab. Select
Previewed for editing Opened for editing.

Result The Work pane opens to the shared actions list. The Shared Action Properties box opens. The shared action is named Edit Policy. The Action Hide/When tab appears. The properties are set which will hide the button if the document is in Edit mode.

2 3 4 5

6 7

Close the Action properties box. Enter the following formula in the Script area for the Click object of the action:
@Command([EditDocument])

The formula appears in the Script area.

Save the shared action.


(continued on next page...)

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 35

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 10: Adding Automation to the Policies Application...


(continued)

Create shared actions


Follow these steps to create more shared actions.
Step 9 Action Repeat steps 1-6 with the following change: Name: Create Answer Enter the following formula in the Script area for the Click object of the action:
@Command ( [Compose]; "Answer" )

Result The Create Answer action is created.

10

The formula appears in the Script area.

Note: Use the form alias if you created one, in place of the form name. 11 12 Save the shared action. Repeat steps 1-6 with the following change: Name: Create Question Enter the following formula in the Script area for the Click object of the action:
@Command([Compose];"Question" )

The Create Question action is created.

13

The formula appears in the Script area.

14

Save the shared action.

A 36

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 10: Adding Automation to the Policies Application...


(continued)

Insert the shared action onto the forms


Follow these steps to insert the shared actions in the appropriate forms.
Step 1 2 3 4 5 6 Action Open the Answer form in Designer. Choose CreateInsert Shared Action from the menu. Select the Edit Document shared action. Click Done. Save and close the Answer form. Repeat steps 1 - 5 to insert the Edit Document shared action onto the Policy and Question forms. The Edit Document action appears on the two additional forms. Result The form appears in the Programmers pane. The Insert Shared Action dialog box appears. Designer adds the shared action to the form. The Insert Shared Action dialog box closes.

Insert the shared actions onto the views


Follow these steps to insert the shared actions in the appropriate views.
Step 1 2 3 4 Action Open the Policies view in Designer. Choose CreateInsert Shared Action from the menu. Select the Edit Document and Create Question shared actions. Click Done. Result The view appears in the Programmers pane. The Insert Shared Action dialog box appears. Designer adds the shared actions to the view. The Insert Shared Action dialog box closes.
(continued on next page...)

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 37

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 10: Adding Automation to the Policies Application...


(continued)

Insert the shared actions onto the views, continued


Follow these steps to insert the shared actions in the appropriate views.
Step 5 6 Action Save and close the Policies view. Repeat steps 1 - 5 to insert the following shared actions onto the Q & A view: Edit Document Create Question Create Answer The shared actions appear on the Q & A view. Result

A 38

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 10: Adding Automation to the Policies Application...


(continued)

Create the Save and Close button


Follow these steps to create the Save and Close button.
Step 1 Action With the Policies database open in Designer, click Shared CodeActions. Click New Shared Action. In the Name box, enter Save and Close. Click the Action Hide/When tab. Select Previewed for reading and Opened for reading. Close the Shared Action properties box. Enter the following formula in the Script area for the Click object of the action:
@Command([FileSave]); @Command([ FileCloseWindow])

Result The Work pane opens to the shared actions list. The Shared Action Properties box opens. The shared action is named Save and Close. The Action Hide/When tab appears. The properties are set which will hide the button if the document is in Read mode.

2 3 4 5

6 7

The formula appears in the Script area.

Save the shared action.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 39

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 10: Adding Automation to the Policies Application...


(continued)

Add the Save and Close shared action to the forms and views
Follow these steps to add the Save and Close shared actions to the forms and views in the Policies application.
Step 1 2 3 4 5 6 Action Open the Answer form in Designer. Choose CreateInsert Shared Action from the menu. Select the Save and Close shared action. Click Done. Save and close the Answer form. Repeat steps 1 - 5 to insert the Save and Close shared action onto the Policy and Question forms. Open the Policies view in Designer. Choose CreateInsert Shared Action from the menu. Select the Save and Close shared action. Save the view. Repeat steps 7-10 to insert the Save and Close shared action onto the Q & A view. The Save and Close action appears on the two additional forms. The view appears in the Programmers pane. The Insert Shared Action dialog box appears. Designer adds the shared action to the view. Result The form appears in the Programmers pane. The Insert Shared Action dialog box appears. Designer adds the shared action to the form. The Insert Shared Action dialog box closes.

7 8 9 10 11

A 40

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 11: Update Existing Documents


Follow these steps to create an agent that re-assigns the policy numbers.
Step Action With the Policies database open in Designer, click Shared CodeAgents. 2 3 4 5 Click New Agent. In the Name dialog box, enter
Re-Assign Policy Numbers.

Result The Work pane opens to the agents. The Agent Properties box opens in the Work pane. The agent is given a name. The agent is designated as a shared agent. The Programmers pane is split into the InfoList and the Script area. The formula is entered in the Script area.

Check that Shared is selected. In the Programmers pane, select Formula from the Run list. In the Script area, enter the following formula:
REM {Generate a random number}; TempNum := @Random * 100; REM {Select the rightmost 4 digits of the number to use in the policy number}; REM {and make it text.}; NewTemp := @Right(@Text(TempNum);4); REM {Set the PolicyNO field to "PN" plus the NewTemp}; FIELD PolicyNo := "PN" + NewTemp; SELECT @All

7 8

Save the agent. Open the database in the Notes client, run the agent, and check the results.

The new agent is saved. The PolicyNo field in all Policy documents contains the reassigned policy numbers.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 41

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 12: Set Access Restrictions to the Database


The following table lists the access restrictions for the Policies application.
User/Group Default Anonymous Employees Policy Makers Department Head Managers Designer Depositor No Access Author Editor Author Manager Designer Privileges

A 42

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 13: Create Roles


The following solution consists of two parts:

Determine the roles for the Policies application Create the roles

Determine the roles


The following table lists the roles for the Policies application.
Role Employees PWriters Designers Managers Employee Policy and Procedure Writer Database Designer Manager Description

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 43

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 13: Create Roles...(continued)

Create the roles


Follow these steps to create the roles from the preceding table.
Step 1 2 3 Action Open the Policies application in Designer. Choose File Database Access Control. Click the Roles tab located on the left side of the Access Control List dialog box. Click Add to add a user Role. Enter Employees in the Add Role dialog box. Click OK. Repeat steps 3 and 4 to add the following roles: PWriters Designers Managers Click the Basics icon located on the left side of the Access Control List dialog box to return to the list of access controls. Look in the Roles field to verify that the roles you added are listed there. The Access Control List to: Policies and Procedures box opens. The roles field opens in the Access Control box. The Add Role box opens. Employees appears, in brackets, in the Roles list. The new roles are added to the Roles list. Result

4 5

A 44

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 13: Control access to documents in the Policies and Procedures application
In this exercise 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. Prevent users not in the Group/Users listed in the ACL from accessing the application. Only people in 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.

The following solution consists of the following several parts:


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 their 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 database has the groups and roles from the previous two exercises.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 45

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 13: Control Access to Documents in the Policies and Procedures Application...(continued)

Modify the ACL


Follow these steps to modify the Policies and Procedures database ACL to set the access levels of the Employee group and the [PWriter] role.
Step 1 2 3 4 Action Open the Policies and Procedures database in Designer. Choose File Database Access Control. Select the Employee group from the list of users. Select the Create documents access privilege. The Access Control List to: Policies and Procedures box opens. The Employee group is highlighted. Users in the Employee group have the Create Document privilege Author privileges and are assigned the Employees role. The Policy Makers group is highlighted. Users in the Policy Makers group have Author privileges and are assigned the [PWriter] role. Users in the Department Heads group are assigned the [PWriter] role. Result

5 6

Select the Policy Makers group from the list of users. Select Author as the access level. Select the [PWriter] role. Select the Department Heads group from the list of users. Assign the [PWriter] role to the group. Click OK to close the Access Control List box and save the database.

A 46

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 13: Control Access to Documents in the Policies and Procedures Application...(continued)

Set the default access


Follow these steps to change the access rights of default users to no access.
Step 1 2 3 4 Action Open the Policies and Procedures database in Designer. Choose File Database Access Control. Click -Default- from the list of users. Select Reader as the access level. Deselect Write Public Documents. Click OK. Anyone with default access to the database can read documents. The Access Control box opens. Result

Place restrictions in the Policy form


Follow these steps to restrict who can create and edit documents created with the Policy form.
Step 1 2 3 Action Open the Policies and Procedures database in Designer. In the Design pane, expand the list of Forms. Open the Policy form. Deselect All Authors and above for Who can create documents with this form. Select the [PWriters] role. Close the Form Properties box. The Policy form opens in the Work pane. Only users assigned the PWriters role can create Policies. Result

(continued on next page...)

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 47

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 13: Control Access to Documents in the Policies and Procedures Application...(continued)

Place restrictions in the Policy form, continued


Follow these steps to restrict who can create and edit documents created with the Policy form.
Step 4 Action Create an Authors field in the Policy Form with the following properties: Name: Editors Data type: Authors Type: Computed when composed Allow multiple values Value formula:
@IsMember("[PWriter]":@UserNa me)

Result Only users assigned to the PWriter role can create a Policy document.

Save the form.

A 48

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 13: Control Access to Documents in the Policies and Procedures Application...(continued)

Modify the Question form


Follow these steps to set the read and edit restrictions for the Question form.
Step 1 2 3 Action Open the Policies and Procedures database in Designer. Open the Question form. Create an Authors field with the following properties: Name: Authors Data type: Authors Type: Computed when composed Value formula:
@UserName

Result

Only the documents creator can make changes to the document.

Save and close the form.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 49

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 13: Control Access to Documents in the Policies and Procedures Application...(continued)

Modify the Answer form


Follow these steps to modify the Answer form so only users assigned the [PWriter} role can create and edit documents created with the form.
Step 1 2 3 Action Open the Policies and Procedures database in Designer. Open the Answer form. Choose Design Form properties. Select the Security tab. Deselect All Authors and above for Who can create documents with this form. Select the [PWriters] role. Close the Form Properties box. Place your cursor at the bottom of the form and choose Create Field. Create an Authors field with the following properties: Name: Authors Data type: Authors Type: Computed when composed Value formula:
@UserName

Result

The Answer form opens in the Work pane. The Form Properties box opens.

Only users assigned the PWriters role can create Answers.

Only the documents creator can make changes to the document.

Save and close the form.

A 50

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 13: Control Access to Documents in the Policies and Procedures Application...(continued)

Set hide/when formula for shared actions


Follow these steps to set the hide/when function for the Create Policy and Create Answer actions.
Step 1 Action With the Policies database open in Designer, click Shared CodeActions. Open the Create Answer action. Choose Design Shared Action Properties. Click the Action Hide When tab. Select Hide action if formula is true and enter the following formula:
@IsMember("[PWriters]"; @UserRoles)

Result The Work pane opens to the shared actions list.

2 3

The Shared Action Properties box opens. The Create Answer action is hidden from anyone who is not assigned the PWriters role.

5 6

Save the shared action. Repeat steps 1- 5 for the Create Policy shared action.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 51

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 14: Create a design template and a new database


The following solution has three parts:

Extract the design elements to create a master design template.


Create a master design template
Create a new database which will update whenever the template changes

Extract design elements


Follow these steps to extract the design elements to another database which will become the master design template.
Step 1 Action Result

Select the Policies and Procedures database in either Notes or Designer. Choose File Database New Copy. Make sure that the server is set to Local. Enter the title
Policies_Template. The Copy Database box opens.

2 3 4 5

Enter the file name


Policies_Template.NTF.

Note: The NTF file extension does not make the file a template. It simply causes it to appear as a choice in the list of templates when you create a new database.
6 7

Click Copy: Database design only. Click OK.

Only the database design elements will be copied, not the documents. The database design is copied locally.

A 52

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix A Exer ci se S olu tio ns

Lesson 14: Create a Design Template and a New Database...


(continued)

Turn a database into a template


Follow these steps to turn the Policies_Template database into a template.
Step 1 2 Action Open the Policies_Template.ntf database in Designer Choose File Database Properties to open the Properties box. Click the Design tab. Select Database file is a master template. Enter the template name Policies_Template.ntf. The template name is the link between the template and the database or databases. Click the green check mark. Save the database. The template name is listed in the name box. The Database Properties box opens. Result

3 4 5

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

A 53

Preview

Ap pend ix A Exer ci se S olut io ns

Lesson 14: Create a Design Template and a New Database...


(continued)

Linking the application database to the master design template


Once you create the master design template, follow these steps to link it to your application database:
Step 1 2 3 4 Action Open the Policies and Procedures database in Designer. Choose File Database Properties. Click the Design tab. Select Inherit from template. Click in the Template Name box and enter Policies_Template.ntf Make changes to the Policies_Template.ntf database and refresh the design of the Policies and Procedures database to see if the changes occur. The Policies and Procedures database will inherit design changes from the Policies_Template.ntf database. The Policies application Properties box opens. Result

A 54

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Appendix

Identifying Programming Languages Supported by Domino

C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Ap pend ix B Iden tif yin g P ro gra mming Lan guag es S uppo rt ed b y D omin o

Writing Programs in Domino


You can write programs in a Domino application using the Designer client. Many design elements can execute programs automatically through the properties and events of the element. You can also write programs outside the Domino application using other development tools. These programs can be imported or run in the operating system to access the Domino application.

Domino is a flexible development environment


The Domino development environment supports all leading technologies with
tools that cater to varying developer skill levels and degrees of programming
experience. Given so many choices, the question that confronts developers at the
outset of any application development initiative is which tool to use. The answer is
simple: Understand the functions that can be performed programmatically in
Domino, then pick the one that meets the demands of the task at hand and which
is most comfortable for you. Some factors that affect the decision include:

Does the code run a server?


Does the code run on a client? If so, which client?
Where does the data reside?
What are the programming skills of the developer?

Just as important as where the code is written is where it is executed. The location
of execution, i.e., server versus client, can affect how the data is accessed, as
well as the security provisions that are taken to protect the data.

B 2

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix B Iden tif yin g P ro gra mming Lan guag es S uppo rt ed b y D omin o

Writing Programs in Domino...(continued)

Where to program in Domino


The following diagram shows where code can be written for the Domino environment.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

B 3

Preview

Ap pend ix B Iden tif yin g P ro gra mming Lan guag es S uppo rt ed b y D omin o

Writing Programs in Domino... (continued)

Internal programming languages


Domino Designer provides an Integrated Development Environment (IDE) for writing code in a Domino application. It supports the following four programming languages:

Formula LotusScript Java JavaScript

Domino also supports HTML and XML.

External programming languages


Domino supports the following external programming languages:

Java C, C++ Visual Basic

Connecting to Domino from external applications


The following table describes the two database drivers that allow you to query Domino databases via SQL.
This Driver NotesSQL Is... An ODBC driver that makes Domino databases look like another relational back-end source to an SQL tool or application interface. A Type II JDBC driver that makes Domino databases look like another relational back-end source to an SQL tool or application interface. Use It When You Require... Read/write access to Lotus Dom ino data using any application that supports ODBC. For example, an application that produces reports in Notes using Seagates Crystal Reports or Microsoft Access. Access to Lotus Domino data using any JDBC-enabled applica tion. For example, when your application is a servlet on an HTTP server.

Lotus Domino Driver for JDBC

B 4

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix B Iden tif yin g P ro gra mming Lan guag es S uppo rt ed b y D omin o

Examining the Formula Language


The Formula language is the core language built into Notes/Domino from its earliest releases. You will learn more about working with the Formula language in the next two lessons.

Where to use the Formula language


The Formula language consists of @functions and @commands. Use @functions and @commands to customize the forms, fields, and views of a Domino application. The following table lists common events and properties that execute formulas.
Element Form
Window Title WebQuerySave PostOpen (can also execute LotusScript)

Property/Event

Field

Value or Default Value Input Validation Input Translation Hide/when

View

View Selection Form Formula Column Formula

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

B 5

Preview

Ap pend ix B Iden tif yin g P ro gra mming Lan guag es S uppo rt ed b y D omin o

Examining LotusScript
LotusScript is an embedded BASIC scripting language that offers access to Domino data and services beyond the capabilities of the Formula language.

Where to use LotusScript


Use LotusScript to program agents and actions or to execute code in a design element event. The following table lists common events that execute LotusScript.
Element Form Property/Event Postopen (can also execute formulas) Queryclose Postrecalc Field Initialize Terminate Agent Initialize Terminate

Criteria for selecting LotusScript


The following table summarizes the advantages and limitations of using LotusScript.
Advantages Embedded BASIC language Object-based Sophisticated access to Domino data Integrated debugger Limitations Requires programming skills More verbose than formula language Not executable in Web browsers

B 6

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix B Iden tif yin g P ro gra mming Lan guag es S uppo rt ed b y D omin o

Examining Java
Internally, Domino only supports the use of Java in agents. However, external Java programs can access Domino applications. The Designer IDE provides a basic Java editor in the Agent Builder, with color formatting and reference Help for the standard Java language and the Domino classes.

Where to use Java


Use the Designer Agent Builder to program Java agents. Java can access the same application data and services as LotusScript. Use third-party development tools to build applets and stand-alone applications that access Domino applications.

Criteria for selecting Java


The following table summarizes the advantages and limitations of using Java.
Advantages
Powerful object-oriented language Remote access and networking support Extensive class library (beyond Domino) Multi-threaded

Limitations
Internally, Domino only supports its use

in agents.
Complex program development

requires third-party development tool with debugger.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

B 7

Preview

Ap pend ix B Iden tif yin g P ro gra mming Lan guag es S uppo rt ed b y D omin o

Examining JavaScript
JavaScript is integrated in Designer to allow Domino applications to support users with Web browsers. The Notes 6 client interprets JavaScript and thus benefits from its unique characteristics. This functionality is critical in building applications for mixed clients.

Where to use JavaScript


Use the Programmers pane to write JavaScript directly into properties and events of forms, pages, and their design elements. The following table lists common properties and events that execute JavaScript.
Element Form or Page
JSHeader onLoad onUnload

Property/Event

Field or Button

onFocus onBlur onChange onMouseOver

Criteria for selecting JavaScript


The following table summarizes the advantages and limitations of using JavaScript.
Advantages
Object-based language Web standard Cross-platform compatibility Runs in Notes clients and Web

Limitations
Built-in editor, but no debugger Requires programming skills

browsers

B 8

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix B Iden tif yin g P ro gra mming Lan guag es S uppo rt ed b y D omin o

Choosing a Language
Choosing the best language to use for a given situation can be complex. Many times, the requirements of the situation will narrow the number of choices available.

Criteria for choosing a language


The following table outlines some of the guidelines you can use to make a programming language choice.
If the Application Requires... Complex control User interaction Access to Domino data Calculations with simple results A series of scripted activities Data access efficiency Consider Choosing... LotusScript, Java, JavaScript Formula, LotusScript, JavaScript LotusScript, Java, Formula Formula LotusScript, JavaScript LotusScript, Java, Formula

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

B 9

Preview

Ap pend ix B Iden tif yin g P ro gra mming Lan guag es S uppo rt ed b y D omin o

B 10

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Appendix

Learning Processes and Instructor Guide Conventions

C opyr ig ht IB M Co rp ora tio n 20 02. A ll r ight s r eser ved .

Preview

Ap pend ix C Lear nin g P ro cesses and Ins tr uct or Guide Co nvent ion s

Using the Learning Processes

This section includes the relevant information about the standard curriculum development learning processes and icons. Use this section as a tool to prepare to deliver the course successfully. Note: The terms instructional unit and unit are used to refer to general units of instruction, including modules, lessons, topics, activities, and so on.

What are learning processes?


Learning processes are the basic instructional strategies that the instructor uses
to encourage students to achieve learning objectives. Presentation, Discussion,
Demonstration, Guided Practice, and other delivery strategies provide the means
for facilitating instruction and skills acquisition. A unique icon indicates the
recommended learning process and displays next to the learning process
instruction.
For the learning processes that follow, you will see:

A summary description
The appropriate icon
A table indicating what the instructor and students will see in their guides
Teaching tips

Note: Not all the learning processes are used in every course.

What is e-learning?
Some of the descriptions that follow include references to e-learning. E-learning education offerings and seminars are delivered using online tools. E-learning courseware can be self-paced or instructor-led. Instructor-led e-learning courses use the tools of either the Lotus Sametime Meeting Center or the Lotus LearningSpace Virtual Classroom.

C 2

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix C Lear ni ng P ro cesses and Ins tr uct or Guide Co nven tio ns

Using the Learning Processes...(continued)

Assessment
An Assessment is an evaluation learning process used to gauge the student's
knowledge. Assessments provide feedback to both the student and instructor,
and can be formal or informal. Assessments can be collected and graded, or
assessment answers are provided.
Assessments are used to:

Assess prior knowledge (pre-test).


Provide self-assessment.
Calculate the course grade.
Verify attainment of course learning goals.

The following table lists the supporting materials that may be included in the
Instructor and Student Guides for this learning process.

Instructor Guide Contents


Assessment icon Questions Answers For Lotus LearningSpace materials,

Student Guide Contents


Assessment icon Answers

reference to the Question Set or assessment that was enabled for the session.

Note: Answers to the assessments are included in the Assessment Answers appendix of both the Student Guide and Instructor Guide.

Teaching tips
9 Clearly state the purpose of the assessment (for example, to provide self-assessment, assess prior knowledge, or calculate course grade). 9 When applicable, provide information on the organization's policies regarding grading and privacy of information. 9 When delivering an e-learning question, allow for transmission time before tallying answers.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

C 3

Preview

Ap pend ix C Lear nin g P ro cesses and Ins tr uct or Guide Co nvent ion s

Using the Learning Processes...(continued)

Case Study
A Case Study is an experience-based learning process used for discovery and exploration, or as a culmination of learning objectives. The Case Study presents a problem or scenario. Students work independently or in groups to provide recommendations, problem resolutions, or solution strategies. Although Case Study materials may not include a correct answer, they may include recommended solutions, a list of considerations, or resolution strategies. The following table lists the supporting information that may be included in the Instructor and Student Guides for this learning process.
Instructor Guide Contents
Case Study icon Presentation strategy Workgroup recommendations Solution methodology Estimated timing for student work Possible solutions, considerations, or

Student Guide Contents


Case Study icon Facts and scenario of case Problem to be solved Possible solutions, considerations, or

strategies

strategies
Estimated timing for discussion Discussion tips

Teaching tips
9 Follow the recommended timing for the case study, but modify accordingly based on the students expertise. 9 Lead a discussion on a recommended solution.

9 Discuss the solution(s) and, as a group, list the advantages and disadvantages of the suggested alternatives.

C 4

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix C Lear ni ng P ro cesses and Ins tr uct or Guide Co nven tio ns

Using the Learning Processes...(continued)

Demonstration
A Demonstration is a presentation of a procedure, user interface, solution, or
other course-related task or structure. In general, instructors use Demonstrations
to present content, procedures, and structure.
Students watch but do not participate in Demonstrations.
Demonstrations can be used to:

Present complex material.


Illustrate a new topic.
Present a topic quickly, without presenting it in detail.
Provide a change of pace within the course.
Implement specific parts of the classroom scenario.

The following table lists the supporting information that may be included in the
Instructor and Student Guides for this learning process.

Instructor Guide Contents


Demonstration icon Instructions (and, if applicable, data) an

Student Guide Contents


Procedure icon When appropriate, the related generic

instructor uses to perform a particular Demonstration Specific content information that should be presented For e-learning materials, instructions to transition to the Screen Sharing mode

Procedure or information related to the task being demonstrated.

Demonstration database For some offerings, a Demonstration database is included on the Classroom Tools media. Sample Demonstrations are pre-built for the instructor to use.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

C 5

Preview

Ap pend ix C Lear nin g P ro cesses and Ins tr uct or Guide Co nvent ion s

Using the Learning Processes...(continued) Teaching tips


9 Relate the Demonstration to the information or Procedure in the Student Guide.

9 Ask questions during the Demonstration to ensure student comprehension of the task or information referenced in the demonstration. 9 Consider directing the students to look at the Procedure after completing the demonstration to help ensure that the students watch the instructor perform the steps. 9 For e-learning delivery, use Screen Sharing and enable participants to complete some procedural tasks.

C 6

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix C Lear ni ng P ro cesses and Ins tr uct or Guide Co nven tio ns

Using the Learning Processes...(continued)

Discussion
A Discussion is an interactive activity in which the instructor solicits opinions,
ideas, beliefs, and experience regarding course-related content or issues.
Discussions can be used to:

Solicit analogies from student experiences.


Introduce a new topic or sequence that builds on existing skills or knowledge.
Ascertain general understanding or assimilation of course content.

The following table lists the supporting information that may be included in the
Instructor and Student Guides for this learning process.

Instructor Guide Contents


Discussion icon Questions to ask students and ideal

Student Guide Contents


Related procedure or information

answers to the questions


Important information or ideas that

could result from the Discussion Transition statements to begin or summarize discussion For e-learning materials, tips or alternatives for conducting the Discussion with a large or distributed student group

Teaching tips
9 9 Limit the Discussion to topics directly related to the lesson objective. Ask questions to encourage participation.

9 Summarize the Discussion to help students relate the topics discussed with the course content. 9 For e-learning delivery, use the hand raise tools, chat, and poll techniques to solicit feedback. 9 For e-learning delivery, in sessions that do not use online audio, encourage students to use the electronic hand raise feature to indicate that they would like to participate. 9 For e-learning delivery, remind students to state their name before speaking, to identify themselves to classmates who might not recognize their voice. 9 For e-learning delivery to large groups, consider conducting the discussion using other means, for example, Chat or Discussion Board.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

C 7

Preview

Ap pend ix C Lear nin g P ro cesses and Ins tr uct or Guide Co nvent ion s

Using the Learning Processes...(continued)

Exercise
There are two types of exercises: online and paper-based.

Online Exercise icon


Students complete the exercise on the computer.

Paper-based Exercise icon


Students complete the exercise on paper. An Exercise is a problem-solving learning process, which can provide immediate positive feedback when successfully completed. Exercises challenge students to use the skills they have learned in an instructional unit. Exercises may occur in the middle or at the conclusion of a unit. Exercises do not provide instructions for completion. Instead, they provide a set of criteria, a problem statement, or general task that students use to develop a working solution for a specific goal. Note: Solutions to Exercises are included in Appendix A: Exercise Solutions of both the Student Guide and Instructor Guide. The following table lists the supporting information that may be included in the Instructor and Student Guides for this learning process.
Instructor Guide Contents
Exercise icon Estimated timing for the Exercise Recommendations on how students

Student Guide Contents


Exercise icon Facts or scenario Problem to be solved Goal to be achieved Task to complete Criteria for completion

should perform the Exercise, such as working in groups or individually Special preparation instructions Tips to help students resolve any problems that they may encounter For e-learning materials, instructions for conducting a small group Exercise using the Breakout Session tools or other methods of collaboration.

C 8

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix C Lear ni ng P ro cesses and Ins tr uct or Guide Co nven tio ns

Using the Learning Processes...(continued) Teaching tips


9 Refer to any special preparation students must complete, or issues they may encounter during the Exercise. 9 Remain available during the Exercise and be prepared to answer students' questions.

9 Review the Exercise solution in Appendix A: Exercise Solutions at the end of the exercise. 9 Make group assignments clear and achievable.

9 For e-learning delivery that uses the Breakout Session tools, schedule the session as a final class activity, one that does not require students to return to the main live session. This simplifies the navigation that students need to complete. 9 For e-learning delivery where students have little or no experience with Breakout Session tools, assign a teaching assistant to initiate the session and facilitate the groups work.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

C 9

Preview

Ap pend ix C Lear nin g P ro cesses and Ins tr uct or Guide Co nvent ion s

Using the Learning Processes...(continued)

Guided Practice
A Guided Practice is a student-centered learning process that allows students to learn by performing a task. Guided Practices can be instructor-led or self-paced.

Instructor-led practice is used to present a new procedure or a new user interface. The instructor and students perform the procedure at the same time. The classroom projection system or monitor displays the instructors actions. The Student Guide includes detailed instructions for completing the task.

Self-paced practice allows students to apply a learned skill or knowledge. Students perform a procedure independently, using instructions. The following table lists the supporting information that may be included in the Instructor and Student Guides for this learning process.
Instructor Guide Contents
Guided Practice icon Heading that indicates whether the

Student Guide Contents


Guided Practice icon Step/Action or Step/Action/Result table

Guided Practice should be instructorled or self-paced Preparation directions Estimated timing for the self-paced practice Potential issues Content details that should be presented in the instance of an instructor-led practice

that contains specific information Step/Action or Step/Action/Result table that contains specific tasks to complete

Teaching tips
9 Briefly review the directions before starting the Guided Practice.

9 If the students perform the Guided Practice on their own, be available during the guided practice so they can ask questions. 9 Review the Guided Practice results when completed to ensure that students have successfully completed it or demonstrated comprehension of the skills. 9 9 Provide additional information as required. Relate the Guided Practice information to the job task whenever possible.

C 10

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix C Lear ni ng P ro cesses and Ins tr uct or Guide Co nven tio ns

Using the Learning Processes...(continued)

Presentation
A Presentation is an instructor-led learning process used to present content and
instruction using a variety of media.
Presentations include:

Freelance slides
Multimedia executables
Videos
Whiteboard slides for e-learning offerings
Follow Me pages for e-learning offerings

The following table lists the supporting information that may be included in the
Instructor and Student Guides for this learning process.

Instructor Guide Contents


Presentation icon Slide title or content Media for the Presentation Location of Presentation materials in

Student Guide Contents


Related Procedure or information Slide content

the Classroom Tools database or directory Estimated timing for the Presentation Special setup or delivery instructions Content information to be presented For e-learning materials, instructions to share or use Whiteboard Tools For e-learning materials, Follow Me page name For e-learning materials, instructions to select and send the Follow Me page

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

C 11

Preview

Ap pend ix C Lear nin g P ro cesses and Ins tr uct or Guide Co nvent ion s

Using the Learning Processes...(continued) Teaching tip


9 Keep the Presentation within the scope of the content.

9 Enhance the Presentation using your own words and relate the information to the appropriate objective. 9 For e-learning delivery, use the Whiteboard Tools to annotate the slide and the Whiteboard Pointer tool to focus attention. 9 For e-learning delivery, when displaying a new Whiteboard or Whiteboard slide, pause to allow time for each student's display to refresh. 9 For e-learning delivery, when presenting a Web page, pause to allow the new browser window to open and display the page on the student's machine. When finished presenting the page, instruct students to close the window and display the live session window.

C 12

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix C Lear ni ng P ro cesses and Ins tr uct or Guide Co nven tio ns

Using the Learning Processes...(continued)

Procedure
A Procedure is a generic task that is documented using step-by-step instructions. Procedures are always presented in a table format. A Procedure can also be in the form of a checklist. Checklists can be used to list:

Tasks required to complete a specific objective. Tasks that are part of a process. Items, equipment, requirements, or other materials necessary to complete a task.

The following table lists the supporting information that may be included in the Instructor and Student Guides for this learning process.
Instructor Guide Contents
When accompanied by a

Student Guide Contents


Procedure icon Step/Action or Step/Action/Result table

Demonstration, instructions, such as preparation and specific steps The purpose of the procedure as it relates to the subject matter

Teaching tips
9 If the Procedure is related to a Demonstration, direct the students to look at the Procedure after completing the Demonstration. This helps ensure that the students watch the instructor perform the task. 9 For a checklist, periodically review the checklist to show progress in completing a task or process. 9 For a checklist, recommend to students that they use the checklist as a reference.

9 For a checklist, create and present a slide or flipchart containing the checklist. Track the progress of the larger process on this flipchart or slide.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

C 13

Preview

Ap pend ix C Lear nin g P ro cesses and Ins tr uct or Guide Co nvent ion s

Using the Learning Processes...(continued)

Review
A Review is used to reiterate main concepts and can be used to gain feedback,
assess learning, review critical material, or transition from one instructional unit to
another.
A Review may be used to:

Review the results of a Guided Practice, Case Study, or Exercise.


Seek feedback on the pace or level of instruction.
Provide self-assessment.
Present assessments that can be stored and graded in e-learning delivery.
Reinforce content.

The following table lists the supporting information that may be included in the
Instructor and Student Guides for this learning process.

Instructor Guide Contents


Review icon Questions Answers Main concepts For e-learning materials, reference to

Student Guide Contents


No Student Guide contents

the question or assessment that was enabled for the session

Teaching tips
9 Use questions to review content and not restate objectives.

9 If students exceed the course prerequisites and/or demonstrate mastery of the key concepts, consider excluding some questions. 9 For e-learning delivery, refer to the Course Setup Guide for instructions to create the Question Set and add it to the live session materials. 9 When delivering an e-learning Question Set, allow for transmission time before tallying the responses.

C 14

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Preview

Ap pend ix C Lear ni ng P ro cesses and Ins tr uct or Guide Co nven tio ns

Using the Learning Conventions


This section includes the relevant information about the standard curriculum development conventions and icons. Use this section as a tool to prepare to deliver the course successfully.

What are conventions?


Conventions are rules that govern how to display specific types of information. The following are standard curriculum development conventions and icons that may be used within this courseware.

Caution

Cautions are short, descriptive paragraphs meant to warn of potential pitfalls or areas where students could experience problems during class or back on the job.

Critical classroom setup procedures that the instructor must complete before presenting subsequent content. Instructor Task

Note: Notes appear in the Instructor Guide and Student Guide and can be used to note differences in content.

Notes for the Instructor: Special notes the course developer wants to communicate to the instructor regarding delivery, classroom strategy, classroom tools, exceptions, and other special considerations.

Tip: Tips provide additional guidance, or a hint, for students about a topic or task.

Dev elop ing IB M Lot us Dom ino 6 A ppl icat ions : F ound ati on S kil ls

C 15

Preview

Ap pend ix C Lear nin g P ro cesses and Ins tr uct or Guide Co nvent ion s

C 16

Deve lopi ng IBM Lot us D omin o 6 App lica tio ns: Fou ndat ion Ski lls

Copyright IBM Corporation 2002. All rights reserved.

Lotus software IBM Software Group One Rogers Street Cambridge, MA 02142

IBM Lotus Domino Designer Release 6 Product Code ND510

Printed in the USA

Вам также может понравиться