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

Creating databases Using Domino

There are three ways to create a new database:


Using a template Copying an existing database


Starting from scratch (With Domino Designer)

Starting a database from scratch (With Domino Designer)

If you need a unique application, start from scratch. To do this, begin by creating a blank database, based on the -Blank- template. A blank database contains no design elements such as pages or forms. Blank databases have one default view. You must create all of the elements you need for the application.

Choose File - Database - New. In the Server field do one of the following: Leave Local selected to store the new database on your computer. Select or enter a server name to store the new database on a server. This allows multiple people to work on the database design.

In the Title field, enter a title for the new database. The title can have a maximum of 96 characters. Note As you type a title, Designer adds the name to the File Name field. You can accept this database file name or change it. Database file names can be any number of characters long (within the limits of your operating system). If you want the database to appear in the Database Open dialog box, it must end with the file extension NSF. If you plan to use the database you are creating as a template, use the file extension NTF rather than NSF. For more information about creating templates, see the topic "(1)Creating templates" in the chapter "Completing an Application and Managing Design Changes." (Optional) Click Encryption, select "Locally encrypt this database using," and select an encryption type. For information on encrypting a database, see the topic "(2)Notes and Domino encryption" in the chapter "Security in an Application." (Optional) If you are developing an application for use with Lotus Notes and Domino 4.x or if the application will be on a Domino 4.x server, click "Size Limit" and select a size (in gigabytes).

Select -Blank- as the template. Click OK.

You are now ready to begin creating the design elements for your application.

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

Elements to use on a page Actions Applets Attachments Computed text

Embedded Element Graphics


Horizontal rules HTML Image maps JavaScript libraries Layers OLE objects and custom controls Links Sections Tables Style Sheet (CSS) shared resources Text

Creating pages

Click Pages in the Design pane. Click "New Page." Create the contents for the page, using elements such as text and graphics. Choose Design - Page Properties to assign the following page properties:i) Page Info tab ii) Background tab iii) Launch tab iv) Security tab

To delete a page

Click Pages in the Design pane. Select the page you want to delete. Choose Edit - Delete. Click Yes to confirm.

Database Launch Options


You can set database properties that control what a user sees when the database opens. For example, you might want all users to start from an application home page or a registration page. Or you might display a main navigator that leads users to different pieces of the application. You can specify one option for an application when it runs on a Notes client and another option for the application when it runs on the Web. When the database opens on the Notes client, you can display: A frameset you specify A navigator you specify A navigator in its own window The "About Database" document for the database The first attachment in the "About Database" document

The first doclink in the "About Database" document - Adding a link here gives users access to information in another application from a Designer application. For example, to collect spreadsheet data for use in the application, launch a link to a spreadsheet application so users immediately see the spreadsheet when they open the database. Data entered in the spreadsheet can be used to populate fields in the application. If you choose to launch a page, you will need to specify the page in the Properties box. Designer gives you a drop-down list of the pages that are available to choose from. they open the database. Data entered in the spreadsheet can be used to populate fields in the application.

When the database opens on a Web browser, you can display:

Using the Notes launch option The "About Database" document A frameset you specify A page you specify - in the Database Properties box, Designer gives you a list of the pages that are available to choose from. A navigator in its own window The first doclink in the "About Database" document A doclink you specify The first document in a view

To set the database launch property

Select or open the database and choose File - Database - Properties. Click the Launch tab. Choose what to display for a Notes client and for a Web client (Optional) Choose whether to restore the database as the last user viewed it (Optional) Choose whether to display the About This Database document when the database opens for the first time and/or when the About This Database document is modified.

If you choose to launch a doclink

Copy the doclink on to the clipboard. Open the Database Properties box. On the Launch tab, choose - On Web open launch designated doclink. Click Paste doclink.

To launch a Page from the Notes client

On the Launch tab of the Database Properties box, choose On Database Open - Open designated Navigator. Select Type of Navigator: Page. Enter or select the name of the Page.

