0% found this document useful (0 votes)
67 views

Part 1 - Getting Started

This is the first in a four part series on the basics on developing databases with Domino Designer 7. In this lesson you will explore The Domino Designer client, The Work environment where database designers create and modify design elements.

Uploaded by

notbugged
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Part 1 - Getting Started

This is the first in a four part series on the basics on developing databases with Domino Designer 7. In this lesson you will explore The Domino Designer client, The Work environment where database designers create and modify design elements.

Uploaded by

notbugged
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 79

Part 1 - Getting Started with Domino Databases

Overview

Introduction This is the first in a four part series on the basics on developing databases
with Domino Designer 7. This first part will provide you with the
information you need to know to get started developing Domino databases,
from the basics of working in the Designer client to creating a functional
database.

In this part This part contains the following lessons:

Topic See Page


Lesson 1: Working in the Domino Designer Client 2
Lesson 2: Creating Domino Databases 12
Lesson 3: Creating and Modifying Forms 21
Lesson 4: Working with Fields 45
Lesson 5: Creating and Modifying Simple Views 69

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 1
Lesson 1: Working in the Domino Designer Client
Overview

Introduction In this lesson you will explore the Domino Designer client. The Domino
Designer client is the work environment where database designers create and
modify design elements.

Objectives At the end of this lesson you should be able to:


• Recognize the components of the Domino Designer client.
• Navigate within the Domino Designer client.

In this lesson… This lesson contains the following topics:


• The Domino Designer client
• Components of the Domino Designer client
• The Design pane
• The Work pane
• The Programmer’s pane

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 2
The Designer Client

Introduction The Domino Designer client is the design environment for creating and
modifying design elements in a Notes application. The Domino Designer
client can be installed separately or as part of the All Clients option in the
installation process. The executable that launches the Designer Client is
DESIGNER.EXE. The Designer client software is currently support on the
following platforms:
• Windows 95/98
• Windows NT Workstation 4.0
• Windows 2000
• Macintosh

Launching the The Domino Designer Client can be launched in several ways:
Designer Client

Method Action
To open a specific database Right-click on the database icon and choose
from the client desktop or Open in Designer from the shortcut menu.
bookmark bar
From the bookmark bar in
the client Click on the icon for the Designer Client -
From the Start Menu Select Start -> Programs -> Lotus
Applications -> Lotus Domino Designer

Supported The Domino Designer allows you to work with a variety of scripting or
Languages programming languages within one environment. The following languages
are supported:
• Notes formula language
• LotusScript
• JavaScript
• Java

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 3
Components of the Designer Client

Components of The Domino Designer client is comprised of multiple panes. Not all panes
the Designer will be available at all times. Each of the panes can be resized. The content of
each of the three panes will vary depending on the current context.
The graphic below is from the Domino 7 Designer Help.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 4
The Design Pane

Definition The Design pane is on the left side of the Designer client. It is similar to the
bookmark window in the Notes client.

You click the title of the databases to expand the list of design elements.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 5
The Design Pane, Continued

The Design List When a design element from a database is selected, the elements of that
particular type are displayed on the right of the screen. In the graphic below,
the Forms entry has been selected on the left, so the forms in the database
display on the right. The display on the right shows information about the
design element, such as its name and when it was last modified.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 6
The Work Pane

Definition The Work Pane is on the right side of the Designer client. This is where the
designer will actually create and modify design elements such as pages, forms
and views. The contents of the Work pane are context sensitive. For
instance, if you select the forms element for a database from the Design pane,
the list of forms is displayed in the Work pane. When you double-click a
form, it is displayed in the Work pane. In the graphic below, the Main Topic
form has been selected in the Design list and is displayed in the Work pane.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 7
The Programmer’s Pane

Definition The Programmer’s pane is where the designer associates programming code
or formulas with objects within a design element.
For example, if you want the field CreateDate to calculate the current date,
this formula would go in the Programmer’s Pane.

Two panes in The Programmer’s Pane is comprised of two panes:


one
• The InfoList – on the left, shows information about the design element
• The Script area – on the right, where formulas are entered

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 8
The Programmer’s Pane InfoList

Definition The InfoList is the left part of the Programmer’s pane. It contains an Objects
Tab and a Reference Tab.

Objects Tab The Objects tab lists each object available within a design element, so the
contents of the Objects tab will vary depending on which design element is
currently open. Each object can be expanded to display the different events
of the object that can be programmed. For example, a field may have several
scripts or formulas associated with it.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 9
The Programmer’s Pane InfoList, Continued

Objects Tab Each object event has an icon associated with it to indicate the type of
Icons formula or script that is accepted for programming that event. Some events
may accept more than one type of formula; the icon used will represent the
most common formula used with the event.

Icon Language
Notes Formula Language
LotusScript
JavaScript

When an event has a formula already entered the icon will appear “filled in”.
For example, the Notes Formula icon will appear like this - .

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 10
The Programmer’s Pane InfoList, Continued

Reference Tab The Reference Tab is an access point to online Help information from within
the Domino Designer client. The items listed on the Reference tab will
depend on the event selected on the Objects Tab.

Selection Options Available


Notes Formula Language

LotusScript

JavaScript

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 11
Lesson 2: Creating Domino Databases
Overview

Introduction When you decide to create a new database, you have several options available
to you for the development process. In this lesson you will explore each of
these methods, and the advantages and disadvantages associated with each.
Additionally, you will review many of the available design elements that you
can create within a database.

Objectives At the end of this lesson you should be able to:


• Create a database using a Notes template.
• Create a database using the design of an existing database.
• Create a database from scratch using the Blank template.

In this lesson… This lesson contains the following topics:


• Creating a Database from a Template
• Creating a Database an Existing Database
• Starting a Database from a Blank Template
• Components of a Domino Database
• Exercise 2.1 – Creating the Time-Off Requests Database

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 12
Creating a Database from a Template

Using templates Database templates are files with an NTF extension. Creating a database
from a template can save a substantial amount of development time. You may
only need to make a few modifications to the template rather than starting the
development process from scratch.

New Database The following dialog box appears when you create a new database:
Dialog Box

Server The default is Local. This can be changed to any


server where you have access to create a new
database.
Title The title appears on the database icon and
bookmark. It is limited to 32 characters.
Filename By default, same as the title.
Template Server Location to look for available templates. There
may be more available on a server than on local.
Template List Available templates. Files with an NTF extension
Show advanced Some templates are designated as advanced, such as
templates the Certification Log template.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 13
Creating a Database from a Template, Continued

Caution: When a database is created from a template, the property to Inherit future
Inheriting design changes is automatically enabled.
Design Changes

