You are on page 1of 105

Agenda for Training

Session 3 Forms, Views and Folders

Author: PwC Lotus Notes Team

Tata Consultancy Services Internal

Forms
A form provides the structure for creating and displaying documents, and documents are the design element that store data in the database.
When a user fills out the information in a form and saves it, the information is saved as a document. When a user opens the document, the document uses the form as a template to provide the structure for displaying the data. Forms, like pages, display information. Everything that can be done with a Page can be done with a form. What sets Forms apart from Pages is that forms can be used to collect information.

Tata Consultancy Services Internal

Creating a Form
First open the database in the designer And click on Forms tab, in the design list & click the New Form button. All the existing Forms in the database will be displayed in the right side and also under the Forms title in the left side menu.

Tata Consultancy Services Internal

Form Properties
Right click on the form and select Form properties
Name of the Form with an Alias

Type of Document Document, Response and Response to Response


Check this to make form visible in create menu Versioning allows to maintain a history of changes to document. Makes this form the default form for all those documents which are not associated with any form. Check this to save the form along with the document

Tata Consultancy Services Internal

Form Properties
Continuously updates information of all the field values which are dependent on the other field values Check this property to keep the authors/editors anonymous No initial focus when the document is opened Sign Documents that use this form To enter HTML directly on a form Field names will not be added to field index, if this property is checked Merge/Create replication conflict options

Tata Consultancy Services Internal

Form Properties
Inheriting field values from other documents is done by checking this property You can create a rich text field that inherits the full document as rich text. Document always opens in Edit mode if this checked Click this property to display the parent document to the end user in the preview pane of the notes client, from where the field exchange would take place If you want a mail send option box to appear while closing a document, click this option If you want to generate HTML content for all the hidden fields on web access, then click this option

Tata Consultancy Services Internal

Form Properties
Content type of the form when accessed thru web.

Color of the Unvisited links


Color of the Active links To establish a connection to an external data source, you must first enable external connections for the database. Then you define a data connection resource (DCR). Enter the DCR here (Optional) Specify a "Default metadata object," such as a table or view name, from the external application.

Tata Consultancy Services Color of the Visited links Internal 7

Form Properties
Set the following auto-launch properties for when a user opens up a document created with the form

Set the frameset that the form will be associated with and the frame within that frameset

Tata Consultancy Services Internal

Form Properties
You can add a background color for a form

You can paste or import bmp, gif or jpeg etc files as a background for a form
To hide the graphics in design mode

Tata Consultancy Services Internal

Form Properties

You can add properties such as Height and scrolling to the header
You can add a header to a form so that when the user scrolls down, the header remains at one head position Border properties between the header and the body can be set here

Tata Consultancy Services Internal

10

Form Properties
You can add a header/footer to a form which will be printed with all the documents printed from that form Various alignments for the header and footer e.g. left align or right align etc

Text properties( Font, Size, Style) for the header and footer

Tata Consultancy Services Internal

11

Form Properties
Those who have read access for the documents created with this form

Those who have create access with this form to create documents

Disabling various properties

Available to public access users

Tata Consultancy Services Internal

12

Elements of a form - Text


Form elements are the components you use to create a form's aesthetics and function. Text:
Text is often used to label fields so that users understand the purpose of each field To create text on the form, just position the cursor and type text. To change the properties of the text, select the text and right click on it and select properties. You can change the Color, Font Size, Type and Style You can hide the text based on formulas and events.

Tata Consultancy Services Internal

13

Elements of a form Computed Text


Computed Text:
Use computed text to generate dynamic text based on formula results How to add Computed Text: 1.Move the cursor to where you want the computed text to appear. 2. Choose Create - Computed Text. 3. In the Programmer's pane, click the Objects tab of the Info List and select Value (located under Computed Text). 4. Write a formula whose value displays the text for the page.

Tata Consultancy Services Internal

14

Elements of a form - Field


Field:
A field is the part of an application that collects data. You create fields on forms, subforms, or in layout regions. Each field stores a single type of information. A field's field type defines the kind of information a field accepts, such as text, numbers, dates, or names. When a user, either in a Notes client or a Web browser, creates a form, fills out the information in the fields, and saves the form, the data in the fields is stored in an individual document. The contents of the fields can then be displayed in documents and views or can be retrieved for use in formulas. A field can be used on a single form, or you can create shared fields for use in multiple forms in a database.

Tata Consultancy Services Internal

15

Elements of a form - Field


When you create a field on a form, you define the following:
Field name Field type Display options and field properties Computed or editable attribute Formulas or scripts associated with the field.

Tata Consultancy Services Internal

16

Elements of a form - Field


Field Name A field name is a required element. You assign a field name in the Field Properties box when you create the field. A field name must begin with a letter and can include letters, numbers, and the symbols _ and $. The name can contain up to 32 bytes. Field names cannot contain spaces