Displaying a document preview automatically

Select or open the database you are designing and choose File Database - Properties. Click the Launch tab. Click "Preview Pane Default." Note that this option is not available if you launch a frameset from the Notes client. Choose a location for the document preview pane to display. Check "Maximize document preview on database open" to display the preview pane automatically. Note that this option is not available when setting launch properties from the Notes client.

Computed Page Contents


Creating computed text: You can use computed text to generate dynamic text based on formula results.

Move the cursor to where you want the computed text to appear. Choose Create - Computed Text. In the Programmer's pane, click the Objects tab of the Info List and select Value (located under Computed Text). Write a formula whose value displays the text for the page.

Example: Computed text

To personalize the message a user sees on a page or form, create computed text that displays the user's name. On the page or form, enter the text: Welcome <computed text>. Select Value (located under Computed Text on the Objects tab of the Info List). In the Script area, enter the formula: @Name([CN];@UserName) If the user's name is Sara Ryan/Acme, when she opens the page or form she will see: Welcome Sara Ryan.

Note Domino publishes a <span> tag around the computed text for access via JavaScript.

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

Here are the basic steps involved in designing a form:

Decide on the purpose and type of form you need. To do so, consider: The kind of information you want to collect and which elements you need. How and where the resulting documents, which contain and display the collected information, appear. Create the form. Add elements to the form. Name the form. Assign its properties. Preview and test the form in the browsers users access it with.

Creating and deleting forms

To create a form, you must have at least Designer access in the (1)database ACL. If the form you need is similar to one that exists in the same database, another database, or a Designer template, copy the form and then modify it. To create a new form:

In an open database, click Forms in the Design pane, and then click New Form. Design the form. Create (1)fields, (2)text, and (3)other elements on the form. Choose Design - Form Properties to assign a (4)name and other (5)form properties.

To copy an existing form

In the Design pane, click Forms. From the list of forms in the Work pane, select the form you want to copy. Choose Edit - Copy to copy the form to the clipboard. Open the database you want to copy the form into and click Forms in the Design pane. Choose Edit - Paste to paste the copy into the list of forms in the target database.

If you are copying a form from a different database, resources such as shared fields and shared images are not sent with the copied form. You must copy shared resources separately to the new database.

Special types of forms

There are several types of forms that you can create for specific purposes. See the following topics for information on creating any of these types of forms.

Profile forms Forms that prompt users for input Forms for a Domino billing application

To delete a form

Remove a form when users no longer need it. After you delete the form, documents that were created with the deleted form are displayed with the default form instead. After you delete a form, to prevent users from receiving a "form can't be found" message, create an agent that reassigns the form name.

Open the database. In the Design pane, click Forms. Select the form you want to delete. Press DEL or choose Edit - Delete.

Fields
A field is the part of an application that collects data. You create fields on forms, sub forms, 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.

You can create a (1)single-use field on a single form, or a (2)shared field to use on several forms. In either case, you must specify the following:

Field name Field type Whether this field is editable or computed

Field types

Authors Checkbox Color Combobox Date/Time Dialog List Formula Listbox Names Number Password Radio button Readers Rich text Rich text lite Text Time Zone

Field Properties

Name Type Allow multiple values - Lets the user enter more than one value in the field. The Advanced tab of the Field Properties box contains additional options related to allowing multiple values. Compute after validation External data source - Check this box to use an external data source. When you check this field, several "Data source options" fields appear at the bottom of the Field Info tab. Style Size - Note that you can set this property only for the Native OS style or for Calendar/Time controls. Align control's baseline with paragraph's -Note that you can set this property only for the Native OS style or for Calendar/Time controls. Tab key Give field initial (default) focus Data source options

Editable and computed fields