This indicates that the newly created database will have a connection back to
the template from which it was created. If the template and the database are
located on the same server, the database will automatically be updated to
reflect the design of the template when the Design task runs on the server. By
default, Design runs at 1:00 AM. Even if the template has not changed, the
design of the database will be modified to match the design of the template.
This could result in design changes made in the database being undone by the
Design task. This option can be disabled when the database is created or later
by accessing the Database properties box.

Procedure Follow these steps to create a database from a template.

Step Action
1 Open the Domino Designer client
2 Click the icon labeled Create a new database…
OR
From the menu, choose File -> Database -> New
3 Enter the location for the new database, Local or a server name.
4 Enter the database title.
5 Enter a filename or accept the default.
6 Select a template from the list.
Note: If you want to read more information about a template,
click the button.
7 Click the OK button.

Note: This procedure can also be completed from the Notes client. If it is
performed in the Designer client, the newly created database will
automatically be opened in the Designer and a bookmark will be added to the
Recent Databases folder.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 14
Creating a Database from an Existing Database

Copying the Similar to creating a database from a template, copying the design of another
design of a database can save time in the development process. You can choose to copy
database only the design elements from an existing database, leaving all the
documents in the original database only.

Procedure Follow the steps below to create a new database using the design from an
existing database:

Step Action
1 In the Notes Client, right-click a database icon or bookmark.
2 From the shortcut menu, choose Database -> New Copy
3 In the dialog box that follows enter a title for the database
4 Enter a filename for the new database.
5 Select the option to copy the Database design only
6 Click OK.

Note: When you copy the design of an existing database, the new database is
not configured to automatically inherit design changes from the database you
copied.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 15
Creating a Database from the Blank Template

Using the Blank There are times when a template or existing database does not contain desired
template design elements. If this is the case than you can create a database from
scratch, using the Blank template. The Blank template contains no design
elements except an untitled view that lists only the order number of each
document as it is created. For example, 1, 2, 3, etc. A database must contain
at least one view in order for the database to open correctly, so this untitled
view is required.

Procedure To create a database using the Blank template, follow these steps:

Step Action
1 In the Notes client or the Designer client, select File -> Database -
> New from the menu.
2 Enter the name of the server where the database will reside.
3 Enter a title for the database.
4 Enter a filename for the database or accept the default.
5 Select the template –Blank-. This will be the default selection.

6 Click OK. The database file will be created.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 16
Components of a Domino Database

Introduction A Domino database is generally comprised of:


• access control list – ACL
• design elements – design notes
• documents – data notes (created by users)
The method you use to create your database will determine its initial contents.
For example, a database created from a template or existing database will
contain several design elements, such as forms, views, and pages. A database
created from the Blank template will only contain one empty view and an
ACL. All these items are stored as one file with an .NSF extension.

Design The following list describes many of the design elements that are available to
Elements a database designer. They are listed in the order that they appear in the
Design list. They will not all be addressed in this course.

Element Description
Framesets A frameset is a collection of frames that is used to add structure
to your Notes database. A frame is one section, or pane, of the
larger frameset window and is independently scrollable.
Pages A page is used to display information only, such as text and
graphics.
Forms Forms are used to collect information from the user and to
display information to the user. The form provides the structure
for creating and displaying documents. A form will almost
always contain fields for data input, both by the user and by
formulas. When a user completes a form and saves it, the
information is saved as a document; the document is generally
stored separately from the form. When a user opens a saved
document the form is used to display the data on the screen.
Views A view is a list of documents contained within the database. A
view can be sorted to show the documents in a certain order, for
example, alphabetical by author’s name. A view can also be
categorized to group related documents together. Every
database must have at least one view or folder, but most will
have several views to display the documents in different ways.
A view will commonly display some of the information that is
stored in fields within the documents.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 17
Components of a Domino DatabaseDatabase, Continued

Design Elements (continued)

Element Description
Folders Folders are containers used to store related documents.
Folders have many of the same design properties as views.
The difference between them is that views always have a
selection formula that collects and displays documents
automatically while a folder is populated by a user or program
adding documents to it.
Agents Agents are used to complete user-activated tasks or
background tasks in any part of a Domino application. Agents
can be simple, such as moving documents to a folder, or
complex, using Java programs to run multiple tasks at
scheduled times.
Web A Web service is a self-contained, self-describing, modular
Services application, based on XML, that can be published to and
invoked from the Web. Web services are an advanced design
element, requiring a knowledge of Java and/or LotusScript and
web clients.
Outlines Outlines provide a way for users to navigate an application.
Outlines let you maintain a single navigational structure for the
database. Outlines contain entries that allow users to navigate
the views and folders in your database, perform actions, or link
to other design elements and URLs.
Subforms A subform is a collection of form elements that are stored as a
single object. Subforms can contain most of the same
elements as regular forms. Subforms save redesign time
because you can reuse the subform on multiple forms. When
you change a field on a subform, every form that uses the
subform is updated.
Shared In addition to creating fields directly on a form, you can create
fields a shared field and insert it onto multiple forms. Shared fields
are useful when you would like to reuse the same field
definition in many forms, such as a document author field or a
date field.
Shared View columns can be shared, allowing you to easily insert
columns them into multiple views.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 18
Components of a Domino Database, Continued

Design Elements (continued)

Element Description
Actions Actions are used to automate some portion of an application,
commonly a menu command. Actions can be used on forms,
pages or views to set up a user-activated task, such as printing,
saving or changing field values. You can make the action
available in the Actions menu or as a button in the action bar.
Script A script library is a place for storing and sharing common code
libraries to be used within a database. You can create script libraries
for LotusScript, JavaScript or Java.
Image Image resources are graphic files that are stored in the
resources database. They can be inserted into multiple forms or pages,
saving space over pasting them in multiple times.
Data A data connection resource is created to establish a link
connections between the Domino database and an external application,
such as a DB2 or Oracle database.
Database The database resources include the:
resources • Icon – the graphic used to identify the database
• About Database document – an optional document used to
describe the functionality of the database for users.
• Using Database document – an optional document used to
give greater detail to the users of a database, such as how
to fill out forms and how and when agent run.
• Database script - database scripts are LotusScript programs
that are associated with events for the Database object,
such as opening or closing a database.
Synopsis The Design Synopsis dialog box lets you generate a detailed
report on a particular database and selected design elements.

Who can create All the above design elements can be created by those with Designer access
what? in the ACL. In addition, the ACL may be configured to allow users with
lower access to create some design elements for personal use, such as folders
and private views.

Which elements Not all databases will contain each of these design elements. It is up to the
to use designer to determine which elements are required to best meet the needs of
the database users.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 19
Exercise 2 .1
Creating the Time-Off Requests Database

Introduction In this exercise you will create a database to be used in the exercises
contained in this and subsequent parts.

Instructions Perform the steps to complete the following:


1. Open the Domino Designer client.
2. Create a new database. You may create this database on your local hard
drive or on a server if you have the access rights to do so.
3. Use the name Time-Off Requests as the title and TimeOff.NSF as the
filename for the database.
4. Use the –Blank- template.

Results At the end of this exercise you should have a new database named Time-Off
Requests. You should see the following in the Domino Designer client.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 20
Lesson 3: Creating and Modifying Forms
Overview

Introduction Now that you have a new database, you will want to add design elements to
make it fully functional. One of the key design elements of any database is
the form. A database must have at least one form to allow users to enter
information. In this lesson, you will learn how to create and modify forms to
provide the user an effective method for data entry.

Objectives At the end of this lesson you should be able to:


• Create a new form.
• Access and set form properties.
• Add static text to a form and apply text properties.
• Use tables to align text.

In this lesson… This lesson contains the following topics:


• What is a Form?
• Creating a New Form
• Naming and Saving Forms
• Form Properties
• Text and Text Properties
• Previewing the Form
• Creating and Formatting a Basic Table
• Table Properties

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 21
What is a form?

Definition A form is the design element that controls the structure and format of
documents that will be created by users. Forms collect information from the
user and are also used to display or present that information to the user.
Forms consist of the following:
• Static elements such as text, tables and graphics to guide the user through
the form and to improve its appearance
• Fields that accept user input or use a formula to compute data

Relationship A form is created by the database developer. Every time a user creates a new
between forms document, the form is used to control the layout of the document. Forms are
and documents created by designers; documents are created by users.
By default, when a form is filled out by the user and saved, the data is stored
separately from the form. Notes stores the name of the form that was used to
create the document. When the document is opened by a user, the appropriate
form is called to display the document data.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 22
Creating a new form

Procedure To create a new form complete the following steps:

Step Action
1 Open the database in the Designer client.
2 From the list of design elements, select Forms.
3
Click on the button .
OR
From the menu choose Create -> Design -> Form.
4 The new form will automatically be opened into the Work pane.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 23
Naming and Saving Forms

Naming a form When naming a form there are rules to follow. Form names:
• are case sensitive
• cannot exceed 264 characters
• show only the first 64 characters on the Create Menu

Using a form Though it is not required, it is a recommended practice to use an alias when
name alias naming forms. The name is what the users will see on the Create menu.. The
alias is stored in the Form field, which is automatically created by Notes to
store the name of the form. The alias is used by the designer to refer to the
form in formulas from other design elements in the database.
There are advantages to using a form name alias. The name that the user sees
may be quite long, allowing the user to easily recognize which form to use.
The alias can be an abbreviated version of the name, making it easier for the
designer to refer to the form in formulas. In addition, if the name of the form
needs to be changed or translated for international use, the alias can remain
the same so that all formulas continue to work. If one was not initially used,
it can be added later.

Procedure: Once the form has been created, follow these steps to name it:
Naming

Step Action
1 Right click and choose Form Properties from the shortcut menu.
2 In the Name box, type the name of the form.
3 (Optional) Follow the name with a vertical bar ( | ) then the alias.
4 Press Enter or click the check - -to accept the name.

Procedure: Once the form has been named, choose one of these options to save it:
Saving

Step Action
1 From the menu, choose File -> Save
OR
Click the Save icon
OR
Use the keyboard combination of Ctrl + S

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 24
Exercise 3.1
Creating the Time-Off Request Form

Introduction In this exercise you will create the main form of the database. This form will
be used in several future exercises.

Requirements Use the database and form names specified; these names will be referenced
& Resources throughout the course.

Instructions Perform the steps to complete the following:


1. Open the Time-Off Requests database in the Domino Designer client.
2. Create a new form in the database.
3. Name the form Time-Off Request.
4. Use the alias TOR.
5. Save the form.

Results You should see the form listed in the Designer client when you select Forms
from the Design list of the Time-Off Requests database. The Work pane will
list the Form name, alias and other information about the form.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 25
Form Properties

Introduction Form properties control many aspects of the form in the database. Some form
properties will have an immediate effect on all documents in the database that
were created with that form, while other properties will require documents to
be updated manually or with an agent. Agents are discussed later.

Procedure To access form properties while the form is open in the Designer client,
complete the step for your preferred method.

Method Step
Mouse Right click anywhere on the form and choose Form
Properties from the pop-up menu.
Icon Click the Display Infobox icon -
Menu Choose Design -> Form Properties
Keyboard Hit Alt-Enter.

Note: When the properties box is open, you can select the design element
properties you want to view by using the drop-down list at the top.

Dynamic The Properties box is dynamic, not just for form properties, but also for text,
Changes fields, views, actions and other design elements. When a property is set or
changed, you do not need to close the Properties Box for the change to take
effect.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 26
Commonly Used Form Properties

Introduction The Form properties box is divided into seven tabs. The number of tabs in a
Properties box will vary among the design elements. The function of each of
the tabs is represented by an icon on the tab itself, but also has a name that is
visible when the mouse is held over it.

Some of the form properties are used more frequently than others. Whether a
property is activated will depend on the purpose and required functionality of
the form. Here we will look at some of the more common form properties on
the first 5 tabs and what impact they have on the behavior of the form.
Additional properties will be covered in later in the course.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 27
The Form Info Tab

Form Info The first tab in the Form Properties box contains commonly used settings that
affect the way the form behaves in the database.

Property Function
Name The name of the form and the alias, if one is used.
Comment This is strictly a text field and does not have an impact
on the form. The comments will be displayed in the
Designer client in the view of forms.
Type The choices are Document, Response and Response to
Response. Every database must have at least one
Document type form.
Display Theses two settings determine where the form name will
be listed.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 28
The Form Info Tab, Continued

Form Info (continued)

Versioning By default when a document is edited only the most


recent version of the document is saved in the database.
Versioning allows all instances of a document to remain
in the database.
Default database If selected, the form will be used to open any document
form for which the proper form cannot be located in the
database.
Store form in If selected, every time the form is used to create and save
document a document, the form and the document will be saved as
one item. This will cause the database to increase
greatly in size.
Automatically This field is used to determine when Computed fields
refresh fields recalculate. If selected the computed fields will
recalculate as the user tabs through the form, so the
results of Computed field formulas will be seen
immediately. If this field is not selected, the Computed
fields will not recalculate until the form is saved or
manually refreshed.
Anonymous form If this field is not enabled, Notes automatically includes
a field on every form called $UpdatedBy. This field will
keep track of the users who edit the form, including the
creator. If this field is selected, Notes creates a
$Anonymous field instead and sets its value to “ “.
No initial focus By default, when a user is creating a new document, the
cursor will appear in the first editable field on the form.
Enabling this setting will prevent the cursor from
appearing.
Sign documents This setting forces creation of a $Signature field
that use this form containing the encrypted signature of the user id that
creates a document using this form.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 29
The Form Info Tab, Continued