Tata Consultancy Services Internal

17

Elements of a form - Field


Field Type Text - To collect, store, and display text in a field, use a text field Date/Time - Date/Time fields display time and date information in a variety of
formats .

Number - Use Number fields for numeric and currency data. Dialog List Users click on an icon to display a popup dialog box showing
the various choices

Radio button, Checkbox - These are similar to their HTML counter parts. List Box - Each choice is displayed with an expanded list box. Users click an
entry to select it.

Combo Box - Each choice is displayed with a drop-down list box. Users click
the drop-down arrow to see the entries and click the one they want.

Authors and Readers - Authors and Readers fields allow you to control
who can read and create documents created from a form

Tata Consultancy Services Internal

18

Elements of a form - Field


Rich text - Rich-text fields are better for formatted text, large amounts of
text, or embedding or attaching objects.

Rich text lite - Rich text lite fields are rich text fields with a helper icon
and down arrow next to the field. Clicking the icon gives the user a fast way to add an object into the rich text lite field. Clicking the down arrow displays a drop-down menu. The elements listed in the drop-down menu are the only elements the user is allowed to insert into the rich text lite field. Any attempt to insert or paste an invalid element into the rich text lite field displays an error message.

Tata Consultancy Services Internal

19

Elements of a form - Field


Names - Create a Names field to display user names. Password - A Password field is a text field that maintains a user's privacy by
displaying each character a user enters as an asterisk on the screen.

Color - A color field lets you display a color picker on a form. When the user
clicks the down arrow of a color field, a color chart appears with two tabs. The user can choose a color using either tab.

Time Zone - A time zone field lets you display a drop-down list of all available
time zones in the world, including the local time zone. Each time zone listed includes a partial list of the cities or locations found in that time zone.

Tata Consultancy Services Internal

20

Elements of a form - Field


Selected Field Properties Using Native OS 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 instead of as blank space marked off by brackets. An editable Date/Time field displays as a graphical date/time control. On the Web, native controls are ignored and fields display in their default format.

Automatically refreshing field values


Sometimes users must see the results of all field calculations as they work on a document. To provide continuously updating information, design a form that recalculates fields automatically whenever a field value changes.

Fields values can be refreshed in the following ways


Automatically by setting a form property that refreshes all keyword fields Automatically by setting individual field properties to refresh based on the event you choose. Manually, when a user manually refreshes a document.

Tata Consultancy Services Internal

21

Elements of a form - Field


Selected Field Properties Making a field active by default
The first editable field on a form is the active field by default. You can override this setting and change which field is active when a user creates or edits a document.

Tata Consultancy Services Internal

22

Elements of a form - Field


Editable and Computed Fields If a field is editable, a user can enter or change the value of the field. Computed fields are used to automatically enter data, such as the author's name or the date, in a field. You can have more than one computed field on a form. Computed fields require formulas to supply their values.

Tata Consultancy Services Internal

23

Elements of a form - Field


Types of computed fields
Computed - A computed field formula calculates each time a user creates, saves, or
refreshes a document.

Computed when composed - A computed-when-composed field formula calculates


only once: when the user first creates the document. Use this type of formula in a field to preserve information about the origin of a document, such as the creation date or original author, or to create a field whose original value never changes, such as a document sequence number.

Computed for display - A computed-for-display field formula recalculates each time a


user opens or saves a document. Use this type of formula in a field to display information that is relevant only to the immediate session, such as the current time or the results of calculations that you don't need to save. The field value exists during the current session only and is not stored. You cannot display the contents of a computedfordisplay field in a view.

Tata Consultancy Services Internal

24

Elements of a form Horizontal rule


Horizontal rule
To separate different parts of a page or form, or to make the document more interesting visually, add horizontal rules.
To create a horizontal rule
Move the cursor to where you want to enter the horizontal rule. Choose Create - Horizontal Rule.

The properties of the Horizontal Rule can be changed for attributes like
Color
Width Height

Tata Consultancy Services Internal

25

Elements of a form - Table


Table
Use tables for summarizing information and aligning elements such as fields and graphics in rows and column. A table placed on a form appears in every document created with the form. There are four types of tables you can create: Basic tables -- Tables with a designated number of columns and rows. Tabbed tables -- Tables that let users switch rows by clicking on tabs at the
top of the table.

Animated tables -- Tables that switch rows at an interval you designate.


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

Programmable tables -- Tables that switch rows based on an action or field


formula.

Tata Consultancy Services Internal

26

Elements of a form - Table


You can create basic tables, tabbed tables, animated tables, programmed tables, even tables within tables

How to create table:


1. Choose Create - Table. 2. Click the required table type in the "Table Type" section. 3.Specify the number of rows and columns in the "Table Size" section. 4. Specify the table width by clicking "Fit with margins," "Fit to window" or "Fixed width."

Tata Consultancy Services Internal

27

Elements of a form - Table