You choose whether a field is editable or computed in the field properties box, when you create the field. If a field is editable, a user can enter or change the value of the field. If a field is computed, a formula calculates the field value. Users can't change the values in a computed field. Number, date/time, authors, readers, and names fields are usually computed. Text, rich text, and choice list fields are usually editable.

Type of computed field


Computed

Formula calculates
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.

Text, rich text, and rich text lite fields


To collect, store, and display text in a field, create a text field, rich text field, or rich text lite field.

Text fields generally suffice for data entry or text output in an application. Rich text fields are better for formatted text, large amounts of text, or embedding or attaching objects. For example, the Subject field on a mail form is a text field, and the Body field is a rich text field. Rich text lite fields are rich text fields with a helper icon and down arrow next to the field. Clicking the icon gives the user a fast way to add an object into the rich text lite field. Clicking the down arrow displays a dropdown 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.

Rich text fields and rich text lite fields can be used anywhere except in a layout region. They are not subject to the size limitations imposed on other field types.

Displaying graphics, attachments, and objects in a rich text field

Many databases use an editable, rich-text field named Body to give users the flexibility of adding whatever they want to the main part of a document -attachments, graphics, objects, or different fonts and colors. A rich text field can contain anything a page contains. Note You cannot write to a rich text field by using simple actions or formulas. If you want to use simple actions or formulas to write to a field, use text fields. You can use a rich text field to launch an OLE object -- that is, to open an object from another application within a form. You can even define the field so that an OLE object automatically launches when a user opens the form.

Using rich text lite fields To add a rich text lite field to a form, select rich text lite from the field type list (Field Info tab of the Field Properties box). At the Control tab of the Field Properties box, check the object types you want to add to the drop-down menu that appears when the user clicks the down arrow. Note that if you select only one of these object types, no down arrow appears because there is no need to change types. You can select or deselect one or more of the following object types (the object types selected have a check next to them):

Pictures Shared Images Attachments Views DatePicker Shared Applets Text OLE Objects Calendar Inbox Links

In addition, you can check the following options:

Help - checking this lets the user choose to display brief help on an object type. The help changes depending on the object type the user selects. Clear - checking this gives the user the option to clear the contents of the field.

At the "First display" field, select the object you want as the default icon when a document is first created. For example, if a rich text lite field is limited to Pictures, DatePickers, and Shared Images, you can choose to display Pictures as the first icon (indicating the intended use of the field while still giving users the opportunity to add other types). If the user chooses another object type from the drop-down menu, the icon changes.

The "Field help" field lets you add help for each object type. Note that you must enter help in the order the fields are listed in the listbox. Also, you must separate each help text with the vertical bar character (|). For example, to add help if you have selected pictures, shared images, and a datepicker, enter the following in the Field Limit Help field: Picture help|Shared Image help|||DatePicker help| Note the extra vertical bar characters between Shared Image help and Date Picker help. These extra characters indicate that no help text exists for attachments and views.

This is what happens when a user clicks on an icon next to the rich text lite field:

For datepicker, inbox, and calendar, the object is inserted into the field immediately. For pictures, shared images, attachments, views, shared applets, text, and OLE objects, the corresponding dialog box appears. Once the user selects from the choices in the dialog box, the object is inserted into the field.

Form Actions
You can create an unshared action in a view, folder, form, page, or subform to provide one-click shortcuts for routine tasks in a view or document. Actions become part of a design element's design and are not stored with individual documents. You can also create a shared action in a database that can be used in multiple views, folders, pages, forms, and subforms. Shared actions are stored as shared resources in the database.

To build an action, you can use any of the following:


Simple actions that you select from a list Formulas LotusScript JavaScript Common JavaScript

When to use actions

Because actions are available in a view or document, use them for any general-purpose task related to a group of documents. For example, use actions:

When Web browsers accessing the database need substitutes for Notes menu choices. To present a shortcut as a clickable button. When the automated task is relevant only to a subset of documents. When users need to see all the available choices in a row at the top of a document. When the automated task isnt limited to a particular section of a form. If formulas are complex and you dont want to save the formula with each document.