Form Info (continued)

Render pass When you check "Render pass through HTML in Notes,"
through HTML Domino passes all data on the page, form, or subform
in Notes directly to the browser. Domino ignores embedded
navigators and folders and any embedded views that
don't have "Render pass through HTML in Notes"
selected.
Do not add field Check this setting to prevent new field names on this
names to index form from being saved in the field index. If you do not
check this setting, field names are saved to a table and
stored in memory. Storing the name in memory allows
the field name to appear in places such as the "Add
Action" dialog box.
Allow Autosave This allows a document created with this form to be
automatically saved every X number of minutes.
Autosave must also be enabled by the user in the Notes
client in the User Preferences.
Conflict handling This setting determines how conflict documents will be
handled by Domino. The options are to:
• Create conflicts
• Merge conflicts
• Create no conflicts
Refer to the Replication topic in the Domino
Administrator Help database for additional information.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 30
The Defaults Tab

Defaults Tab These settings will affect the default behavior of the documents that are
created with this form.

Property Function
On Create These two choices will determine if the document
inherits any information from the document that was
open or selected at the time of creation. The primary
example of this is enabling a response document to
inherit information from a parent document.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 31
The Defaults Tab, Continued

Defaults Tab (continued)

On Open These two choices determine how the document will


behave when opened. Edit mode will only be enabled if
the user opening the document has the access required to
edit the document. Once Show context pane is selected,
you can then choose either Parent or Doclink.
On Close Selecting this property will cause the following dialog
box to appear when the document is closed:

On Web Access When you select the "Treat document contents as


HTML" property, Domino passes all data on the page or
form directly to the browser.
When “Generate HTML for all fields” is checked, it
generates HTML information about hidden fields on a
form. This allows document behavior in a Web
application to more closely match document behavior in
a Notes application.
The link options allow you to select the colors for the
different stages of the link that displays from browser.
Data source These options are used when you have a data connection
options to another application, such as a DB2 database.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 32
The Launch Tab

Launch The third tab lists the properties that control the behavior of forms and
Properties documents when they are opened.

Property Function
Auto Launch This setting determines what will be automatically
launched when a document created with this form is
opened. The selection is not launched when the form is
first used to create a document, but only after the
document has been saved in the database and is
subsequently opened by a user.
Auto Frame This property affects both the form and the documents
that are created using the form. If set, it will launch the
form or document into the specified frameset and frame.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 33
The Form Background Tab

Form This tab lists the properties that affect the background of the form.
Background

Property Function
Color Use this property to select a solid background color for
the form.
Graphic or Allows the designer to specify a graphic file or image
Resource resource to be used as the background for the form.
Options Additional options for controlling background display.
The selection to “Allow users to change these
properties” allows the user to make changes to the
background of a document to which that user has editor
access. This does not change the property on the form
itself, but only on the document that the user modified.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 34
The Header Tab

Header The Header tab allows the designer to designate an area at the top of the form
Properties that will not scroll off the screen when the user scrolls to the bottom of the
form. An example of this is the Memo form in the mail template; the
addressee area is in a header and does not scroll off the screen regardless of
how long the memo is.

Property Function
Add header to This property must be selected to create the header area
form on the form.
Size Properties to control the size of the header.
Border Properties to control the border under the header.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 35
Exercise 3.2
Setting Properties on the Time Off Request Form

Introduction In this exercise you will set form properties on the Time-Off Request form.

Instructions Complete the following steps:


1. Open the Time Off Request Form that you created in Exercise 3.1 in the
Domino Designer client.
2. Set the following form properties:
• Add a brief comment to describe the purpose of the form.
• Select the property to make the form the default form for the database.
• Set the property to Automatically refresh fields.
• Select a light background color for the form.
3. Save and close the form.

Results The Work pane will now show a star next to the form name to indicate that it
is the default form for the database. Additionally, the comments will be
displayed.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 36
Text and Text Properties

Text basics When the form is displayed in the work pane, placing text and navigating are
very similar to a word processing document. You will place text on the form
to guide the user in the process of completing the form. For example, you
will want to label the fields in a way that the user will know what data to
enter. The static text can be a few characters or several paragraphs. As with
all design elements in Domino the static text that is placed on the form by the
designer can be formatted with a variety of properties.

Text Properties The text properties box has 6 tabs. All available properties can be accessed
Box from the Properties box. Most can also be accessed through SmartIcons or
the Text menu commands.

Dynamic As mentioned earlier, the Properties Box is dynamic. There is no need to


changes close the box as you move from text entry to text entry to set properties. It is
much more efficient to keep it open. Your changes will be displayed
immediately.

Accessing Text To access properties for text complete one of the following:
Properties
Method Step
Mouse Right-click on the selected text and choose Text Properties
from the short cut menu.
Icon Select the text and click the Properties Icon -
Menu Select the text and choose Edit -> Properties

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 37
Previewing the Form

Introduction Previewing a form is a quick way of looking at the form as it will appear to
the user. You can preview it in the Notes client or one of the browser options.
When you are done with the preview, you should close the preview window.
You will be left in the Notes client rather than being returned to the Designer
client. You will need to click on the Designer client from the Task Bar or
user Alt-Tab to switch programs.

Procedure To preview the form complete the following steps:

Step Action
1 Save the form.
2 From the menu, choose Design -> Preview in Notes or Preview in
Web Browser.
OR
Select the appropriate icon from the right side of the menu bar:
Icon Previews in
Notes Client
Notes browser
Internet Explorer

Note: If you have not saved the form before you choose one of the preview
options, you will receive the following message:

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 38
Creating and Formatting a Basic Table

Introduction A great way to align text on a form, particularly for multiple columns, is the
use of a table. A table is always a better way than tabs to achieve columns on
the form. If tabs are used, when a user places information into a field that has
been positioned on the form by tabs, the fields may shift unexpectedly due to
the amount of information entered by the user, particularly when viewed in a
browser. This shift will not occur when the text and fields are positioned
using a table.

Procedure To create a basic table, complete the following steps:

Step Action
1 Position the cursor on the form where the table should appear.
2 From the menu select Create -> Table.
OR
Click the Insert Table icon .
3 From the Create Table box select the option for a basic table.

Note: Basic is the default type of table.


4 Select the number of rows and columns. This can easily be
changed once the table is created.
5 Click OK.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 39
Table Properties

Introduction The properties you will adjust will depend on the effect you are trying to
achieve with the table. Not all table properties will apply to all types of
tables. To access table properties the cursor must be located in a cell of the
table or several cells can be selected.

Table Layout The Table Layout tab allows you to control the size and spacing of the cells
of the table and the table’s position on the screen.

The properties marked with an * apply to the entire table regardless of the
cells selected.