Tabbed Table
To create labels for tabs in a tabbed table 1. Place your cursor in the tabbed row you want to label. 2. Choose Table - Table Properties. 3. Click the Table Rows tab. 4. Enter text for the tab in the "Tab label and caption" field in the "For selected row" section. 5. Select a font, size, style, and color for the text of the tab label.

Tata Consultancy Services Internal

28

Elements of a form - Table


Animated Table
To change the way your animated table switches rows You can change the timing interval for when the rows in your animated table switch. You can also change how the rows in your animated table switch. For example, you may want the rows in your animated table to switch when a user clicks on the table, rather then continually every two seconds. 1. Place your cursor in the animated table. 2. Choose Table - Table Properties. 3. Click the Table Rows tab. 4. To change the timing interval for the rows in your table, enter a time in milliseconds in the "Switch rows every n milliseconds" field in the "Which row to display" section. Note: 2000 milliseconds (2 seconds) is the default. A lower millisecond number produces higher rotating speed. 5. To change how the rows in your animated table switch, select an option in the "Cycle through rows" list in the "Transition when switching rows" section.

Tata Consultancy Services Internal

29

Elements of a form - Table


Animated Table
To specify a transition effect when switching rows You can set each row in your animated table to have a transition effect as the rows switch from one row to another. For example, you can make the second row in your animated table appear to slide in from left to right. Note: You must select one cell at a time to set a transition effect. If you select more then one cell, the effect gets applied to only the first selected cell. 1. Place your cursor in a specific row to create a transition effect. 2. Choose Table - Table Properties. 3. Click the Table Rows tab. 4. Select an effect in the Effect list in the "Transition when switching rows" section.

Tata Consultancy Services Internal

30

Elements of a form - Table


Programmable Table
1. Choose Table - Table Properties. Do the following on the Table Programming tab of the Tables Properties box:
In the Table HTML Tags field, enter a Name/ID for the table. Click each row of the table and enter a name for each row in the "Row Tags" field.

2. (Optional) To display tabs so users can switch rows, select "Also show tabs so user can pick row" on the Table Rows tab. 3. Format the table. 4. Enter text, graphics, or objects in the table. 5. Create links, a button, or an outline entry that will set the fields for the table and control what displays.

Tata Consultancy Services Internal

31

Elements of a form - Table


Programmable Table
Now that the programmable table is created, we need to create the controls, which is as described below. 1. Lets assume a programmable table is created with the name CompanyInfo, with rows a and b. 2. Enter a line of text on the page that is related to what users will see when that row of the table is displayed. Enter a line for each row of the table. 3. Select the text for the first line and create a action hotspot for it. 4. Enter the formula in the action hotspot.
Field $CompanyInfo := a; @command([RefreshHideFormulas])

Tata Consultancy Services Internal

32

Elements of a form - Graphics


Graphics
You can place a graphic anywhere on a form, subform, or page. The graphic appears on the page or on any document created with the form or subform. For example, on a form for correspondence, placing your company logo at the top of the form creates a letterhead.

Tata Consultancy Services Internal

33

Elements of a form - Automation


Automation
You can create form actions, buttons, or hotspots on a form, subform, or page to automate simple or complex tasks. Actions Use an action with a form or view to set up a user-activated task. You can make the action available in the Actions menu or as a button in the action bar. In particular, use actions to simulate Notes menu items for Web browser users. Then, those users can complete Notes tasks when accessing Domino databases. Hotspots Use a hotspot in a form or document to set up a user-activated task. The hotspot can be a link to another Web site, database, or element in a database; a button; a pop-up; or an action.

Tata Consultancy Services Internal

34

Elements of a form - Automation


Agents
Use agents to set up user-activated tasks, or background tasks, in any part of a Domino application. Agents can be simple, such as moving documents to a folder, or complex, using Java programs to run multiple automated tasks at scheduled times. Agents are stored with databases, but you can use them to run automated tasks for views, documents, fields, and databases.

Programs that are activated by an event


Associate an automated task with an event that occurs when a design element is used. For example, set up an error-checking automated task to verify user input after a user has saved a document.

Tata Consultancy Services Internal

35

Elements of a form - Automation


To set up the tasks associated with the automated components, use the following: Simple actions You can add automation to design elements without knowing a programming language. You can select one or more simple actions from a list. Simple actions cant be customized and are not supported in Web applications. Formulas You can write an @function formula that runs by itself or with a simple action. You cannot combine LotusScript in an @function formula. You can use some @functions in LotusScript using the LotusScript Evaluate function. LotusScript LotusScript is a complete scripting language that can support most applicationwide tasks.

Tata Consultancy Services Internal

36

Elements of a form - Automation


JavaScript
Use JavaScript triggered in events (for example, onClick of a button or onLoad of a form) to interact efficiently with the user for tasks such as form and field validation and simulating dialog boxes. Use Common JavaScript to enter code that works on both the Notes client and the Web.