Examples of actions

View actions -- Let users create, print, delete, or categorize documents. Form actions -- Process an approval; mail a document; or give Web users, who dont have access to Notes menus, a way to click to edit, save, or close documents. (1)Simulate Notes menus for Web users. (2)Automatically send documents to reviewers. (3)Automatically process employee requests.

Notes on actions Some views and forms in databases contain system actions, available either in the Actions menu, as buttons, or both. You cant change the "System actions" functionality, but you can customize their appearance in the action bar. Open the view or form. Click Objects and the system actions are displayed in the list.

Creating a form, subform, page, or view action

You can create actions in forms, subforms, pages, views, or folders to provide one-click shortcuts for routine tasks in a view or document. Actions become part of a design element's design and are not stored with individual documents. To create an action:
1. 2.

Open a form, subform, page, view, or folder. Choose Create - Action - Action. The Actions Properties box appears. Note that from the Create - Action menu you can also create an action with subactions or you can insert system actions or insert shared actions.

On the Action Info tab, do one or more of the following: Enter a name for the action. Label name - If you want dynamic labeling of actions, you can enter a formula in the label field. The dynamic label then appears as the name in the button or checkbox and on the action menu. Note that dynamic labeling works only in Lotus Domino Designer 6 or later. Earlier versions of Domino Designer use the name as the label. If applicable, specify a target frame (in the current frameset) to be the target of the action. For example, if you create an action that opens a view, specify the name of the frame in which the view should open. Select the display type for the action. You can choose Button, Checkbox, or Menu separator. Checkbox lets you show the state of an item (checked or unchecked). If you choose Checkbox, you can enter a Value in the Value field (for example, a formula that evalutes to true of false). You can also highlight the Click event in the Objects list of the Programmer's pane to enter a Click value. If you want the action bar's state (checkbox) to be reevaluated when a different document becomes current, make sure to check the "Evaluate actions for every document change" option at the Options tab of the Views Properties box. You can also use the @GetViewInfo function. For an example of a checkbox action, see Displaying hidden text with a checkbox action. If you choose Menu separator, a menu separator appears and there is no action. You can also use menu separators between subactions of an action drop-down list.

Check "Include action in Action bar" to make the action available as an item in the (1)action bar. If the action is a button action, you can also choose to have only the icon appear in the action control bar. Check "Right align action control" to have the action control aligned on the opposite side of whatever is set in the Action Bar Properties box. Note that it may not necessarily be right aligned. For example, If you choose "Buttons start at left" in the Action Bar Properties box and "Right align action control" in the Action Properties box, then the button appears on the right. However, if you chose "Buttons start at right" in the Action Bar Properties box and "Right align action control in the Action Properties box, the button is actually aligned on the left, that is, on the opposite side of the setting in the Action Bar Properties box. Check "Include action in Action menu" to make the action available as a menu item in the (2)Actions menu. Check "Include in right mouse button menu" to make the action available as a right mouse click menu item for views. The action will be listed in a new section at the bottom of the right mouse click menu. When the action is hidden on the Action menu, it will be hidden on the right mouse click menu. If the action is a shared action, it will be visible on the right mouse click menu of all views using that shared action.

You can select an icon to appear on the action button. The icon will not appear on the right mouse click menu. If you prefer a Notes graphic, select Notes and then click Image to select a graphic for the icon from a set available in Notes. If you prefer a customized graphic, select Custom. In the Image field, specify the name of an image resource or click the folder icon to browse for an image resource. The image resource must reside in the current database. You can specify the name of an image resource that does not yet exist. Designer warns you that the image does not exist and that you must create it later. Click @ and specify a formula (or set of formulas) to display an image programmatically. Tip If you do not specify a name or label for the action, Notes will use the graphic for the whole button. You won't be able to see the action in the action list, because there's no name for it, but you can click on the space at the end of the action list to access it.