Cell Borders The Cell Borders tab allows you to control the lines around the individual
cells of the table. The style and color apply to all cells.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 40
Table Properties, Continued

Table/Cell The Table/Cell Background Tab allows you to set colors and images for the
Background background of the individual cells. If you want the same color on multiple
cells, multiple cells must be selected.

Table Borders The Table Borders tab allows you to set a border or outline around the outside
of the table. It does not affect individual cells, only the table as a whole.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 41
Table Properties, Continued

Table Margins The Table Margins Tab allows you to control placement of the table on the
form using the margins and how text should wrap inside and outside the table.

Row and The last two tabs of the table properties affect the specialized table formats.
Programming These table formats and their properties will be covered in Part 2 – Adding
Functionality to Forms.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 42
Exercise 3.3
Adding text and a table to the Time Off Request Form

Introduction In this exercise you will add text and a table to the Time-Off Request form.

Instructions: Complete the following steps:


Adding text
1. Open the Time-Off Request form in the Designer client.
and a table
2. Add a title to the form, such as Time-Off Request. Format the title with a
larger font.
3. Under the title, insert a basic table with 2 rows and 2 columns.
4. Add text to the table and format it such that it resembles the following:

Note: The cell borders of this table have been removed; the dotted lines
remain so you can easily see where the table is locate.
5. Adding text for the following:
• The type of leave being requested
• The start date of the time off
• The end date of the time off
• Comments from the requestor
• Status of the request
• Comments from the manager
6. Optional - set Table properties for the following:
• Add a background color to the table using either a solid or gradient
• Add a border around the outside of the table
7. Save the form.
8. Preview the form in the Notes client and from a web browser.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 43
Exercise 3.3, Continued
Adding text and a table to the Time Off Request Form

Results After completing this exercise your form should resemble the following:

Note: The line under the title in this example is a horizontal rule, created
from the menu option Create -> Horizontal rule. Your form may look
different from this example. You may use the text placement and properties
of your own choosing.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 44
Lesson 4: Working with Fields
Overview

Introduction A field is a named area on a form that allows information to be added to the
form. Without fields, forms could only display information. Once
information is added to the fields, the form can then be saved as a document.
In this lesson you will add several types of fields to your Time-Off Request
form.

Objectives At the end of this lesson you will be able to:


• Recognize and define available field properties for the field data types.
• Create new fields and set field properties.
• Create choice fields that limit user input.
• Convert an existing field into a shared field.

In this lesson… This lesson contains the following topics:


• What is a Field?
• Fieldnames
• Creating a Field
• Field data types and basic properties
• Text and Rich Text Fields
• Number Fields
• Date/Time Fields
• Choice Fields
• Readers, Authors and Names Fields
• Password and Formula Fields
• Shared Fields
• Creating and Inserting Shared Field
• Changing the Properties of a Shared Field

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 45
What is a Field?

Definition A field is a named area on a form that accepts information from the user or
that calculates information based on a formula. Without fields, forms would
only be able to display information, not capture it.

Appearance to When a user is entering information on a form the fields can appear in several
the user different ways to the user, such as brackets or text boxes.

Examples By default, fields use Notes Style, a blank space marked off by brackets. The
following is an example of the Notes Style:

If you choose the field property Native OS style for an editable field, such as
Text, Authors, Readers, Names, or Number, the field appears on the
document as a fixed-size outlined box. The following is an example of the
Native OS Style:

Appearance to When a designer is creating fields and placing them on the form, they look
the designer different than when the user sees them. They appear with a box around them
and an icon to represent the field data type.

Examples Notes Style - Brackets:

Native OS Style – Box Outline:

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 46
Fieldnames

Introduction The names that are selected for the fields on a form should be considered very
carefully. Fieldnames are frequently used in wide variety of formulas
throughout the database. Giving a field a confusing or misleading name can
cause problems for the designer in the future.

Rules for There are several rules that apply when naming fields. A fieldname:
naming fields
• Cannot contain spaces
• Must begin with a letter or the dollar sign ($) or an underscore ( _ )
• Can contain numbers
• Must be unique on the form
• Is not case sensitive

Conventions for In addition to the rules for fieldnames that must be followed, there are also
naming fields recommendations or conventions that apply.
• The fieldname should be descriptive but brief.
• It is common to use initial capital letters for each word in the name.
Example: DepartmentName

Reserved field Designer recognizes certain field names that you can use to automatically add
names functionality that you would otherwise have to program yourself. For
example, to design a form with mailing options, you add mail fields with
reserved names such as SendTo and CopyTo to a form. Designer recognizes
the fields and provides the interaction with the mail router that routes and
delivers the mailed document.
For additional information on reserved fields see Domino Designer 7 Help,
Search view, Predefined fields with built-in functionality.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 47
Creating a Field

Procedure To create a new field complete the following steps:

Step Action
1 Open a form in design mode
2 Position the cursor at the desired location for the field.
3 From the menu choose Create -> Field
OR
Click the Create Field icon -
4 Enter a fieldname in the Field Properties box.

This dialog box will appear automatically when a field is created.


Until the designer enters a name for the field, it will use the name
Untitled.
5 Set field properties as required.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 48
Field Data Types and Basic Properties

Introduction Once the field is created the designer decides what type of data it should
accept. The type of data that the field accepts will control the way the field
behaves, the types of formulas that it can use, and the available properties.

Data Types There are 17 available data types for fields. When viewed in the Designer
client, the field type is represented by an icon next to the field name, which is
surrounded by a border.

Basic Each field, regardless of type, has certain properties. The data type of the
Properties field will determine which specialized properties are available.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 49
Field Data Types and Basic Properties, Continued

Basic The table below describes the tabs of the Field Properties box that are
Properties available for all fields. The properties that are specific to the different data
types are discussed on following pages.

Tab Tab Name Properties


Field Info Fieldname, data type, style.
Control Formatting of data. The options available
on this tab will vary greatly depending on
the data type of the field. For example, a
text field will have few control options, but
a number or date field will have many.
Advanced Field help, multi-value separators and
security options.
Font Font size, style and attributes.
Alignment Alignment, bullets and spacing.
Hide When Option to hide fields under specified
conditions.
Field HTML Specify HTML tags.

Procedure The field properties box will automatically open when a field is created. To
access the properties for an existing field complete one of the steps below:

Method Steps
Mouse Right-click on the field name and select Field Properties
from the shortcut menu.
OR
Double click on the field name.
Icon Click once on the field then select the Properties icon
Menu Click once on the field then choose Design -> Field
Properties.

Editable vs. Each field can be editable or computed. The user enters information into an
computed editable field; a formula or populates a computed field.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 50
Text and Rich Text Fields