Java
You can write Java programs or import Java files into agents.

Tata Consultancy Services Internal

37

Elements of a form - Actions


Actions
Actions automate tasks for the user. Add actions to the menu in the Notes client, or add actions with buttons or hotspots on a form, subform, or page. Action is a custom procedure that you can associate with a view or a form. When you open/compose a document/form the action becomes available as a menu command. Notes supplied icons or any images can be used for Action Button The Action buttons visibility can be suppressed conditionally on the Action menu or action bar with a Hide action if formula is true Using Action bar properties, you can customize the display of actions

Tata Consultancy Services Internal

38

Elements of a form - Actions


An action can be built with any one of the following Simple actions that you can select from a list Formulas LotusScript JavaScript Common JavaScript

Tata Consultancy Services Internal

39

Elements of a form - Imagemaps


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

Tata Consultancy Services Internal

40

Elements of a form - Applets


Applets
Use Java applets to include small programs, such as an animated logo or a self-contained application, in a form, subform, or page. Applets are self-contained Java programs that can run in your Domino application. Java applets are often used to add animation to Web applications. Although Java applets are mostly used for Web applications, you can also include them in the following elements of a Domino application: Form -- The applet is included in each document created with that form. Document -- The applet is available only in the document. Page -- The applet is available only in the page.

Tata Consultancy Services Internal

41

Elements of a form - Applets


Java Applets are added to provide visual interest or additional functionality. Some pre-built applets have been provided by Domino:
View applets Outline applets Editor Applets Action bar Applets

Tata Consultancy Services Internal

42

Elements of a form - Attachments


Attachments
You can attach files to a form, subform, or page so users can detach or launch files locally How to attach: 1. Open the page, form, or subform. 2. Move the cursor to where you want to create the attachment. 3. Choose File - Attach. 4. Select the file and click Create.

Tata Consultancy Services Internal

43

Elements of a form - HTML


HTML
There are a number of ways you can include HTML on a page, form, or subform when you are designing. If you have existing HTML or you prefer to use HTML instead of the formatting tools Designer offers, you have the following options:
Convert a page, form, or subform (or sections of the page, form, or subform) to HTML and use the HTML editor to change the HTML. Import HTML, thus using the source of an existing Web page or form as the base of a new page or form. Designer renders the imported HTML on the page, form, or subform already translated from HTML. Paste HTML directly on a page, form, or subform. The HTML stays in HTML format. Enter HTML directly on a page, form, or subform. The HTML stays in HTML format.

Tata Consultancy Services Internal

44

Elements of a form Embedded Elements


Embedded Elements
Embedded outline
To use an outline as a navigational device, it must be embedded on a form, page, or rich text field of a document. The most common way to use an outline is to embed the outline on a page and use it as part of a frameset.

Embedded view or folder pane


When you embed a view or folder on a form, subform, page, or document, you can control the size and appearance of a view or folder display, especially on the Web. Embedding a view or folder pane lets you combine views and folders with other form elements (such as styled text) and graphics

Tata Consultancy Services Internal

45

Elements of a form Embedded Elements


Embedded navigator
Embedding a navigator in a form, subform, page, or document gives you control over the display of a navigator on the Web. It also allows you to combine the navigator in the same window with other objects.

Embedded date picker


The embedded date picker is a navigational tool that works with open calendar views. You can use an embedded date picker on a page or form to customize a calendar application. The embedded date picker displays a monthly calendar and the user can choose a month and a day of the month.

Tata Consultancy Services Internal

46

Elements of a form Embedded Elements


Embedded file upload To allow Web users to attach files to documents, include a file upload control on a form. When Web users create a form or open a document in Edit mode, they can attach a file by typing the path and file name or by clicking Browse and selecting a file from the filing system. In addition, the server administrator must define a temp directory on the server or the attachment will not saved with the document. The file upload control is not supported in Notes.

Embedded scheduler The embedded scheduler allows you to design a form or subform that displays the schedules of users. For example, you can create a form for users to schedule department meetings. Embedding a scheduler on the form lets users check everyone's schedules before planning the meeting time.

Tata Consultancy Services Internal

47

Elements of a form Embedded Elements


Embedded editor
You can embed an editor into a form. One use of the embedded editor is to let you embed one or more forms into an existing form. Another use of the embedded editor is targeting in which you link an embedded editor to an embedded view. Targeting allows the user to edit documents in a view without having to open separate windows. You can do almost everything in an embedded editor that you can do in a document. However, you cannot include the following in an embedded editor: Buttons, action hotspots, formula popup hotspots, computed text, or navigators.

Note also that you should not use embedded editors in animated tables.

Tata Consultancy Services Internal

48

Elements of a form JavaScript Libraries