4. 5. 6.

7.

(Optional) On the (1)Action Hide When tab, specify when to hide the action. (Optional) On the Advanced tab, specify how Notes workflow proceeds after the user activates the action. In the Info List of the Programmers pane, click Objects and select the action you just created. To program the action to run one of the client or one of the Web program code types, choose either Client or Web at the Run pull-down list. Choose Client when the automated task will run in the Notes client. You can then select one of the following Client code options:

Simple actions Formula LotusScript JavaScript (runs only on the Notes client) Common JavaScript (runs on both the Notes client and the Web)

Choose Web when the automated task will run in a Web browser.

You can then select one of the following Web code options:
JavaScript (runs only on the Web) Common JavaScript (runs on both the Notes client and the Web) 8. Save the form, subform, page, view, or folder.

To create an action with subaction Creating actions with one of more subactions lets you create a hierarchical list of actions. You can also drag and drop actions to create hierarchies. To create an action with subactions:
1. 2.

3.

Open a form, subform, page, view, or folder. Choose Create - Action - Action with Sub Action. A main action with an indented sub-action appears in the Action pane. The Actions Properties box also appears. Define the main action and the sub-action. You can also drag and drop other actions so they are subactions of the main action.

To create system actions When you create system actions, you are creating a predefined list of common view and form actions.

Open the form or view. Choose Create - Action - System actions. The list of actions created appears in the Action pane. These system actions include: Categorize Edit document Send document Forward Move to folder Remove from folder

Copying and deleting actions

To copy: select the action in the Action pane and choose Edit - Copy and Edit - Paste. To delete: select the action in the Action pane and choose Edit - Delete. To change properties: select the action in the Objects list and choose Design - Action Properties. To change automation: select the action in the Objects list and edit the programming tasks in the right pane.
Actions menu The Actions menu is a context-sensitive list of any actions and agents available for a particular part of an application, as well as some menu commands included with the Notes software. From an open view, Notes users see only those actions associated with the view, plus any manually run agents. From an open document, Notes users see the actions associated with the form used to create the document, plus any manually run agents. Web users dont see the Actions menu. Calling an agent You can use a form or view action to run an agent. Use the @Command([RunAgent]), @Command([ToolsRunMacro]), or the OpenAgent URL command to call an agent.

Views
A view is a sorted or categorized list of documents. Views are the entry points to the data stored in a database. Every database must have at least one view, although most databases have more than one view. Here are the general steps in planning your view.
1.

Before you create the view, think about:


Whether the view style will be an outline view or a calendar view. The type of view you want (shared, private, and so on). Whether the view will be displayed on the Web. If so you may want to consider creating an embedded view on a form, subform, page, or document or consider creating a view applet or an embedded view applet. The categories in the view.

2. 3. 4. 5. 6. 7. 8.
9.

Create the view by clicking "New View" in Designer. Name the view. Add columns to the view. Set up the documents to display in the view by writing the view's document selection formula. Set up what will display in each column by programming the column value. Set up the sorting order for the columns. Set the style for the view, row, and columns. Save and close the view.

Folders Folders are containers used to store related documents or groupings of documents. Folders have the same elements as view and are designed much the same way.

Views Properties To Open a view Do this .Select a database. .Choose View - Go To and select the view you want to open in a new window.

Open view that current open document is in, without closing the document Sort a view

With focus in the open document, choose View - Go up to Parent View.

If a triangle appears in a column heading, you can click the heading to sort the view. In some cases, double triangles appear so you can sort the column in several ways. When you change your view sorting, Notes saves your changes.

Show only selected documents in a view


Switch views in the navigation pane

Click the view pane and select at least one document. Choose View - Show - Selected Only.
If the navigation pane does not appear on the left of the view pane, drag the left edge of the view pane to the right.

Switch views from the menu Switch views while keeping your selected documents highlighted