Text fields When a field is created on a form the default data type is text. A text field can
accept input of any character from the keyboard, including letters, numbers
and symbols.
A text field can accept numbers as input, but the field cannot be used in
mathematical formulas. You might use a text field to hold phone numbers but
you would not want to use a text field for price information. The data in a
text field can be converted to a number or date, if needed for use in a number
or date formula.
The contents of a text field cannot be formatted by the user. For example, the
font size and color chosen by the designer cannot be altered by the user in a
text field. The maximum size of a text field is 15 KB.

Rich text fields A Rich Text field can accept any information that a Text field can plus the
following:
• Formatting
• Graphics
• Tables
• Attachments
• Sections
A rich text field should be used when the elements listed above are required.

Limitations:
• The contents of a rich text field cannot be pulled into a view.
• A rich text field cannot be combined with other data types in a formula.
There is no setting to control the amount of information that a user can enter
into the rich text field. The maximum size allowed is 1 GB.

Rich text lite Rich text lite fields are rich text fields that allow the Designer to specify
fields which type of objects can be allowed in the filed, such as attachments or
graphics. The user will see a helper icon and down arrow next to the field.
Clicking the icon gives the user a fast way to add an object into the rich text
lite field. The elements listed in the drop-down menu are the only elements
the user is allowed to insert into the rich text lite field.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 51
Number Fields

Number A number data type should be used for all fields that might be used in
mathematical formulas. If the user enters text into a number field, he will be
allowed to type the information in the field, but when the document is saved
or refreshed the following error message will be displayed:

Number Many choices are available for formatting a number field. The preferences
Formats can be determined by the user’s OS settings or can be customized by the
designer in the Field Properties.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 52
Date/Time Fields

Date/Time As with the Number field, the designer can format the field to use the user
settings or customize the field.

Calendar/Time Date/Time fields can use a Calendar/Time control for data entry, allowing
Control users to select from a pop-up. You set the property on the Field Info tab.

Date Entries When a user enters data into a Date/Time field Notes will attempt to interpret
and Errors the data as a date or time. If Notes cannot interpret the data as a date or time,
the error message “Unable to Interpret Time or Date” will be displayed. There
are 3 text entries that are acceptable in a Date/Time field:
• Today
• Tomorrow
• Yesterday

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 53
Exercise 4.1
Adding Basic Fields to the Time Off Request Form

Introduction In this exercise you will add several fields to the Time Off Request form.

Suggestions Use the field names listed in the table, because they are referenced by these
names in future exercises.

Instructions Add the following fields to the Time Off Request form:

Field description Field Name Requirements


Name of department ManagerName This field should accept
manager plain text.
The date the document CreationDate This field should accept
was created dates only. Format the
date as you desire.
The start date of the StartDate This field should accept
leave request dates only. Select the
property to allow the
user to select the date
from a calendar pop-up.
The end date of the EndDate This field should accept
leave request dates only. Select the
property to allow the
user to select the date
from a calendar pop-up.
Comments of the RComments This field should accept
requestor text, file attachments
and graphics.
Comments of the MComments This field should accept
manager text, file attachments
and graphics.

Results At the end of this exercise the Time Off Release form should contain 6 fields.
When previewing the form in the Notes client, you should be able to enter the
appropriate data type into each of the fields.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 54
Choice Fields

Introduction The purpose of a choice field type is to present a list of choices for the user to
select from. The interface options for a choice field include:
• Dialog List
• Radio Buttons
• Checkboxes

Choice Field The Control tab of the properties box provides options for the choice fields.
Properties

Display Controls the appearance of the field to the user. Options


will vary according to the type of list selected.
Choices This is the list of choices that will be available to the user.
The default method for creating this list is to enter the
choices in this text box. You cannot use commas when
typing the choices in this list.
Options Controls interaction between the field and the form. The
options will vary according to the type of list selected.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 55
Choice Fields, Continued

Refresh All the choice fields have options to control the way the field behaves as the
Options user makes a selection from the choices in the list. The two options that
control this are described below:

Option Function
Refresh fields on This field property refreshes all the fields on a form
keyword change after a user selects a value in a choice field that has the
property enabled. This is valuable when the other parts
of the form are dependent on the selection made in the
list field.
For example, the Location document in your Personal
Address Book uses this setting to change the fields
available on the Basics tab according to the Location
type selected.
If this option is not enabled, the update will not occur
until the document is saved or refreshed.
Refresh choices on This field property refreshes the list of choices when a
document refresh user refreshes the document by choosing View –
Refresh or by pressing the F9 key.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 56
Choice Fields, Continued

Dialog list The Dialog List is the most flexible of the list field options. It allows the user
to select from a list of choices presented in a dialog box. The designer can
enable the field to accept multiple selections and new entries from the user.
A Dialog List field will display to the user with an entry helper button.

The user can access the choices by clicking on the arrow button or by
pressing Enter. The choices will appear in a dialog box.

The area labeled New Keyword is available only if the designer has enabled
the option Allow values not in list on the field Control property tab.

If Allow values not in list is enabled, users will also be able to type directly
into the field without activating the dialog list box.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 57
Choice Fields, Continued

Checkboxes Checkboxes display the list of choices as a series of boxes to be selected by


the user. Multiple boxes can always be selected, but new words cannot be
added to the list. The boxes can be formatted with a variety of display
options.

One column, inset border:

Two columns, no border:

Radio buttons Radio Buttons are similar to checkboxes in the formatting and layout choices.
Radio buttons allow the user to make only one selection, however, and once a
radio button is selected from the list of choices, the user cannot deselect all
the buttons again. New words cannot be added to the list.

Four columns, single border:

Two columns, inset border:

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 58
Exercise 4.2
Adding Choice Fields to the Time Off Request Form

Introduction In this exercise you will create new choice fields for the department, type of
leave and status.

Suggestion Use the field names listed in the table, because they are referenced by these
names in future exercises.

Instructions Add fields according to the requirements listed in the table below. Use the
field names listed in the table. The static text for the field description was
added in a previous exercise. For each of the fields, use the Choices setting
of Enter choices (one per line).

Field description Field Name Requirements


Department that the Department Use a Dialog List to
author is in present these choices:
• Sales
• Training
• Support
• Human Resources
Type of leave requested LeaveType Use a Dialog List to
present these choices:
• Annual
• Parental
• Sick
• Extended
• Floating Holiday
• Unpaid
• Other
Status of the request RequestStatus Use Radio Buttons to
present these choices:
• Pending
• Approved
• Denied

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 59
Exercise 4.2, continued
Adding Choice Fields to the Time Off Request Form

Instructions 1. Preview the form in a Notes client.


2. Test entering data in the choice fields.
Note: You do not need to save any documents at this time.

Results At the end of this exercise you should have a form that resembles the
following in the Designer client:

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 60
Readers, Authors and Names Fields