JavaScript Libraries
A JavaScript library is a place for storing and sharing common JavaScript programs and code. You can insert an existing JavaScript library into a page, form, or subform either in-line or into the JS Header. To insert a JavaScript library in-line: 1. Open a page, form, or subform in Designer. 2. Choose Create - Resource - Insert Resource. 3. Highlight "JavaScript Libraries," select an available JavaScript library, and click OK. To Insert a JavaScript Library into the JS Header: 1. Open a page, form, or subform in Designer. 2. Select the JS Header event in the info list under the Objects tab 3. Choose Create - Resource - Insert Resource. 4. Select an available JavaScript library, and click OK.

Tata Consultancy Services Internal

49

Elements of a form Layers


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

Tata Consultancy Services Internal

50

Elements of a form Layout region


Layout region
A layout region is a fixed-length design area on a form or subform. The advantage of using layout regions is that related elements can be dragged and moved easily and can be displayed in ways not possible on regular forms and subforms. You can hide or collapse a layout region and all its components under certain conditions. Layout regions are not supported in Web applications. Following items only can be added in a layout region:
Text Background graphics Fields (except for the following fields: color, dialog list, formula, password, rich text, rich text lite, and time zone) Buttons Button graphics

Tata Consultancy Services Internal

51

Elements of a form Links


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

Tata Consultancy Services Internal

52

Elements of a form Subforms


Subforms
A subform is a collection of form elements stored as a single object. A subform can be a permanent part of a form or can appear conditionally, depending on the result of a formula. Subforms save redesign time. When you change a field on a subform, every form that uses the subform changes. Common uses of subforms include adding a company logo to business documents or adding mailing label information to mail and memo forms. Subforms can be inserted in the form in two ways
Insert Subform directly Insert Subform based on a computation formula

Tata Consultancy Services Internal

53

Elements of a form Shared resource


Shared resource
The following shared resources can be added to a form or subform
Images JavaScript Libraries Shared Fields Subforms Style Sheets HTML Files

They will be discussed in the next sessions

Tata Consultancy Services Internal

54

Elements of a form Section


Section
Collapsible and expandable area defined on a form, page or subform. Organize elements It can include fields, objects, layout regions, and text. Sections work well to present large amounts of information in an uncluttered way.
For example, if you have two different procedures on a page, and users only need to see one at a time, you can put each procedure into a collapsible section so that the users can expand only the section that they need. Two types of sections are available:
Standard Section Access Controlled Section

Tata Consultancy Services Internal

55

Elements of a form Section


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

Tata Consultancy Services Internal

56

Elements of a form Section


Standard Section Properties:
A Standard section allows access to everyone
1. Select the section and choose Section - Section Properties. 2. On the Section Title and Border tab, you can: Enter a title for the section. Titles can be either text or a formula. Use text if the title should be the same all the time. Use a formula if you want the title to appear differently under different conditions. Select the border style. The border appears around the section. Select a border color.

Tata Consultancy Services Internal

57

Elements of a form Section


3. On the Expand/Collapse tab: Select options for showing the section expanded or collapsed depending on whether a document is being previewed, opened for reading, opened for editing, or printed. Select "Hide title when expanded" if users don't need to see the section title when the fields are displayed. Select "Show as text when not previewing" so that the user sees the section only when the document is being previewed. If the document is being printed or is opened for reading or editing, the user sees the text with no visible sign that the text is contained in a section.

Tata Consultancy Services Internal

58

Elements of a form Section


Access Controlled Section properties: You can control access to parts of documents by creating access-controlled sections on forms that allow specified users to see restricted parts of documents. To name the editors for a controlled-access section 1. Click the section title. 2. Choose Section - Section Properties. 3. Click the Formula tab. 4. Select Editable as the section type to allow the document creator to specify the section editors. 5. Select one of the Computed types to use a formula to define the section editors. 6. (Optional for an editable field; Required for a computed field) In the Properties box, write a formula to define who can edit the field, and click the check mark.

Tata Consultancy Services Internal

59

Elements of a form Section


To make a controlled-access section collapsible
1. Click the section marker and choose Section - Section Properties. 2. Click the Expand/Collapse tab and select options for showing the section expanded or collapsed, depending on whether a document is being previewed, printed, or opened. 3. On the same tab, click the "For Editors" list and select "For Non-editors." A list of options appears for displaying the section to users who can read but not edit the section. 4. (Optional) Select "Hide title when expanded" if users who are non-editors don't need to see the section title when the fields are displayed.

Tata Consultancy Services Internal

60

Views
A view is a collection of documents(data) in a database. It organizes documents by rows and columns. Each column displays a type of information about the document, such as author or date of creation. Each row displays selected pieces of information from one document. One column in the view is usually the organizing element -- for example, a column entitled Date might organize the documents in chronological order. In a discussion database, you might use a column entitled Topic to display the contents of the Subject field for each document in the view. In a tracking database, it might be the customer or product name.