.Choose View - Go To. .Select a different view. .Select the documents you want highlighted in another view. .Press and hold CTRL (COMMAND on the Macintosh) and select a different view. .Click the view pane. .Choose View - Expand/Collapse - Collapse All.

Collapse all items in a view to make it easy to scan

Expand only selected items in a view

.Click the view pane. .Select the item you want to expand. .Choose View - Expand/Collapse - Expand Selected Level. .Click the main view pane. .Select the item you want to expand. .Choose View - Expand/Collapse - Expand Selected & Children. .Click the view pane. .Choose View - Expand/Collapse - Expand All.

Expand only the selected level in a view

Expand all items in a view to see all levels of responses

Refresh a view to see new documents

.Click the view pane. .Choose View - Refresh.

Show only categories in a view

.Click the view pane. .Choose View - Show - Categories Only.

Search for text in a view

.Choose Edit - Find/Replace. .Enter the text you are searching for.

See more columns

The horizontal scroll bar should appear when needed. If it does not appear, do one of the following: Press the RIGHT ARROW key to display horizontal scroll bar. Drag the horizontal scroll bar right or left. Choose View - Show - Horizontal Scroll Bar.
.Move the cursor over the right edge of the column's title until you see a vertical line with two horizontal arrows (this is the splitter). .Drag the splitter to the right.

See more information in a column (if the column is resizable)

Database and view attributes The following table lists @functions that return database and view attributes.
Function (1)@DbManager Returns the users, groups, and servers that currently have manager access to the database. Returns a list. (2)@DbName Returns the names of the current Domino server and database. Returns a 2-element list. (3)@DbTitle (4)@ReplicaID Returns the title of the current database. Returns the replica ID of the current database

(5)@ServerName Returns the name of the server containing the current database.
(6)@ViewTitle Returns the title of the current view.

Formulas in Views
Formulas are the predominant language in views. Although there are events in views that can hold other languages, the language of the columns in a view is the Formula language. Formulas in view events A number of events and areas in a view exists where formula provides functionality. View Selection The view selection formula is where you define what documents are going to appear I your views. The formula in this area begins with a SELECT statement, and then is comprised of a combination of a field/value pairs that narrow the documents that are going to appear. One field that you should use In most of your view selection formulas is the Form Field. You should refine the documents that appear in your view by the form used to create them, because it makes your views more efficient.

Form Formula The Form formula area enable you to override the form associated with the Documents in a view, and use the form specified in the form formula area. You can use a formula to determine the form to use, as long as the formula results in a valid form name. You can use this event in the Notes client and on the web. One use for the Form formula is to use a different form for a document based on the role of a user. For instance, you may load one form for administrators that provides additional features and functionality for working with the document, while the standard user is presented the same document without the administrative functionality. Help Request The code in the HelpRequest event is executed when the user presses the F1 key in the Notes client while the view is loaded. HelpRequest is useful for providing context sensitive help in your applications. This feature only works In the Notes client. Target Frame Events The target frame (single click) and target frame (double click) events indicate the frame where a document is loaded whenever the user single or double clicks the document. You can use these two events I the Notes client and on the web

Normal View Events While developers use the normal view events (QueryOpen, PostOpen, QueryRecalc, QueryPaste, PostPaste, QueryClose, and so on) for Lotusscript, many developers are unaware that they can also use the Formula language in these events.

Column Formulas Colum formulas are where the power of Views exists. Column contains one of three things: Basic document information (authors ,created date), field values or formulas. The formulas entered in a column are evaluated for each document in the view to present a value. You can reference items on the documents in the view by item name, which is why column formulas are often used to present useful data that is not stored in the document. Another use of column formulas is to provide Pass-thru HTML for presentation of information on a web page. You can use columns to present other type of interesting information as well. You can, for example, present graphics in a view from your image resource by setting the column to display values as icons and the specifying the name of the icon. This can even be a formula, as long as it results in the name of an image resource.