Description and There are 3 field types that are used to provide functionality associated with
Properties user names. They are Readers, Authors and Names. Readers and Authors
fields also provide security functionality.

Field Function
Names This field displays names in an abbreviated format.
Example: The formula @UserName will populate the field
with the name of the active ID file.
In a Text field the result will be in the canonical format,
CN=User One/OU=Sales/O=USA.
In a Names field the result will be in the abbreviated format,
User One/Sales/USA.
This field allows you to select names from one of three
locations:

Authors This field displays the user’s name from the active ID file.
Unlike the Names field, an Authors field does not require a
formula to display the name. It uses the abbreviated format.
The Authors field works in conjunction with Author access in
the ACL to give ownership of a document. In order for a user
with Author access to edit his own saved documents, his name
must be stored in an Authors data type field.
Readers This field further restricts the users that are allowed to read a
document. If a form uses a Readers field, only those people
and groups listed in the Readers field (combined with those in
the Authors field) will be able to view the document. Readers
fields will be discussed in detail later in this course.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 61
Exercise 4.3
Add an Authors Field to the Time Off Request Form

Introduction In this exercise you will add a field to store the name of the person who
creates the Time Off Request.

Requirements This new field will be added to the Time Off Request form in the Time Off
& Resources Requests database. If needed, refer to the Domino Designer 7 Help database
for assistance.

Instructions Perform the steps to complete the following:


1. Add an Authors field to store the name of the name of the requestor.
2. Name the field RequestedBy
3. Save and test the form.

Results When you test the form in the Notes client, your user name should
automatically populate the RequestedBy field. At this point the field can still
be edited.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 62
Shared Fields

Introduction The fields that you have created thus far are single-use fields. They are
created for use on each form. Shared fields serve the same purpose as single-
use fields, that is, they allow the user to enter information on the form.
Unlike single use fields, shared fields enable the designer to reuse the design
of a field without recreating it on each form. A designer might create a
shared field for those types of fields that are used on most forms, such as the
field to store the author’s name and the field to display the creation date of the
document.

What’s shared? A Shared field shares the field definition only. The field definition that is
shared includes the following properties:
• Data type
• Editable or computed property
• Field formulas

What’s not Not all properties are shared. These properties that are not shared include the
shared? following:
• Font styles, size and color
• Paragraph styles such as spacing and alignment
• Hide-when options

Shared field If a field is shared, it will have a thicker border around it in the Designer
appearance client.

Shared Field Single-Use Field

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 63
Creating a Shared Field

Procedure: To create a new shared field complete the following steps:


Creating a new
shared field

Step Action
1 In the Design Pane, select Resources ->
Shared Fields.

2 Click on the button for a New Shared Field


3 Name the field and set desired field
properties as you would with any field.
4 Save and close the Shared Field window.
5 The field will be listed as a shared field.

Procedure: To convert an existing single-use field into a shared field, complete the
Convert an following steps:
existing field

Step Action
1 Open the form containing the single-use field.
2 Click once on the field to be converted.
3 From the menu choose Design -> Share this field.

Procedure: Once you have created a shared field defined, you can insert it into any form
Inserting a in the database following the steps below.
shared field

Step Action
1 Open the form where you wish to use the shared field.
2 Position your cursor in the desired location for the field.
3 Select Create -> Resource -> Insert shared field.
4 From the dialog box, select the name of the shared field.
5 Click OK.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 64
Changing the Properties of a Shared Field

Procedure To change the properties of a shared field do one of the following:

From… Action
the form double-click the field
the design pane select the field name and press enter
OR
double-click the field name

When you access the properties of a shared field, the work pane for the shared
field is automatically opened and maximized on the screen.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 65
Changing the Properties of a Shared Field, Continued

What’s The properties box for a shared field has fewer tabs than the properties box
different? for a single-use field. The following tabs are not included:
• Font
• Paragraph Alignment
• Paragraph Hide-When
These tabs are not included because they are not shared.

Changing non- To change the non-shared properties, such as font style and color, you must
shared access them from the text properties box. Complete the following steps:
properties

Step Action
1 Open the form with the shared field.
2 Right click on the shared field.
3 Select Text properties from the shortcut menu.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 66
Exercise 4.4
Converting an Existing Field to a Shared Field
Introduction In a future exercise you will create an additional form. The new form will
require a field to store the creation date of the document. In this exercise you
will convert the existing CreationDate field into a shared field.

Requirements This exercise will be done in the Time Off Requests database using the Time
& Resources Off Request form. If needed, refer to the Domino Designer 7 Help database
for assistance.

Instructions Perform the steps to complete the following:


1. Convert the CreationDate field into a shared field.
2. Save and close the form.

Result To ensure that the CreationDate field is now a shared field check in the
Design pane under Shared code -> Fields. The CreationDate field should be
listed as a shared field.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 67
Exercise 4.5
Creating Documents

Introduction To test all current form functionality and in preparation for the next lesson,
Creating Simple Views, you will create a few documents. The saved
documents will allow you to test the views that are created in future exercises.

Requirements This exercise can be completed in the Notes client or in the Designer client.
& Resources

Instructions Perform the steps to complete the following:


1. Create at least 6 documents using the menu option Create -> Time Off
Request.
2. Select different choices for the type of leave and departments.
3. Enter appropriate information into each of the fields.
4. Save each document.

Results To ensure that the documents have been saved correctly, open the database
from the Notes client and select the untitled view. Each document will be
represented with a sequence number. The documents are sorted in the in
order in which they were created.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 68
Lesson 5: Creating Simple Views
Overview

Introduction In this lesson you will create a simple view to display the saved documents in
the Time-Off Request database. The view will display information stored in
each of the saved documents. In Part 3 – Views and Navigation, you will
create additional views with advanced features and properties.

Objectives At the end of this lesson you will be able to:


• Create a new view not using an existing view.
• Add view columns.
• Display column data using simple functions.
• Display column data using field contents.
• Format view columns using column properties.

In this lesson… This lesson contains the following topics:


• View Basics
• Creating a New View
• Adding View Columns
• Displaying Data using Simple Functions
• Displaying Data Using Field Contents
• Creating a Shared Column
• Formatting View Columns

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 69
View Basics

Review A view is a list of documents contained within a database that can be sorted to
show the documents in a certain order. A view can also be categorized to
group related documents together. Views provide the users with multiple
ways to see the documents that are stored in a database.

How many Each database must have at least one view, but most will have several views
views? to display the documents in different ways. Domino does not limit the
number of views that can be created in a database.

Selecting a view By default the available views in a database are displayed to the user in the
navigation pane on the left side of the screen.

The designer may add an outline or a navigator to display the views in a


different way.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 70
View Basics, Continued

View Structure A view is composed of rows and columns. Each row represents a document.
The columns are used to define the information that should be displayed from
each document. The columns will generally have a heading to label the
information contained in that column. Column data can be displayed using:
• Simple functions
• Field contents
• Formula results