Tata Consultancy Services Internal

61

Creating a View
Open the database you are designing.Select the Views element from the Design list. Click the New View design action button.

Tata Consultancy Services Internal

62

Creating a View
In the Create View dialog box Enter the View Name. Choose the View Type. Select a location in the "Select a location for the new view" field.
If you want the view to appear at the top level, do not select anything in this field. Otherwise, click the name of the view under which you want the new view to appear.

Tata Consultancy Services Internal

63

Creating a View
Click the "Copy style from" button.
Click Blank if you do not want to copy another view's style. Otherwise, click the view whose style you want to copy. If the style uses selection formula, the view's selection formula appears in the "Selection condition" field.

You can use the Fields & Functions button and Formula window button to further refine the new view's selection criteria.

Tata Consultancy Services Internal

64

Creating a View
Click OK to create the new view.

Tata Consultancy Services Internal

65

Designing a View
Double-click the new view in the Views list to open this new view.

Tata Consultancy Services Internal

66

Designing a View
Click the Column Title tab to determine the font, size, color, and alignment of the column title. Add other columns by choosing either:
Create - Insert New Column to create a column to the left of the highlighted column.

Create - Append New Column to add the column after all existing columns.

Tata Consultancy Services Internal

67

Programming a View
When you design a view, you can program it to show all documents or only certain documents in the database. Most databases have one view that shows all documents and other views that show a subset of documents. The default selection for new views is SELECT @All, which means "include all database documents in this view." To narrow down the kinds of documents the view displays, add a program that displays only particular documents. For example, in a task-tracking database, the Work in Progress view could display only those documents whose Status field does not contain "Complete." Here is a program that displays only documents containing new features and displays them in a What's New view:
SELECT @IsMember("01 What's new?"; View)

Tata Consultancy Services Internal

68

Programming a View
Choose "View Selection" in the Objects box, select the type of programming you want to add, and build the program in the window below. Simple Search

Simple Search allows you to create a conditional document selection without knowing a programming language. In the Info List of the Programmer's pane, click the Run drop-down box and select Simple Search. Then click Add Condition for each selection you want to include. To delete a condition, click it and choose Edit - Clear.

Formula
Formula allows you to create a program for selecting documents. The program uses the @function formula language. In the Programmer's pane, click Formula and write the formula in the Script area.

Tata Consultancy Services Internal

69

View Properties
Name of the view

Alias of the view

View Style:

- Standard Outline
- Calendar

Tata Consultancy Services Internal

70

View Properties
First view displayed when a user opens database for first time

View serves as a template, or model, for other views and folders that are designed in the same database
Shows the view in collapsed form every time users open it Response documents are displayed in a hierarchy, with each level of response indented from its parent

Makes the view available to users from the View menu in Notes

Tata Consultancy Services Internal

71

View Properties
If not checked, disables all options in the Customize View dialog box in Notes (except sorting).

Actions (like show / hide formulas) evaluate every time a document changes in the view.
User can create a new document from the view level (without opening the form) Highlights a particular row when a user opens the view: - Go to last opened document - Go to top row - Go to bottom row

Refresh options - Display indicator - Refresh display - Refresh display from top row

- Refresh display from bottom row Tata Consultancy Services Internal 72

View Properties
Color for View Background Alternate colors for rows in a view Specify an image resource as a view background for Notes client users Display a single copy of the image or tile multiple copies of the image for the view background Style and color of gridline in the view

Style, color and height of the View Header showing column titles

Tata Consultancy Services Internal

73

View Properties
Specify how many lines a column can contain (row height) Vertical space between the rows in view Shrinks the row height according to the content Suppresses the display of categories with no documents Colors the pre-defined Domino view icons to match the header color. Color and style of the unread rows Color of column total text

Tata Consultancy Services Internal

74

View Properties
Shows the selection margin Turns off the border separating columns from selection margin Fills out the last column to avoid empty space in the view. This makes view easier to read Sets margins for a view in pixels (1 to 100)

Set a color for the view margin. Useful for offsetting a view with a contrasting background color

Tata Consultancy Services Internal

75

View Properties

Sets the Frameset and Frame in which the view will open on web.

Tata Consultancy Services Internal

76

View Properties
Refresh and Discard options for View indexes

Unread mark options


- None - Unread document only - Standard (compute in hierarchy)

If a view is used to display records from a data source that is accessed using ODBC, this property suppresses display of duplicate records.

Tata Consultancy Services Internal

77

View Properties
On web access, overrides the default row and column settings for a view by using HTML formatting attributes stored in a column.

On web access, opens the view using the View applet

Allows selection of documents on web using checkboxes for every row


Colors of Active, Unvisited and visited links

Tata Consultancy Services Internal

78

View Properties
Those who have read access (and above) for the documents displayed in the view

Available to public access users

Tata Consultancy Services Internal

79