Hide when formulas are now applicable to columns. You can specify a hidewhen formula, and when the condition evaluates True, the column is hidden to the user. The hide-when formula is evaluated as the view loads, but is not reevaluated until the view is loaded again.

Embedded Views

When you embed a view or folder on a form, subform, page, or document, you can control the size and appearance of a view or folder display, especially on the Web. Embedding a view or folder pane lets you combine views and folders with other form elements (such as styled text) and graphics. Before you begin, if there is any chance the view or folder you are embedding could be renamed, assign an alias before you embed it to avoid breaking the application if an embedded object is renamed. 1. Open a form, subform, or page in Designer, or open a document in Edit mode. 2. Place the cursor where you want the embedded view or folder to display. Choose one of the following: Create - Embedded Element - View Create - Embedded Element - Folder Pane

3.

4.

5.

6.

Views only: set a display option for the embedded view. You can display the view using HTML, as a Java applet, or using the display properties set for the view. (Optional, for views) You can assign a name to the embedded view. This name allows you to specify an embedded view as a target from another embedded view. This technique is used in the Notes mail template to show discussion threads in the Inbox view of the workplace. (Optional, for views) If you don't want to display the same view in all circumstances, click "Choose a View based on a formula." When you click OK to close the dialog box, write a formula in the Programmer's pane to display the appropriate view. (Optional, for views) You can specify a target frame on the Info tab of the Embedded View Properties box. The target frame specifies where the document is displayed when a user selects a document in an embedded view with a single click or with the arrow keys, or with a double click. You can specify a target frame for a single click (next to "for single click") and a target frame for a double-click (next to "for
double click").

7.

8.

(Optional, for views) If the embedded view is in the current database, you can select "Show only current thread" to display documents for one "thread" -- that is, one main topic and all the associated response documents. (Optional, for views) Check "Use views selection margin property" to maintain the margin settings you set for the view.

Tips

To delete an embedded view or folder pane, click the embedded view or folder pane in the Work pane and choose Edit - Delete. Domino prevents the view opening if there are create or read access lists on a form in which views are embedded. For compatibility with previous releases, the reserved fields $$ViewBody and $$ViewList still work on forms. When you embed a calendar view, the embedded view property "Disable scrollbars" has no effect. Scrollbars for calendars always display -- the horizontal scrollbar is used to change dates, and the vertical arrows appear if there are too many entries to fit the vertical space. If you are embedding a calendar view, make sure the embedded view has enough height to display as much of the calendar as you want displayed. The user will not have a vertical scroll bar to move lower in the view. Also, if the embedded view is too short, the bottom footer indicating which week/month of the year is being shown will not display.

After embedding a view, you can change the view by clicking the Formula button in the Programmer's pane, then clicking the View button. You will see a list of views from the database where the original embedded view came from. For example, if you embed the Inbox view from your mail database, then you want to change the view, your choices are limited to the other views in the mail database. To embed a view from a different database, you must first delete the embedded view and embed the view you want. To display a discussion thread in an embedded view from another embedded view, follow these steps: Create an embedded view with threads on a page or form and assign it a name in the Embedded View Properties box. Check the "Show only current threads" option on the Embedded View Properties box. Create another embedded view on the page, form, or document. In the "Single Click" target field on the Embedded View Properties box for the second view, enter the name of the first embedded view. When a user opens the page or document, both views launch, displaying the current document and the associated thread. For an example of this, see the Notes mail template.

Calendar views
A calendar view groups and displays documents in a calendar format. Such views are useful for organizing documents that keep track of schedules, meetings, and appointments.

When you create a calendar view, you can give users the option to display the calendar in a variety of formats, such as Two-Day, Work-Week, Week, Two-Week, or Month. Calendar views also let users: Navigate among days, months, and years. Print calendar entries for a selected range of days. Web users can see all calendar entries. Domino converts calendar views to HTML tables. Therefore, Domino restrictions for tables apply to calendar views. Web users cannot create new appointments or scroll through entries within a single day.

Creating a calendar view In a calendar view, documents that are created using a form designed for scheduling individual meetings, appointments, events, and the like, display as entries on a calendar. For an example of a calendar view, see the R6 Mail template (mail6.ntf) $Calendar view, and for an example of a calendar form see the form _Calendar Entry. It is best to create the form first, and then create the calendar view to display the documents created using the form. To create a calendar view You begin by creating a standard outline view. You can either complete Steps 1 through 10 for creating a standard view or you can convert an existing view to a calendar view. 1. Create a new view or open an existing view. 2. Open the View Properties box. 3. In the Style field, select Calendar. A dialog box appears. Click yes to continue. 4. Click the first column. In the Column properties box, select "Hide column." The first column of a calendar view defines the Date/Time the entry will display and should be hidden.

5.

6.

7.

In the Programmer's pane, choose one of the following and enter a value for the first column that will evaluate to both a date and time: Simple function - Select a value from the list that evaluates to a date and time -- for example, "creation date." Field - This displays a list of all the fields in the database. Select a date/time field from the form you will use with the calendar view. Formula - Write a formula in the Programmer's pane that evaluates to a date and time. Open the Column properties box and click the Sorting tab. Choose the sort option Ascending. Click the Date and Time tab of the Column properties box and check the Display Date and Display Time options. Tip The column settings for this column allow you to specify "Always show time zone," but this setting (along with the other column display settings) is not used by the calendar display. If you want the time zone to always be displayed, add another (visible) column to the view and put the time zone information in that column.

8.

9.

Create a second column or click the second column of the existing view. The second column must map to a field or formula on the document that specifies, in minutes, the duration of the event and it should be hidden. In the Column properties box, select "Hide column." Create a view selection formula that will select the documents to be displayed -- for example, _Calendar Entry.

Formatting options for calendar views Once you create a calendar view, you can format it. Click the Date and Time format of the View properties box. The Date and Time format tab appears only when Calendar is selected for the view style. On the Date and Time tab you have the following display options. Calendar formats available to users Check all of the display options you want to make available for users to select. For example, if you want to give the user the choice to view the calendar in a one month format or a one day format, check those two options. Note that the "Work calendars" option includes one work week, two work weeks, and the work month formats. These are weeks that display without Saturday and Sunday. Initial format Sets the format displayed to the user when the view first opens. Time slot display available to users A time slot is a graphical display of time periods in the view. If "Time slot display" is selected, time slots appear in the view. If you select this option then you must choose a start and end time for the time slots as well as the duration -- for example, one hour. If you select the option "Users may override these times," the user's Notes client calendar preference determines how time slots are displayed in the calendar. The option "Users may toggle time slots on/off for each day lets a user display and hide time slots for a selected day.

Other options In weekly and monthly views, "Group entries together by time slot" clusters entries under time slots instead of listing entries for a day. For example, if you have two entries for 12 PM and one entry for 1 PM, the different displays are as follows:

Group entries checked

Group entries unchecked

12:00pm Appointment 1 Appointment 2 1:00pm Appointment 3

Appointment 1 12:00pm Appointment 2 12:00pm Appointment 3 1:00pm

Troubleshooting a calendar view

If the calendar view does not display as you expect, there may be a problem with the selection formula or with the definition of the first column.

Check the selection formula for the view. Make sure the documents you want to display in the view match the selection formula. To test the selection formula, change the view to a standard view or refresh the view while in Designer. If the documents display, the selection formula is valid. Make sure the first column of the view is based on a Date/Time field and is sorted in ascending order. Display the documents in Designer to test the view. Both the date and time should display. The documents should display first sorted by date, and then for each date, sorted in chronological order, so that a 9 AM appointment displays before a 3 PM appointment on the same day.

Вам также может понравиться