View Types There are several view types. The following table lists and describes view
types:

View Type Description


Shared Shared views are available to users with at least Reader access to
the database. Shared views are stored in the database NSF.
Shared, contains documents This type of shared view is useful if all documents are filed in
not in any folder folders, so you can easily find the documents that are not filed.
Shared, contains deleted This type of shared view allows you to view a list of documents
documents in the database which have been deleted. You can recover
deleted documents by dragging them out of the trash to the folder
where you want them. This view type is detailed in Lesson 16.
Shared, private on first use This type of view begins as a shared view and becomes a private
view as soon as a user accesses and saves the view. They are a
good way to distribute personal views to multiple users.
Shared, desktop private on This type will store shared-to-private views in the user's
first use desktop.dsk file rather than in the database.
Private A private view is available only to the user who creates it. If a
user has rights to create private folders/views in the ACL, it is
stored in the database; if not, private views are stored in the user's
desktop.dsk. Private views are not supported on the Web.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 71
Creating a New View

Procedure To create a new view in a database for all users, complete the following steps:

Step Action
1 In the Designer client, select Views from the design pane.
2 Click on the button to create a new view -
3 Enter a name for the view and select the view type.

Note: View types and selection conditions will be discussed later.


4 Click Save and Customize to create the view and have it open into
the Designer client.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 72
Adding View Columns

Starting with a Once a new view is created it will have:


new view
• one column at the left of the view set to use the simple function “# in
View” and the heading #.
• the Refresh icon in the upper-left of the view to refresh the view as
changes are made.

Columns When a column is selected in a view, it has a darker gray background than the
rest of the columns. Below the Department column is selected.

When you add a column to the view you can insert it to the left of the selected
column or append it to the right of the selected column.

The first Rather than adding a new column as the first column, you can double-click on
column the existing first column that is created with the view and modify it as needed.

Procedure To add columns to a view, complete the following steps:

Step Action
1 Select an existing column by clicking once on its header.
2 From the menu, select Create -> Insert New Column
or
Create -> Append New Column.
3 Double-click on the header of the new column to open the Column
Properties Box.
4 Enter a title for the new column.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 73
Displaying Data Using Simple Functions

What are In a view there are several simple functions that can be selected to display
Simple information in a column. These simple functions are built-in and let you add
Functions? programming without knowing a programming language. Simple functions
include the following:
Simple Function Description
Attachments Displays the number of files attached to each
document. The data type is a number.
Author(s) Distinguished Displays document author name in hierarchical
Names format, as in User One/Research/Germany.
Author(s) Simple Name Displays the document author name without its
fully distinguished format, as in User One.
Creation Date Displays the time/date a document was created.
Last Modified Displays the date when a document was last
saved.
# in View Displays a number for each document indicating
(default for the 1st its order in the view. Responses are numbered in
column when the view outline style. For example, the first response to
is created) the first main is 1.1.

Procedure To display data using a simple function, complete the following steps:

Step Action
1 Open the view in the Designer client.
2 Click once on the column to select it.
3 Check the Programmer’s Pane to ensure the appropriate column is
selected and click the radio button for Simple Function.

4 Click the Refresh icon to display the data in the view.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 74
Displaying Data Using Field Contents

Procedure The next choice for displaying information in a view column is using the
contents of the fields in the documents. To display field contents, complete
the following steps:

Step Action
1 Open the view in the Designer client.
2 Click once on the column to select it.
3 Check the Programmer’s Pane to ensure the appropriate column is
selected and click the radio button for Field.

4 Click the Refresh icon to display the data in the view.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 75
Formatting View Columns

Introduction Once the column is set to display data, you may want to format the column’s
appearance. The column properties box allows you to control:
• column width
• column title
• column font size, style, color and size
• time/date format
• number format
• heading font size, style, color and size

Procedure To set properties for the column heading and data, complete the following
steps:

Step Action
1 Double-click on the column heading.
2 Select the desired tab in the column properties box.

3 Make the desired adjustments.


Note: There is generally no need to click the Refresh icon.
Column properties will be reflected immediately.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 76
Using Shared Columns

Why use a Like other shared code options, shared columns offer a way to save time and
shared column? maintain consistency when developing views. When you find that you need
the same type of information displayed in multiple views, such as the
document author or the creation date, using a shared column will save you
time over creating the column multiple times or even copying and pasting the
column from one view to another.

Creating a new Complete the following steps to create a shared column:


shared column

Step Action
1 In the Domino Designer client, select Shared Code -> Columns
from the Design pane.
2 Click on the button to create a New Shared Column. This will
open a Design pane for the new column.
3 Enter a name for the column in the Shared Column property box.
This name is how you will identify the shared column in the
design mode.

4 Specify the column value for the shared column, such as a field
value or simple function, in the Programmer’s pane.
5 Using the drop-down arrow, switch the properties box to the
Column properties.

6 Set the desired properties for the shared column.


7 Save and close the shared column.

Continued on next page

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 77
Using Shared Columns, Continued

Adding a Complete the following steps to insert a shared column:


shared column

Step Action
1 Open the view where you want to insert the shared column.
2 Click on the location where you wish to add the column and select
Create -> Insert Shared Column or Append Shared Column.
3 Select the shared column from the list and click Done.

Note: By default, both the value and the format of the shared
column will be used. If you do not want to use the existing format,
such as font size or color, select the option to Use Formula Only.

Modifying a Once a shared column is inserted into a view, you can make formatting
shared column changes to it directly in the view as you would any column. To change the
column value, you must choose Design -> Edit Shared Column. When you
save the changes made to a shared column, all views that use that column will
reflect the changes.

Sharing an Complete the following steps to create a new shared column based on the
existing column format and value of an existing view column:

Step Action
1 Open the view into the Designer client and select the column you
wish to share.
2 Select Create -> Copy as Shared Column.
3 Enter a name for the shared column and click OK.

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 78
Exercise 5.1
Creating a Simple View

Introduction In this exercise you will create a simple view. This view will only use simple
functions and field contents to display data. In future exercises you will
enhance this view and create additional views.

Instructions Perform the steps to complete the following:


1. Create a new shared view named All Requests with an alias of All.
2. Edit the first column to display the DepartmentName field.
3. Add a second column to display the requestor’s first and last name using a
simple function.
4. Add a third column to display the Type of Leave.
5. Create a new shared column to display the creation date (date only) of the
document using a simple function.
6. Insert the shared column into the All Requests view.
7. Format all columns as you choose.
8. Preview the view in the Notes client.

Results After completing this exercise you should have a view that resembles the
following from the Notes client:

(C) Copyright IBM Corp. 1999, 2006. All rights reserved. Page 79

You might also like