Programming a Column
The values each column shows are determined by a program attached to the column.
Click the column you want to program, click the Simple Function, Field, or Formula button in the Programmer's pane, then build the program in the Script area. Column formulas can consist of a combination of @functions, field values, and text enclosed in quotation marks.

Simple functions
Simple functions let you add programming without knowing a programming language. The default selection for a new column is "# in View," which numbers documents according to their internal sequence (for example, 3.1.2).

Tata Consultancy Services Internal

80

Programming a Column
Field
Field lets you populate the column with field values without writing a program.

Formula
Formula lets you create a program for a column using the @function formula language. This is useful when you must process values in a document for display purpose. Typical uses for formulas include converting field data to a text value, writing a formula that displays an icon instead of a value, and adding a static text to field values, concatenating values of 2 fields. For example, to append a numeric value to a text value in a column, use a formula like:
Product + ": " + @Text(Quantity)

Tata Consultancy Services Internal

81

Sorting documents in views


Every view needs a sorting method that organizes documents in a way that makes sense to users. For example, a By Date view sorts documents by their creation dates. To achieve this effect, designate at least one column as a sorting column. Then define it as a usersorted column, an auto-sorted column, or both. Views that display categories often use sorting methods to alphabetize the category names. If the sort column displays values from a multiple-value list, select "Show multiple values as separate entries" to show each value as a separate row. If you don't set this option, multiple values display as one entry and sort by the first value.

Tata Consultancy Services Internal

82

Sorting documents in views


User-sorted columns
Users see a triangle next to a column title whose values can be resorted. Users click the column and choose a sorting method to see the documents in the order they choose.

To set up a user-sorted column, select the option "Click on column header to sort" on the Sorting tab of the Column Properties box. Then select Ascending or Descending order, or select Both to allow users to cycle among ascending sort order, descending sort order, and no sort order for the column.

Tata Consultancy Services Internal

83

Sorting documents in views


Auto-sorted columns
To set up a sorting style in advance, select the option "Sort: Ascending" or "Sort: Descending" on the Sorting tab of the Column Properties box. The sorting column is usually one that appears on the left side of the view.

Multiple sorting columns


To create multiple levels of sorting, designate more than one column as a sorting column. For example, if a primary sorting column sorts entries by date, a secondary sorting column might sort entries by author. Then all documents created by one person on a particular date are grouped together.

Tata Consultancy Services Internal

84

Sorting documents in views


Using an auto-sorted column as the secondary sorting column
To add a secondary sorting column, add a column to the right of the first sorting column and then choose Sort: Ascending or Sort: Descending on the Sorting tab of the Column Properties box. Documents and responses are sorted, then sub-sorted, in column order from left to right.

Designating a secondary sorting column for a user-sorted column


User-sorted columns override the sorting built in to auto-sorted primary and secondary columns. If the view has a user-sorted column and you want to include secondary sorting, you can associate it with a secondary sorting column. On the Sorting tab of the Column Properties box for a user-sorted column, click "Secondary sort column" and choose the secondary sort column and its sorting order.

Ascending and descending order

Columns sort documents in ascending or descending order:

Tata Consultancy Services Internal

85

Sorting documents in views


Character sorting rules
After the ascending or descending order is set, characters are sorted in this order:

numbers letters accented letters punctuation/special characters

Tata Consultancy Services Internal

86

Sorting documents in views


Case-sensitive and accent-sensitive sorting rules for Release 6 :
Both case-sensitive sorting and accent-sensitive sorting are turned off by default (in previous releases, they were on by default). "Case-sensitive sorting" sorts lowercase letters before uppercase letters -- for example, "ab" sorts before "Aa." "Accent-sensitive sorting" sorts accented characters after nonaccented characters. For example, "ab" sorts before "a."

Tata Consultancy Services Internal

87

Categorizing documents in views


A category is a grouping of related documents.
For example, in an employee view, you can create a category called Ohio and include in that category documents created by only those employees who work in Ohio. A categorized view is neat and easy to scan. Users can collapse the categories to display only the category names, and then expand categories individually, or expand the whole view. Create a column to display categories and then Select the option "Type: Categorized" on the Sorting tab of the Column Properties box. The resulting column, called a categorized column, groups documents with matching values and converts the common value to a category name. The column is usually one that appears on the left side of the view. This column must always appear to the left of any sorted columns.

To categorize a view,

Tata Consultancy Services Internal

88

Categorizing documents in views


Other options include:
(Recommended) At the Font tab of the Column Properties box, choose a different color for column text and use bold face to make categories stand out. (Recommended) At the Column Info tab of the Column Properties box, select "Show twistie when row is expandable" to display a triangle that users click to see categorized documents. (Optional) At the Options tab of the View Properties box, select "Collapse all when database is first opened" to show only the category names when users open the view. (Optional) At the Advanced tab of the View Properties box, select "Don't show categories having zero documents" so that categories with no documents associated with them are not listed.

Tata Consultancy Services Internal

89

Displaying an icon in a Column


To display an icon in a column fulfill the following two requirements:
The column property "Display values as icons" is selected. The column uses a formula that results in a number that corresponds to the icon you want to display.

Programming columns to display icons


The following formula determines whether a document has an attachment and, if so, displays the attachment icon (number 5): @If(@Attachments;5;0) Use 0 as the "false" case when you want to leave the column blank. The formula above returns 0 when the document has no attachments, so nothing is displayed.

Tata Consultancy Services Internal

90

Column Properties
Column Title Column Width

Separator in case a column displays multiple values


Allows users to change the width as needed Displays column icons based on the numeric value in the column Allows you to specify the column background color and text color using a formula or script.

Set the column to display the information specific to response documents

Tata Consultancy Services Internal

91

Column Properties
Allows users to edit values directly from the view.

Hides the column header


Shows a green triangle (blue triangle on the Web) next to a column that displays categories or response documents.

Specify a pair of graphics to use in place of the default expand and collapse twistie icons.

Tata Consultancy Services Internal

92

Column Properties
Column sorting options Column categorization options

Enables case sensitive sorting


Enables accent sensitive sorting Shows each value in a separate row if a column displays values from a multi value list. User sorted columns Ascending / Descending / Both Select secondary sorting column to create multiple sorting levels Display totals, averages, or percents for a column's numeric value

Tata Consultancy Services Internal

Suppress numbers other than totals or subtotals for each category and subcategory.

93

Column Properties

Font, size, style, color and justification of text displayed in the columns

Tata Consultancy Services Internal

94

Column Properties

Column style and advanced formats - General - Number

- Date/Time
- Names

Tata Consultancy Services Internal

95

Column Properties

Font, size, style, color and justification of text displayed in the columns headers

Tata Consultancy Services Internal

96

Column Properties

Column name for programmatic use


Hides the column Hides the column based on a formula

On web access, displays the column value as a link to open the respective document

Tata Consultancy Services Internal

97

Embedded Views
Views created in Notes may not have as many features on the Web. For example, a view or folder will display as a full screen with default navigation buttons on the Web. To gain more control on the Web, go for embedded Views. When you embed a view or folder on a form, subform, page, or document, you maintain the same functionality available in Notes applications, and you control the size and appearance of a view or folder display. If you have multiple views or folder panes you want to display in an application, you can create one or more view templates that control how the embedded objects display. A view template is actually a specially named form that provides the design structure for displaying the embedded folder panes or views in an application.

Tata Consultancy Services Internal

98

Creating Embedded Views


To create an Embedded view
Open a form, subform, or page in Designer, or open a document in Edit mode. Place the cursor where you want the embedded view or folder to display. Choose one of the following: Create - Embedded Element - View

If you don't want to display the same view in all circumstances, click "Choose a View based on a formula.
You can specify a target frame on the Info tab of the Embedded View Properties box. The target frame specifies where the document is displayed when a user selects a document in an embedded view with a single-click or with the arrow keys, or with a double-click. Click the embedded element and choose Element - View Properties to change the alignment or style, or to hide the element under certain conditions. Close and save the form, subform, page, or document..

Tata Consultancy Services Internal

99

Creating Embedded Views


A form can have only one embedded view You may want to set an embedded view to be an embedded view applet. Open the Embedded View Properties box. At the Info tab , choose "Using Java Applet" (next to Display).

Tata Consultancy Services Internal

100

Show single category


In many cases you might be requiring to show the users only the documents they created. In such a scenario you might be using this feature. To create an embedded view to show a single category
Open a form in Designer. Choose Create - Embedded Element - View. The Insert Embedded View dialog box appears. Highlight the view you want and click OK. Choose "Show Single Category" as the event in the Programmer's pane. Enter a formula to compute the category. The formula can make use of information about the current user and information from the current document (the one embedding the view).

For the Show Single Category option to work, the embedded view must first have been categorized .

Tata Consultancy Services Internal

101

Folders
Like views, a folder is also a collection of documents(data) in a database. Folders are similar to views in all respects but with the following difference:
In a view, documents are displayed according to a fixed selection criteria. A folder does not have a selection criteria. Documents can be be moved in or out of the folders using drag & drop, menu options or by using an @command.

Tata Consultancy Services Internal

102

Creating a Folder
Open the database you are designing.Select the Folders element from the Design list. Click the New Folder design action button.

Tata Consultancy Services Internal

103

Creating a Folder
In the Create Folder dialog box
Enter the Folder Name. Choose the Folder Type.

Select a location in the "Select a location for the new folder" field.
If you want the folder to appear at the top level, do not select anything in this field. Otherwise, click the name of the folder under which you want the new folder to appear.

Tata Consultancy Services Internal

104

Tata Consultancy Services Internal

105

You might also like