Lotus Notes
HIT THE HOTSPOT
Buttons are just one way to initiate Notes actions. Another action starter is called an action hotspot; and although these work similarly to buttons, you can get a little more creative with the way they look. You can use text or other graphic images as the hotspot, but the action starts when the hotspot is clicked (like our pal the button). To create an action hotspot, first select the text or graphic, and then choose Create, Hotspot, Action Hotspot. Now set the properties and define the actions for the hotspot as you would with a button. You can use simple actions, formulas, or scripts.
ON THE BORDER
Should you place a border around an action hotspot? The answer depends on what you have made into the hotspot. If it's text, you should border it, because this makes it stand out. If it's a graphic, you probably don't need a border. Either way, the border option is in the Hotspot Properties box. Select the hotspot and choose Edit, Properties; then check Show Border Around Hotspot if you want one, or leave it unchecked if you don't. HIDE A HOTSPOT Hotspots (and buttons) usually need to be visible when the form is being used, but not when it's being printed. To set this, open the hotspot properties box and select the Window Shade tab. Select Printed from the list of Hide When options. MORE SPACE IN DESIGN VIEWS Sometimes you need a little more space in the view window. If you want to show only the documents in the view without other identifying elements, you can hide the document selection margin on the left or the column headings at the top. To do this, select the database and choose View, Design, then in the navigation pane click Design Views (or Design Folders). Double-click the view, choose Design View Properties (or Design Folder Properties), then click the "style" tab (the one with the "S" icon). Deselect "Show selection margin" and/or deselect "Show column headings." Close the view and save your changes. SELECTING DOCUMENTS WITHOUT SELECTION MARGIN If you have hidden the selection margin as we said in the last tip, can you still select documents in the view? Sure. Just press and hold the Shift key as you click document names. The selection margin appears temporarily while documents are selected, and hides again when all documents are deselected. MAKE MORE ROOM FOR ROW ENTRIES You can make entries a little easier to read if you give each one a little more space in the row. To add some space, select the database, then choose View, Design. In the navigation pane click Design-Views (or Design-Folders), then double-click the view or folder. Choose Design-View Properties, then click the "style" tab. In the Row spacing box, select any option other than single (the default). Close the view and save your changes. ALTERNATE ROW COLORS Another way to make views easier to read is to make the rows in alternating colors for the rows. To set the colors, select the database, then choose View, Design. In the navigation pane click Design-Views (or Design-Folders), then double-click the view or folder. Choose Design-View Properties, then click the "style" tab.Click "Alternate rows," then select the color for each row. Close the view and save your changes. VIEWING MORE COLUMNS Some Notes views contain more columns than you can see in the normal view window. Also, some columns extend past the right border of the view window, obscuring the column title. If you want to see all the columns the view has to offer, select View, Show Horizontal Scroll Bar from the main menu. A scroll bar appears at the bottom of the view, allowing you to scroll the view columns from left to right. COLUMNS UNCOVERED Notes columns may contain more information than you see in the view window. To see more information in a column, place the cursor over the right edge of the column title until you see a vertical line with two horizontal lines. This is called the splitter. Drag the splitter to the right and you will see more information. Note, however, that some columns don't allow you to do this. FORCED OPENING As a database designer, you can tell Notes to highlight certain rows when a user opens a view. To do this, select the database and choose View, Design. Select Design Views from the navigation pane, then double-click the view. Select Design, View Properties and click the Options tab. Select the row you want to highlight from the On Open list. Close the Properties box, then close and save the view. A GOOD SORT You should, of course, want to bring some order to the way your view displays documents. The best way to do this is to have Notes sort the documents automatically. To set the order, select the database and choose View, Design. Select Design Views from the navigation pane, then double-click the view. Double-click the view that you want to use for sorting and click the Sorting tab. Click either Ascending (sorts in increasing order) or Descending (sorts in decreasing order), then select Standard as the sorting type. Close and save the view. RULES OF THE SORT Notes has a particular set of rules for sorting in a column, and these are helpful to know when you set your sort order. The sorting order is as follows: numbers; letters; accented letters; punctuation or special characters. Sorting is not case sensitive. If there's only one sort column, documents and responses are ordered accordingly. If there are two or more sorted columns, the documents and responses are sorted and then sub-sorted, with a left-to-right column order. This means you should always place the primary sort column to the LEFT of any secondary sort columns. If the view or folder is also categorized, categorized columns should always appear to the left of any standard sort columns. If you plan to use a lookup formula (@DbColumn or @DbLookup) to retrieve data from this view, it's useful to include a sorted column that can be used as the lookup key. THE ASCENT AND DESCENT OF COLUMNS Does ascending or descending sort order matter? It certainly can. If you want to list the documents in the column in alphabetical or straight chronological order, choose to sort in ascending order. If you want to list the documents in reverse chronological order--that is, with the most recent date first--choose descending order. SORT ORDER TRICKERY The sort order is very useful; sometimes you need to resort to a little Notes trickery to avoid some limitations. Let's say you have a Notification form that contains a Priority field, which uses the keywords Urgent, High, Medium, and Low. Your top column in the view displays the Priority field, and is sorted and categorized. The problem is that the column sorts the field in alphabetical order (High, Low, Medium, Urgent), but you want users to see the documents in priority order (Urgent, High, Medium, Low). You can do this with two simple columns. Create the first column and make it hidden, no title, and one character wide. To determine the priority order, use this formula: @If(Priority=Urgent;1;Priority=High;2;Priority=Medium;3;Priority=Low; 4) Finally, set the sort order as Ascending. Create the second column immediately to the right of this column. Makes this not hidden, with the title "Priority," and at least 10 characters wide. Define the column to display the value of the Priority field. The first column takes the value of the Priority field and converts it to the numbers, which are then sorted in ascending order (1, 2, 3, 4). But because this column is hidden, the user only sees the display from the second column (Urgent, High, Medium, Low). HAVE IT THEIR WAY If you want, you can design columns so that users can sort them (rather than having the sort happen automatically). Users click the column header, then choose the sort method to see the documents in the order they want. This applies only to the user at the time and has no effect on the database design. To set this, select the database and choose View, Design. Select Design Views from the navigation pane, then double-click the view. Double-click the view that you want to use for sorting and click the Sorting tab. Select the option Click on Column Header to Sort, then choose the sort order. Close the Properties box, then close and save the view. USERS' CHOICE SORT OPTIONS There are four options for a user-sorted column: Ascending sorts in increasing order; Descending sorts in decreasing order; Both allows users to cycle among ascending, descending, and no sort order; and Change to View allows you to select a view that Notes switches to when the user clicks the column. If you choose the last option, make sure you tell the users that this is going to happen. You can do this in the column title; for example, you might give the column the title "Click here to switch to the XYZ View." NOW, WHERE WAS I? In Notes Release 3 (and earlier), Notes databases automatically opened to the same view that was open when the user last closed the database. This does not happen automatically in Release 4 (and later), but you can set an option for it. To do this, select the database and choose File, Database, Properties. In the Properties box, click the Launch tab and select the Restore As Last Viewed by User option. Close the Properties box, then close and save the database. A LETTER FOR EVERY VIEW Here's a tip for designing Notes views: If you intend to have your view appear in the view menu, try to name each view with a different letter. This is because Windows (and OS/2 or UNIX) users can select a menu item from the keyboard by pressing an accelerator key, in this case the first letter of the view name. Using a different letter makes each view stand out. ORDER IN THE MENU When naming Notes views, consider the order of your views in the menu. Remember that the view sorts names alphabetically. This means that if you want more frequently accessed views to appear at the top of the menu, you need to consider the letter on which they are sorted. If you really want to make sure views appear in a certain order, consider numbering them. BE CONSISTENT Always try to be consistent when you name views. For example, if you create several databases that contain similar information, use the same names for views that perform the same functions. Users can recognize views faster when they have standard names and can share information easier. COMMENTS, PLEASE You should be pretty clear about what your view does, but you may want to help designers who also work on it. To this end, you can add a brief comment as you name the view. Open the View Properties box, click the Basics tab, and enter your brief comment in the appropriate field ("Comment" of course). COLLAPSED BY DEFAULT It can take a little longer to open a view if all categories are open. To avoid this, you can set the view so that all categories are collapsed by default when a user opens the view. To do this, open the View Properties box, click the Options tab, and select Collapse All When Database is First Opened. GIVE IT AN ALIAS It's a very good idea to give your view an alias. No, this isn't so it can avoid the cops--it just makes some Notes processing easier. For example, if you have an alias, you can change the name that the user sees without having to update every formula and link that references the old name. An alias is usually just a shortened version of the regular name. Aliases are inserted in the naming process after the regular name, separated by a pipe symbol, for example: Corporate Profiles View | CProfile. GROUPS OF VIEWS View lists can get pretty long, particularly in databases that contain a lot of data. Once this happens, you run the risk of overwhelming users with too many views to choose from. To combat this, group your related views so that they cascade from one level. The easiest way to organize your views is to move them. Open the view and choose Actions, View Options, Move, then select a different view, which acts as the top-level view. Click OK to close the box and save your settings. THE OLD HIDDEN VIEW TRICK Views don't always have to appear on the View menu. Actually there are plenty of views that you don't need or want on the View menu because they perform Notes processing (such as lookups). No need for users to see that! To keep a view hidden, just make sure the Show in View Menu option in the Options tab of the View Properties box is unselected. NOT SECURE Keeping a view off the View menu is not--we repeat, not--a security measure. Any user with at least reader access to the database can make a private copy and see the view and its contents. You should hide views from the view menu primarily for reasons of convenience and database organization. WHAT'S IN A NAME View names can be any combination of characters, including letters, numbers, spaces, and punctuation, and they are case sensitive. The full name--including all aliases--can be up to 130 characters. This gives you a lot of leeway in what you want to name your views. SNEAK PREVIEWS Notes allows you to preview documents in views, which means that you can see the contents without opening them. This can save a lot of time in opening documents that really don't contain information you want. To do this, select the document and choose View, Document Preview. MAKING ARRANGEMENTS Not only can you preview documents, but you also have three ways you can arrange the preview screen. To set this, choose View, Arrange Preview and select one of the options from the Preview Pane. Click OK to close the Preview Pane. FIGHTING CORRUPTION If you suspect that a view has become corrupted, you can rebuild it. Select the view and press Shift-F9. To rebuild all views in the database, press Ctrl-Shift-F9. Be aware, however, that it can take a little while to rebuild all views if the database is particularly big. STARTING FROM SCRATCH You may run into a situation in which a view is really, really corrupted. If you can't restore the view from the desktop or a backup, you can restore order with a replica of the database. To do this, first play it safe and make a copy of the database with the corrupted view and rename it. Now create a replica of the database in the same directory as the original but with a different name. Delete the original database, then rename the replica with the original file name. This ensures that users can open the new copy with the database icon that they already have on their desktops. GO TO THE BACKUP Sometimes a view is so corrupted that rebuilding it from the desktop is not possible. If this is the case, you can restore the view from a backup database (you should have backups of all important databases). To do this, restore the backup database and give it a different file name than the active database. Copy the good view from the backup database and paste it into the active database. Now delete the corrupted view from the active database. SETTING THE COURSE Notes Navigators are a cool graphical way to perform actions or find documents, eschewing the need to go to the menu or through views. The graphic icons that you see in the navigation pane are standard examples of navigators, but you can create your own. Navigators can include simple actions, @function formulas, or LotusScript programs. Before you go about creating the navigator, however, you should set the course. First, determine and state the purpose for the navigator. Second, sketch out the graphics that you want to use for the navigator. Third, decide the specific actions that you want the navigator to perform. Fourth, try to find other navigators or graphics that you can copy and modify for your new navigator. Once you have the basics mapped out, you can start to create the navigator. We'll provide more on navigators tomorrow. SLASH AND BURN Another way to organize views in the view menu is the "slash" naming convention. When you name the view, enter a top-level name, followed by a backslash ("\"), and then a lower-level cascading name. When the user accesses the views they see the top-level name first, then the secondary names when they select the top name. ZOOMING IN To get a close-up look at your previewed document, select View, Show, Zoom Preview from the view menu. The document preview screen zooms to the size of the desktop window. (Note: This only works if you have View, Document Preview selected.) READ THE PREVIEWS The preview pane is great because it allows you to view documents without opening them. The only problem is that these documents don't appear to be read, even if you have seen them from the preview pane. Actually, you can mark previewed documents as "read." To do this, choose File, Tools, User Preferences, then select Mark Documents Read When Opened in the Preview Pane from the Advanced options list. Click OK to save the setting and close the User Preferences box. COPYCATS Like most things, the easiest way to create a navigator is to copy one that already exists. Your best bet is to find one that performs similar functions to what you intend. Once you do, select View, Design, then click Design, Navigators from the navigation pane. Click the navigator and choose Edit, Copy. Now open the database that you want to copy the navigator into, choose View, Design then click Design, Navigators from the navigation pane. Choose Edit, Paste and the navigator is yours. Make sure that you modify it for the needs of your particular database. KEEP IT IN THE BACK If you have the Notes workspace window maximized, you can keep it behind all other open windows automatically. This means that Notes returns to the last active window instead of the workspace each time you close a window. To set this option, choose File, Tools, User Preferences and select Keep Workspace in Back When Maximized from the Advanced options list. Click OK to save the setting and close the User Preferences box. RIGHT ON In the previous tip, we explained how to set Notes so that a double-click with the right mouse closes the active window. Remember also that you can single-click the right mouse to produce a menu for Notes actions. The menu is context-based, depending on what database, view, or document you're working in. DOUBLE-CLICK CLOSE You can set Notes to close the active window with a double-click of the right mouse button. To do this, choose File, Tools, User Preferences, then select Right Double-Click Closes Window from the Advanced options list. Click OK to save the setting and close the User Preferences box. The setting takes effect only after you have stopped and restarted Notes. BE YOUR OWN DANIEL WEBSTER It's nice that Notes has a spelling checker, but we bet there are plenty of words that you use all the time that aren't in the Notes dictionary. Hey, no problem--just add them yourself. To add words to the dictionary, choose File, Tools, User Preferences and click the User Dictionary button from the Basics panel. To add a word, enter it in the text box below the larger list box, and click Add. When you're finished adding words, click OK to close the User Spell Dictionary box, and then click OK to close the User Preferences box. AUTOMATIC ARCHIVE The Notes mailbox can fill up pretty quickly. If you want to save old messages, but don't want to wade through them in your active mailbox, set up an archive. The easiest way to archive is to do the job automatically; that is, when messages meet certain criteria that you set, Notes moves them to a separate archive database. This is very easy to set up. Open the mail database and select the Archiving view. Click Setup Archive, which opens the Archive Profile document, then select the options that you want for the profile. Click Specify Archive Location, and choose the location and name of the archive database. Click Save Profile, and Notes saves the profile and creates the archive database. Finally, click Close to close the Archive Profile, then click Enabled Scheduled Archiving in the Archiving view. NOT AUTOMATIC In the last tip, we showed you how to set up an archive profile for automatic archiving. This is a handy way to clear up mail database clutter, but you don't need to make things automatic. For example, if you don't have volumes of mail coming in, you might just want to archive messages whenever you want. To do this, select the messages you want to archive from the mail database, then choose Actions, Mail Tools, Archive Selected Documents. Remember that in order for this to work, you need to have the Archive Profile already set up. PROMPT ATTENTION If you use Notes in more than one location, you can have Notes prompt you for your current location each time you start Notes. To set this, choose File, Tools, User Preferences and select Prompt for Location from the Startup options. Click OK to close the User Preferences box. This setting takes effect the next time you start Notes. LARGE TYPE SECTION Do you find yourself squinting to read the text on the Notes desktop? Rather than getting a new prescription for your eyeglasses, switch the font size for all text. To do this, choose File, Tools, User Preferences, then select Large fonts from the Advanced options list. Click OK to save the setting and close the User Preferences box. When you close and reopen Notes, you will notice a big difference in the desktop. In fact, don't try this if you like to have many databases displayed on the desktop. JUST FOR OPENERS You don't have to see the desktop every time you open Notes. In fact, you can select a database to open each time you start Notes. A particular favorite is opening on your Notes mail database. To set this option, choose File, Tools, User Preferences and click the Startup Database button from the Basics panel. From the Startup Database dialog box, select the database that you want to open with, then click OK. Click OK again to close the User Preferences box. The next time you start Notes, it opens in the selected database. TYPEWRITER DISPLAY Notes has another text display style called typewriter fonts. These are evenly spaced characters, and you can use this display to check tab alignment in forms or column widths in views. To set this option, choose File, Tools, User Preferences and select Typewriter Fonts from the Advanced options list. Click OK to save the setting and close the User Preferences box. The setting takes effect only after you have stopped and restarted Notes. THE SHARPER IMAGE If you think the images you see in Notes look a little fuzzy, try sharpening them up. You can do this by setting Notes to dither 256-color images. From the Notes menu, choose File, Tools, User Preferences and select Dither Images in Documents from the Advanced options list. Click OK to save the setting and close the User Preferences box. The setting takes effect only after you have stopped and restarted Notes. ARCHIVE VIEW SHORTCUT Once you have an archive database set up, you can access it and view the archived messages as you would in any database. There is also a shortcut to the archived messages directly from the active mail database. Just open the Archiving view and click Open Archive Db. Notes immediately opens the database that contains your archived messages. You can open the messages as you would in your mail database. NOT A LOCAL HERO When you set up an archive profile, you must specify a location for the archive database. You have the option of locating it Locally or On Server. In most cases you'll want to choose On Server. The archiving procedure only works on a local archive database if your mail file is also local. Once you've chosen On Server, you need to enter the server name in the Archive Database is on Server field. MAKING SAVES In the last tip, we explained how to launch file attachments. Keep in mind, however, that if you make any edits to the file, they won't be saved in the launched file. If you want to edit the file, first save a copy of the file, then edit the copy. GET THE ATTACHMENT LOWDOWN When you receive an attachment to a file, you probably want some basic information about it before you access or save it. When you double-click the attachment you can find out the name of the attached file, the file's size, and the date and time that the file was last modified. READY, SET, LAUNCH If you receive an attached file in a Notes mail message, you can launch the file from Notes as long as you have the application the file was created with. Just double-click the file attachment, then click Launch. The file opens right up. SAVING ATTACHMENTS Attached files can take up mail database space quickly. Because of this, you should get in the habit of saving attachments to disk. If a message has more than one attachment, you can save some or all of the files at the same time. If you want to save one attachment, double-click it. If you want to save some but not all attachments, drag the cursor over the files that you want, then select Attachments, Detach All Selected. If you want to save all attachments, select any attachment, then choose Attachment, Detach All. Next, specify the drive and directory that you want to save the files to and click Detach. DID YOU GET THAT MESSAGE? When you send Notes mail messages, you might want to make sure they get delivered. Here's how to request a mail notification. When you create the mail message, click Delivery Options and select one of the following options from the Delivery Report drop-down list: Only on Failure, Confirm Delivery, Trace Entire Path, or None. Click OK to close the Delivery Options box, then send the message as usual. WHAT'S THE FIELD? If you're not sure what a Notes field does, look for the field help. To get help, open a document in edit mode, then select View, Show-Field Help. A bar appears at the bottom of the document window that contains a brief description of the field you have selected. Of course, the description changes when you change fields. FAB TAB If you want to change the paragraph tabs in a Notes document, pull out the ruler. To do this, open a document in edit mode, then select View, Ruler from the document menu. A ruler bar appears at the top of the document window. To change the tabs, click the ruler where you want the left tab, then right-click where you want the right tab. Just press the Tab key to move from tab to tab. If you want to deselect a tab, just click it. MAIL CALL There are a number of ways you can have Notes tell you when you get new mail. It can beep, display a message in the status bar, and/or display a dialog box when new mail arrives. To set these, choose File, Tools, User Preferences, and click the Mail icon. Select Check for New Mail Every X Minutes, then enter the number that you want Notes to check for new mail. Check Audible Notification, Visible notification, or both. Click OK to close the User Preferences box and save your settings. DON'T BOTHER ME In the last tip, we explained how to set up Notes to notify you when you have new mail. If you don't want to be bothered with new mail notifications, choose File, Tools, User Preferences, then deselect the Check for New Mail Every X Minutes option. RULER OF THUMB We mentioned in the last tip that you can use the ruler in Notes to change tabs. You can also use the ruler to quickly set the margins of Notes documents. To do this, open a document in edit mode, then select View, Ruler. To set the margin, click the slider icon on the ruler bar and move it right or left. Click again when you've reached the margin you want. DATABASE LINKAGE Got a database that you really want to let other users know about? Link it in a mail memo. To create the database link, first select the database from the desktop, then choose Edit, Copy As Link, Database Link. This copies the database to the clipboard. Now open a new memo and place the cursor where you want to insert the link, then choose Edit, Paste to paste the link. (You can do this in any rich-text field; it doesn't have to be a mail memo only.) CHECK THE LINKS Document links are great because they allow you to open a document directly from another document. If you want to try before you buy, however, just choose View, Document Link Preview. The linked document appears in the preview pane. SEE MORE PREVIEWS Yesterday's tip mentioned the preview pane, which lets you view documents without actually opening them. Remember that you can make the preview pane larger (or smaller if you want) by dragging the upper border. KEEP IT IN THE FAMILY Notes makes it easy to keep in touch with the parents--parent documents that is. Here's how. If you're reading a response document and want to see what the source is (the parent document), just select View, Parent Preview. The parent document is shown in the preview pane. ANY REPLICAS OUT THERE? Do you need to know if a particular database on your desktop has any replicas? If so, select the database and choose File, Replication, Find Replica. Select the server to search from the Add Replica To Workspace box, then click OK. Notes searches the server for any replicas of the database, then adds them to your desktop automatically. STACK 'EM AND RACK 'EM If you have a couple replicas of a database on your desktop, you can keep them all in one place--under the same database icon, actually. This is called stacking the replicas in Notes-ese. To stack your replicas, select View, Stack Replica Icons. All replicas end up under the same database icon, although the icon now includes a selection arrow. To switch between replicas, click this arrow and select the replica you want to work with. ADD MAN In the previous tip, we told you how to create a portfolio database, which stores other databases in one neat package. When you put databases in the portfolio from the Add Database to Portfolio dialog box, notice that the box shows the databases that you have on your desktop, listed by workspace page. The box list shows the workspace page title enclosed in dashes (for example, "- Workspace Page One -"). Be aware that you can add a database to your portfolio only if it's already on your desktop. If you want to include several replicas of the same database, Notes adds only the first replica that you select. Finally, there's no limit on the number of databases you can include, but Notes displays only the first 20 databases in the navigation pane. PUT IT IN YOUR PORTFOLIO A portfolio is a great way to organize your databases in Notes. A portfolio is just a database that groups other databases. The databases within a portfolio appear in the navigation pane, where you usually see views listed. You can use portfolios to put related databases all in one place, making it easier to access and manage the information. You can create a portfolio from a standard Notes template file (NTF). To do this, open Notes and choose File, Database, New, which opens the New Database dialog box. Choose the server to host the portfolio database (usually you would select Local), then enter a title and file name. Now go to the template list and select Portfolio (R4.6) (prtflo46.ntf). Click OK, and you're all set--Notes creates and opens the basic portfolio. Now, to put other databases in the portfolio, click Add Database and select the databases from the list that appears. Click OK and then click Done when you're finished. LOOKING THROUGH THE PORTFOLIO A portfolio database looks essentially the same as other Notes databases, but there are some different features to note. When you open the portfolio, you'll notice that all the databases included appear in the navigation pane (on the left) where you normally see the available views for a database. To access the information in any database in the portfolio, click the extender triangle in the icon. When you do this, you see all the views in that database, just as you would normally see in the navigation pane if the database were open. Select a view, and the view contents appear in the view pane. Now you can access the documents as you would with any open database. Note also that any buttons specific to a particular view appear in the button bar when you access that view. A NEW IDENTITY If you have databases in a portfolio with the same name, you can change the database's display title in the portfolio, without changing the title. This can save you a lot of confusion. To give the database a new portfolio identity, open the portfolio and click the portfolio name bar in the navigation pane, then click Edit Portfolio. Choose the database that you want to change the title of, then choose Actions, Edit Document. Enter the new name that you want in the Display Title field, then choose File, Save and File, Close. Click Done when you have finished changing all the names you want. PORTFOLIO SEARCH You can search a portfolio just like any other database; the only difference is that you search the currently open database in the portfolio. If you want to search a different database, just click the database icon in the navigation pane. In order to perform the search, enable the search bar for each database that you want to search. To do this choose View, Search Bar. PORTFOLIO REDECORATING When you create a portfolio database, the databases you include appear in the navigation pane in the order that you add them (top to bottom, with the first at the top). You can rearrange the order if you want, however. To do this, open the portfolio and click the portfolio name bar in the navigation pane (it's at the top), then click Edit Portfolio. In the portfolio management view, select the database you want to move, then click either Move Up or Move Down. The database moves up or down one place, so you need to repeat the action if you want to move it farther. Click Done when you have finished, which brings you back to the portfolio main view. You will see the databases arranged in their new order. REMOVED FROM THE SITUATION OK, once you have databases in a portfolio, can you get them out? Of course you can. To remove a database from a portfolio, open the portfolio and click the portfolio name in the navigation pane, then click Edit Portfolio. Select the database you want to get rid of, then click Remove Database. That's it--just click Done when you've dumped all the ones you want. PULL THE SWITCH You can include several database replicas in a portfolio database, and all replicas appear under the same icon in the navigation pane. To switch among replicas, right-click on the database icon and select the replica you want from the floating box. The portfolio changes to the selected replica and opens to the view you last used in that replica. MULTIPLE COMPACTS You can compact several databases on a server at the same time. To do this, select File, Tools, Server Administration, then select the server. The Administration window appears where you click the Database Tools icon. In the Databases box, select the databases you want to compact, then select Compact from the Tool list on the right. Click Compact to initiate the compacting. This can take a long time if you have many databases selected, or if some are particularly large, so you should do this only when these databases aren't in heavy use. SPACE COMPACTOR Notes databases can take up a lot of space on your hard drive. Deleting documents may cleanse a database of out-of-date material, but it doesn't help free up much space. This is because the deleted document leaves unused space, which takes up valuable disk space. You should get rid of this unused space by compacting the database. To do this, select the database and choose File, Database, Properties, then click the Info tab (I). Click % Used. If this number is under 90% (that is, the database contains more than 10% of unused space), click Compact. 'DEAR DIARY' If you want to keep track of your personal activities and thoughts, why not create a Notes database? A Notes template named "Personal Journal" allows you to do this more quickly than you can say "Dear Diary." To create the journal database, choose File, Database, New to open the New Database dialog box. Choose the server (most likely you want to keep it Local), then enter a title and file name. From the template list, choose Personal Journal (R4) (journal4.ntf), then click OK. Notes creates and opens the new database. OPENING MOVES When you have a portfolio database open and you open a database that the portfolio contains from the desktop, Notes opens the database from within the portfolio. The portfolio window appears open to the database that you just opened. ABOUT A TEMPLATE Notes includes a series of database templates that allow you to create useful Notes applications quickly and easily. When you create a new database (select File, Database, New from the main Notes menu), you can start from scratch or select a template file. This is done in the template section of the New Database dialog box, which lists all the templates that are available on a particular server. Before you select the template, however, you can see what it does. To do this, select the template, then click About. The About document for that template appears. Click close when you have enough information about the template, and you return to the New Database dialog box. WHAT A CARD The information about people in the Personal Name and Address Book database is entered and stored in a form called Business Card. To create these, just click Add Person to open a New Business Card, then enter any information you want to include in the appropriate fields. Click the down arrow key to access "assistants" for certain field entries. When you're finished, click Save and Close to add the card to the database. LITTLE RED BOOK Here's another useful database you can create from a Notes template. If you want to store all your names and addresses in a handy spot--say, your Notes desktop--everything you need is right here. Open Notes and select File, Database, New, which opens the New Database dialog box. Go to the template list and select Personal Address Book (pernames.ntf). Select the server (keep it Local unless you have a reason for putting the database on a server), then enter a title and file name (use the "nsf" file extension). Click OK, then wait for Notes to create and open the database. As you can see, the personal address book allows you to keep information about the people, companies, and servers with whom you need to communicate. CUSTOM MADE A couple of tips ago, we explained how to create a Personal Journal database from a Notes template. These templates are great because they provide a framework for databases, saving you from designing the thing. And although the template provides the framework, you can customize it any way you want (depending on your access). If you want to modify a form or view, go ahead and do it. If you want to keep the changes you make, however, you must prevent the database from inheriting design changes from the template. To do this, select File, Database, Properties and click the Design tab of the Properties box. Deselect the option Inherit Design From Template. The database now has no association with the template and won't change if the template changes. MORE THAN YOU NEED TO KNOW In yesterday's tip, we explained how to use the Business Card to enter information about people in your Personal Address Book database. The Business Card contains fields for just about any item of information you may need--name, address, title, phone/fax numbers, e-mail address, etc. But that's not all, folks. Go to the bottom of the card and click More Info. Here you can enter additional information, such the person's manager, assistant, spouse, and children's names. That's just about as much information as you need about anyone. USING YOUR JOURNAL The Personal Journal template gives you a great way to keep track of thoughts or project ideas in a Notes format. As with any Notes template, you can customize the database you create from the template to suit your particular needs. The Personal Journal database has a good help document that gives you many ideas on how to use it. To access this, select Help, Using This Database, which opens the Using Personal Journal document. CHECK IT IN, CHECK IT OUT If you want to organize databases in place, put them in the library--the database library, that is. A database library is simply a database that lists and provides descriptions for other databases. You can create libraries that list all databases on a particular server, or all the databases that are related to a particular project. Before you put databases in the library, you need to create it. To do this, select File, Database, New, to open the New Database dialog box. Go to the template list and select Database Library (dblib4.ntf). Select the server (keep it Local unless you have a reason for putting the database on a server), then enter a title and file name (use the "nsf" file extension). Click OK, then wait for Notes to create and open the library database. When you create a library database, you automatically become the manager and head librarian, but you can add others to this role if you want. BE A PUBLISHER Once you have the library database created, you can begin to enter the databases that you want to list in it. This is called "publishing" in Notes-talk, and the process is largely automatic. There are two conditions that must be met before you can publish a database to a library: You need to have at least Author access to the database you want to publish; and the library you want to publish the database in must be added to your desktop (it won't work if the library is simply on the server). Once you have those conditions set, publish the database. To do this, open the Notes desktop and select the icon of the database you want to publish (you don't have to open it). From the Notes menu, select File, Database, Publish, which opens the Publish Database dialog box. >From the Available Libraries list, select the library that you want to publish to and click OK, which creates the Database Entry form. Enter an abstract (brief description) for the database, and enter a long description if you want (optional). Click Save Database Entry, then click Close. The database appears in the database library, with the abstract you entered as the title in the main view. CONAN THE LIBRARIAN If you want help in the library, you can add librarians. To do this, you need to have at least Editor access to the librarian. Select the library database icon, then choose View, Go To and select Librarians from the view and folder list and click OK. Select the Librarians document and put it in edit mode. Enter the names of the people you want to make librarians in the Librarian List field. Close and save the document. LIBRARY REQUEST In the previous tip, we explained how to publish a database to a library database. In order to do this, however, you need at least Author access to the database. Well, what if you'd like to see a database in a library, but you only have Reader access? In this case, you can request that someone with the proper access publish it. To do this, open the Notes desktop and select the database that you'd like to see published. From the main Notes menu, select File, Database, Publish, which opens the Publish Database dialog box. From the Available Libraries list, select the library that you want to publish to, then click Yes when Notes asks if you want to mail a library request. Send the mail message that appears automatically to the person(s) who can publish the database. WORKING IN THE LIBRARY Once you have a bunch of databases in a database library, there are a number of ways to work within the library. You can see all the databases in the Databases by Title view, and you can select and open the database documents to see the abstract information. If you want to open the database, but not add the icon to your desktop, click Browse Database. If you want to open the database and add the icon to your desktop, click Open Database. If you want to add the icon without opening the database, click Add Icon. When you're finished, just close the documents and the database. YOU CAN REBUILD IT Here's one very valuable way to use a database library. Create a library and populate it with all the databases you have on your desktop (this is sometimes called a local library). Now if your desktop.dsk file gets corrupted, you can rebuild it from the local library.

NAVIGATE 'ER The last couple of databases that you created from Notes templates included a button in the menu bar called "Navigator." This allows you to choose the view pane. One version of the view pane appears in the traditional Notes format, with the views and folders listed in text format. The other version is the navigator, which uses graphic icons. Just click the Navigator button to choose the view pane that you want to display.

DOCUMENT DOINGS A few tips ago, we told you how to keep a list of databases in a library database. Well, there's another useful library database you can create from a Notes template. This is called a document library, and its simple purpose is to store lots of documents (although it includes some neat features that go beyond simple storage). To create the document library database, select File, Database, New to open the New Database dialog box. Go to the template list and select Document Library (doclib4.ntf). Select the server (keep it Local unless you have a reason for putting the database on a server), then enter a title and file name (use the "nsf" file extension). Click OK, then wait for Notes to create and open the document library database. Now that the database is complete, you might ask, what documents should go in it? The answer: anything you want. The documents can contain all kinds of Notes elements, from text and graphics to attachments or scans.

PUBLIC OR PRIVATE? The documents in a document library database can be anything you need them to be. To create a document, click New Document. As you can see, you have a title field that identifies the document and a body field where you can enter the main contents (rich text, graphics, attached files, links, and so on). One handy feature is the public/private option, exemplified by the button in the menu bar. If you click Mark Private, the document is stored in the database, but you are the only one who can see it. If you click Mark Public, the document is available for all to see.

REVIEW NEWS The document library database contains a couple of very useful features that add value to the database and, better yet, are easy to set up and use. One of these is a workflow element called the Review Cycle. This essentially allows you to route a document through a review and approval process. To set up a review cycle for a document (you must be the author to do this), put the document in edit mode and click Setup Review Cycle to open the Review Cycle wizard. Select the Review Cycle options, then click OK. The Review Cycle Information appears on the document in a new section. Enter the names of the reviewers. You can only enter individual names here, not groups or servers. Click Submit for Review to start the cycle. The document is routed according to the criteria you set for the cycle.

SECTION PREVIEWS If you want to save space in a preview, you can create sections that display only when you preview the document they're in. To do this, create the section (in a rich-text field), then choose Section, Section Properties. Click the Expand/Collapse tab, and choose the Preview Only option. Close the Properties box and save your settings. When previewing the document, the user has the option to expand the section to see its contents. The full contents display if the document is in any other mode, however (when you open it in read or edit mode, for example).

MARK PREVIEWS AS READ When you read a document in the preview pane, it doesn't open the document, so normally the document is not marked as read. However, you can have Notes mark any documents you preview as read. To do this, choose File, Tools, User Preferences from the main Notes menu. Under Advanced options, select "Mark documents read when opened in preview pane." Click OK to close the User Preferences box and save your settings.

IDs--NORTH AMERICAN OR INTERNATIONAL? Before you install a Domino server, you and your company must make a number of decisions that will have far-reaching impact. For instance, you must choose the platform and protocol you will use and settle on a naming convention. One more item to be pinned down before you install your first server is what type of ID to use. You have two options: a North American ID or an international one. The decision about ID type is crucial. Federal laws dictate that you cannot take North American software or IDs outside the U.S. or Canada because of the encryption technology involved. That means that if your CEO wants to take his laptop on his trip to Italy, he's out of luck unless you decided to use the international ID type (and software). Even if your company is now doing business strictly inside North America, you must consider scenarios like this. The decision you make about ID type will affect the software version you purchase. A mistake now can mean you'll wind up reregistering every laptop in your company, not to mention buying new software for each one. Make sure you give this important issue the thought it deserves.

USING NOTES TO SCHEDULE MEETINGS, PART 1 OF 2 When mail users invite coworkers to a meeting using the Calendaring and Scheduling tool introduced in Lotus Notes 4.5, they can save time by checking other users' schedules. By clicking Find Free Time in the New Calendar Entry/Invitation dialog box, users can check to see if invitees are free at the specified time. If they're not, Notes will suggest alternate meeting times. This process relies on two behind-the-scenes server tasks: Schedule Manager (SCHED.EXE) and Calendar Connector (CALCONN.EXE). Schedule Manager creates a Free Time database (called, ironically, BUSYTIME.NSF) in the Data directory the first time the task starts on a server. Schedule Manager keeps the database (which contains an entry for each mail user on that server) up- to-date on a continual basis. When a mail user clicks Find Free Time, Schedule Manager tracks down each invitee by checking the Public Name & Address Book. Once it locates the mail file and mail server for each invitee, it checks each server's Free Time database. Based on the results, Schedule Manager compiles a list of possible meeting dates and times. Calendar Connector's role is to enable Schedule Manager to check databases on other servers. In our next tip, we'll look at how Calendar Connector works.

USING NOTES TO SCHEDULE MEETINGS, PART 2 OF 2 In our previous tip, we explained how Schedule Manager checks Free Time databases on other servers when a mail user invites coworkers to a meeting. The server task Calendar Connector (CALCONN.EXE) lets Schedule Manager do its job by finding the most efficient path from the originating server to any other servers that must be checked. If any of the servers reside in a different domain, you must set up an adjacent domain record. Setting up an adjacent domain record is simple. Begin by opening your Public Name & Address Book. Choose Create | Domain and change the Domain Type field to Adjacent Domain. In the Calendar Server Name section, enter the name of the adjacent domain and the name of the server to which you want to enable a connection.

DELETION STUBS: HOW THEY WORK AND WHAT TO DO IF THEY DON'T

When you delete a document in a database, Notes communicates the deletion to other replica copies by using a deletion stub--a small file that the database retains and replicates to the next copy, which in turn replicates it to the following copy and so on. Eventually the document is deleted in all copies of the database.
Occasionally, however, a deleted document will reappear. This happens if the purge interval for the database is set at too short a time. The purge interval dictates when deletion stubs are removed from databases. If the purge interval is shorter than the longest interval for replication, Notes may try to replicate the document in a database whose deletion stub has already been purged. With no deletion stub in place, the database assumes the document is new, and the document reappears.
To correct this problem, go to the Space Savers section of the database's Replication Settings dialog box. At the top of the box you'll see a check box that reads Remove Documents Not Modified In The Last XX Days. (The actual number will probably be 90.) Even if the box is not checked, you can successfully increase the purge interval by typing a new (larger) number in the field.
NOTE: The Remove Documents entry works whether the box is checked or not. If it is checked, documents are deleted on the specified schedule (i.e., documents not modified in the last XX days are removed), and the purge interval is set for one-third the number of days specified. If the box isn't checked, no documents are removed, but the purge interval is still set at one-third the number of days.

FREEING UP A SLOW SERVER

If you notice a Domino server responding slowly, you can temporarily free up the server without shutting down or otherwise disrupting the work of end users. To do so, use the server command Drop All. (You can issue this command at the server or at a remote console.)
The Drop All command frees up the server's resources by disconnecting everyone who is currently using the server. Most users won't even know they've been dropped, because they can reestablish a connection immediately and automatically simply by continuing to use the server. They may notice a slight delay during reconnection, but they can proceed with their tasks normally.
What's the benefit of dropping users, only to let them reconnect immediately? Chances are, many of them won't reconnect at all. At any given time, many users who are connected to a server aren't doing any actual work on it. If you find that a majority of connected users aren't actively using the server, drop them all and let the ones who are working reconnect (again, this will happen automatically). By doing so, you lighten the server's load and increase performance for those who are actually working.

FULL-TEXT INDEXING

For your users to reap the full advantage of Notes' databases, you should allow them to conduct full-text searches of each document in a Notes database. You can set up full-text indexing on a database whether it resides on a Domino server or on an individual workstation or laptop. Of course, searches conducted on the server are naturally more efficient.
To set up full-text indexing, select the database and then choose Files | Tools | Properties. Under Properties, on the Full Text tab, choose Create Index. When the Full Text Create Index dialog box appears, you have the options of creating a case-sensitive index, allowing the search to include files attached to the database, indexing encrypted fields, and excluding words in the Stop Word file.
The options you select will affect the amount of disk space used. For instance, if you don't choose to exclude words in the Stop Word file (which includes words such as "the" and "and"), your index will mushroom by as much as one-third--without providing any real benefit to users.

PERFORMING A CUSTOM INSTALLATION

When you're installing the Lotus Notes client software on a workstation, a standard installation will normally do the trick. Occasionally, however, you'll need to do a custom install--say, if you want to install the full version of online Help, or if you want to place additional templates on the machine.
During a custom install, Notes' Install program selects all Notes features and lets you decide what to install and what not to. At a minimum, you must install Notes Workstation and Personal Data Files.
Here are a few suggestions on what NOT to install:
  • Lotus Domino Server
  • Additional Templates--if these files are available on the Domino server, there's usually no point in installing them locally.
  • Documentation Databases--again, these are usually available on a Domino server.
  • Notes Release 4 Help/Notes Help Lite--if the machine will always be connected to a Domino server, you don't need to install either of these features. If you do install Help, choose one or the other, not both.
    The Lite version is a subset of the full Help database, so there's no reason to have both.
    If you're doing the custom install on a workstation, don't install either of the Advanced Services features. They're meant for servers only.

    SET YOUR SERVER TO RESTART AUTOMATICALLY AFTER A POWER FAILURE

    If there's a power loss in the middle of the night or over the weekend (or at any time, for that matter), it's best if your server can restart itself automatically. That way, operations can continue even if you're not immediately available.
    Your server ID's password is the primary barrier to an automatic restart, because the server will wait indefinitely for you to enter the password before it launches the necessary files. Therefore, to enable an automatic startup, you must remove the password from your server ID. (Do not do this unless your server is physically secure in a locked room. Otherwise, the lack of a password poses an obvious security risk.)
    Incidentally, you may run into trouble trying to remove the password. If you find you can't remove it, chances are good that you registered it with the default length of one character. To get around this obstacle, reregister the server with a password length of zero.

    SETTING UP A ROOM OR RESOURCE

    When users schedule a meeting using Notes' Calendaring and Scheduling feature, they may also want to reserve a room or a resource such as a projector. To enable users to do so using Notes, you must create a database containing those rooms and resources. You can use the Resource Reservations template to do so.
    Select File | Database | New and choose Resource Reservations from the template list. (You can call the database anything you want and save it anywhere on your server.) Once you've created the database, create one site document (site profile) for each separate geographical location where you intend to set up rooms and resources. If your company has just one site, of course, you need to create only one document.
  • Save the site profile, and select a server where the database's agents can run. (If you find you're not able to create a site profile, check the Access Control List--you must appear in the Create Resource role to carry out this task.)
  • Once you've created the site, you're ready to build documents for the rooms and resources you want to include in the database. You can do so via the New Resource dialog.

    DEALING WITH THE "SERVER IS ALREADY RUNNING" ERROR

    The following message may occasionally appear when you attempt to launch your Domino server: Server is Already Running in Another Process
    The first step in troubleshooting is obvious: Check to see if the server is, in fact, already running. But if it's not? In that case, the most likely source of the problem is that you're trying to bring the server up after a crash. If the server went down via any manner other than the E (Exit) or Q (Quit) commands, you're likely to see this error message the next time you try to launch it. The solution is simply to reboot the machine.

    A NEAT TRICK FOR ENTERING DATES

    Here's a tip you can pass along to your end users. When entering dates in a date field, instead of typing the current date in mm/dd/yy format, the end user can simply type the word "Today." Notes will use the current system date and enter that value in the field. By the way, that trick works for "Tomorrow" and "Yesterday" as well. HIDING THE MENU BAR--AN UNDOCUMENTED TIP! Have you ever wanted to keep end users from seeing the Menu bar while in certain applications? There's an undocumented way to do it that works with most versions of Notes. While in Form Design, simply hit [Ctrl][Shift][+] simultaneously. This instructs Notes to set a form flag appropriately called NoMenus. Just bear in mind these points: * Since it's an undocumented feature, it's subject to change in future versions. * Be sure to save the form after you make the change. * When setting the NoMenus flag, don't use the [+] on the numeric keypad. A NEAT TRICK TO CHANGE THE MAXIMUM SIZE OF A NOTES DATABASE You may be thinking that once you've declared the size of a Notes database, you can't change its maximum size. Well, here's a trick to do the job. Compact the database, using the -m option: Compact -m This will change the maximum size to 4 GB, but remember that you can't specify any other size. DISPLAYING THE PATH AND FILENAME ON A DATABASE ICON When working with a large Notes installation, you often have to work with a large number of separate databases. To keep them straight, it's helpful to be able to see both the filename and the path when looking at a database icon. If you'd like to do this, just follow these three steps: 1. Right-click the Workspace tab (not on a database icon). 2. Select the Show Server Names option from the menu. 3. Holding down [Shift], repeat the first step. Remember that you'll have to do this for each Notes session. LIMITING THE VIEW TO CATEGORIES There may be times when you want to limit the user's view to only Categories, without showing details. If you want to do this, here's some syntax that'll do the job: @Command([ViewShowOnlyCategories]) Once this command is executed, the user will still be able to shrink or expand category views, but will not be able to see the details. If you want the user to again be able to see the details, call the same command once more. NOTES SECURITY ISSUES As an administrator, you may occasionally run into a security issue when users who have reader or above access replicate a supposedly secure database locally. Once the database is available on the local machine, the user can hack into the secure fields by modifying and creating specific views to manipulate this data. To avoid this issue, select the Consistent ACLs On Replicas option for the database. When you do so, the user has the same access on the local replica as he or she has on the server replica. REBUILDING A VIEW INDEX TO FIX A CORRUPTION PROBLEM There are times when you want to rebuild a view index. This is particularly important when trying to troubleshoot a corruption problem. Fortunately, you can rebuild not only a particular view, but indeed all the views in a particular database. To rebuild a single view, go to that view and then rebuild it by hitting [Shift][F9]. To rebuild all the views in the current database, simply hit [Ctrl][Shift][F9]. RESETTING THE MAXIMUM DATABASE SIZE If you ever need to alter the maximum size of a database, you can do so easily using the Compact -m command. To change the size, simply use Compact -m to compact the database. The -m parameter will remove the database's original size restriction. Compact -m changes the maximum size limit to 4 GB; you can't specify any other size. Once you reset the maximum size using Compact -m, you can't revert back to the previously set size limit. SAVING USER HARD DRIVE SPACE Notes administrators are used to the never-ending battles over server hard drive space. However, from time to time, don't forget to remind your users that they can save hard drive space on their own machines by compacting their workspaces. Here are the steps they need to take: 1. Right-click the Notes workspace. 2. Select the Workspace Properties... option from the menu. This should display the Properties box. 3. Click the Information tab. 4. To compact the workspace, click Compact. By checking the % Used value, you can see how much space you saved. SCANNING FOR UNREAD DOCUMENTS Suppose you need to look for a particular document in a database. An easy way to save time is to move to just the unread documents. From any view, press [Tab]. By doing so, Notes will highlight the next unread document. You'll know when you get to the end of the unread documents because Notes will ask if you would like to scan other views. STORING USER IDs For a Notes user to access a Domino server, the user must be registered. During the registration process, an ID is created for the user. You should give some thought as to where you store the user ID file. You can store it in the Public Name & Address Book, but doing so poses a security risk: If an unauthorized user can figure out the password, he or she can use the user ID. A safer option is to store the ID file elsewhere. You can store it on any drive that the server can access. You can also use the Escrow Agent, new in Release 4.5, which lets you send all new IDs to a database--even to a mail file if you want. To mail the IDs to a particular person, access that person's Person document in the Public Name & Address Book and type Escrow Agent in the User Name field. (The person can have multiple user names.) To send the IDs to a group of people, just create a group called Escrow Agent. NOTE: Since IDs are encrypted when they're sent to a mail file, each recipient must have a public key in the Public Name & Address Book. TROUBLESHOOTING FIELD NAMES IN REUSED CODE If you're like most Notes developers and administrators, you cut and paste a lot of code between existing forms and new forms. Why not? It saves time and effort. However, don't forget to check a couple of things when reusing code between fields on different forms. First, if you're using code to handle data validation within a field, make sure you change the name of the field to the new field name. Otherwise, you may lose all the data entered for that field. Second, if you're using the @Trim function in reused code, be sure to check the field lengths for the new field to ensure that you're not arbitrarily limiting the length of answers. USING @REPLACESUBSTRING TO GET RID OF BLANK LINES You've probably used the @ReplaceSubString to rapidly search and replace entries in a particular field. When cleaning up sloppy data entry, you can also use the function to get rid of blank lines or spaces. The syntax for the @ReplaceSubString function is as follows: @ReplaceSubString(FieldName;stringFind;stringReplace) where * FieldName is the name of the field; * stringFind is the substring you want to replace; * stringReplace is what you want the new value to be. To eliminate blank lines, simply set stringFind equal to @Newline, and set stringReplace equal to "". VIEWING DELETION STUBS WITHOUT NOTESPEEK There are times when you'd like to be able to view document deletion stubs without having to use NotesPeek. In fact, you can do this from the server console, with the following command: Show Database [dbasename] With this command, you'll be able to see deletion stubs as well as the size of different views. ACCESSING HIDDEN VIEWS Notes and Domino database designers typically hide views that are intended for use by applications rather than by users. However, in the course of diagnosing problems or examining how the database works, you may want to check out these views. To reveal all the hidden views that you are allowed to access, hold down [Ctrl][Shift] and open the database. To reveal or open a particular view, you must be authorized by the database's Access Control List. However, you may be able to bypass that requirement by opening the database locally, as we described in our previous tip. BASIC DOCUMENT CREATION AND TRACKING Notes' interface allows for very easy document creation and tracking, and the Domino component allows the Web to interface directly with this design. So where does one start when using Notes? Notes lends itself well to some basic features--it manages the database components and allows the developer to concentrate on building applications that manage documents. The basic components of any Notes system include forms, used as a template for each document; subforms, to control parts of forms for different looks or functionality; views, which list the documents in a way that makes it easier to find them; and agents, which can do more complex tasks with the forms when they are loaded or saved. To create a basic application, simply create a form and give it a descriptive name--if this is an animal-tracking system for a kennel, for example, call the form "animal." Create fields on that form that will be needed for data, such as name/ID, breed, color, etc. Save this form, create a view called (for this example) "animals," and select only documents created using the form "animal." Now the entire base of the tracking system has been created; everything else from here is just extra. BYPASSING THE ACL You can bypass the ACL on a database even if the Domino server is in a different physical location. Simply map a drive to the server from the operating system level, then open the database from your client by opening it locally instead of through a server port. Using this method, you can open the database even though your name isn't on the ACL because Notes will consider the database local. However, this technique won't work if the database is encrypted or if the Enforce Consistent ACL option is selected. CREATING HIDDEN VIEWS Using views and view handling are a fundamental part of using Notes, from any aspect. Views allow users to list documents that meet certain criteria. They can be set to show the data in a variety of ways. Some views, however, are made to serve only one purpose--to show a known list of documents sorted in a particular order. By knowing that you'll always find the documents you want in a specific place, lookups are much easier. But what about the user interface? What if some unaware user starts manipulating documents that you need to view in a particular order? A special type of view can be created that will eliminate this chance-- the hidden view. A hidden view is exactly the same as a normal view, except that it is not displayed; in fact, unless the user knows specifically how to access a hidden view, he or she won't be able to get to it. To create a hidden view, simply name the view as any other, but enclose the name with parentheses. For example, if a view is called AllDocuments, you could change its name to (AllDocuments) and the view will become hidden. You'll now refer to the view with the parentheses in all formulas and scripts, but it will no longer be visible. CUSTOMIZING ERROR MESSAGES Many times you'll have a complex database that uses several different calls throughout itself or that was designed so users may enter a specific part of the database by simply entering a designated URL. But what happens when someone enters a URL that doesn't exist or the system returns an invalid URL? Unless the system administrator has defined system-wide error messages, you'll get the rather unfriendly "Error 404" message. So how can you change this to something more appropriate to your database? There are four special forms--$$ReturnAuthenticationFailure, $$ReturnAuthorizationFailure, $$ReturnDocumentDeleted, and $$ReturnGeneralError--that allow you to customize the error messages for the appropriate situation. Simply create these forms and edit them to display the appropriate error messages. These forms can contain computed fields and subforms, just like a normal form, so you may customize the error message depending on the URL or parameters. The forms are used as when their names suggest, and $$ReturnGeneralError overrides any global settings the administrator may have made. DETECTING REPLICATION CONFLICTS Notes does a very good job of handling multiple users of a database at once. It figures out when someone opened a document and remembers what goes where when saved. Occasionally, though, two or more users will open the same document and one will save before the others. If the other users save that document before they reload the new information, then Notes may not be able to figure out which version is the correct one to be saved, and a document will be saved as a Replication or Save Conflict. Unfortunately, this document will be saved in its original view, and it may cause problems with scripts and distress from users, without anybody being notified. To detect Replication or Save Conflicts, look for the $Conflict field. If it exists, then that document is a Replication or Save Conflict document. To create a view that shows all the conflicts within a database, use this SELECT statement: SELECT @IsAvailable($Conflict) The negation of this statement can be used to keep conflicts from showing up. DYNAMIC PORTAL PAGE FOR WEB APPS When creating Web applications, you may sometimes have difficulty creating the About document or other setting that will allow for the Computed For Display functionality needed for entry of dynamic pages into the database. To create a dynamic front page for a database to be used from the Web, create a document that looks the way you want. Create a view that contains only this document. Then go to Properties For Database | Launch | On Web Open: | Launch 1st Document In View, and select the view you created. For example, a view called "(Login)" could be created to include only the documents made from the form "Login." Create and save a document from this form (only one). Then change the aforementioned database properties to launch the first document in the view "(Login)." Because this will always be the first document in the view, you will be presented with whatever type of page best suits your application. E-MAILS SENT OUT ON CERTAIN CONDITIONS Sometimes you may need to send out an e-mail only under certain conditions. For instance, you might create an e-mail notification that gets sent only when someone submits a form with a certain field value or only when someone submits a form from the Web. To send an e-mail through Notes' internal system, you can use one of two methods. The simpler of the two is included in @Language and is a command called @MailSend( SendTo ; CopyTo ; BlindCopyTo ; Subject ; Remark ; BodyFields ; [flags] ). You can insert this command within the appropriate "Input Validation" field, so that it checks the value, sends the e-mail if needed, and then returns true. For example: x := @If(fieldname = "asdf"; @MailSend(....); @Success); @Success; This bit of code will check the value of the field "fieldname". If it is equal to "asdf" a message will be sent; otherwise, it just continues processing the document when saved. Given the correct parameters for @MailSend, the document will be e-mailed to the appropriate addresses using the Lotus server. FORCING COMPLETE HTML CONTROL Getting documents to appear in a Web application exactly like you want can sometimes be difficult. Notes wants to create its own headers, body tags, form tags, and other HTML-formatting codes. Instead of trying to work within the Notes constraints, you can generate a page by putting all the desired output into a rich text field called "HTML." Notes will display only the contents of this field; all other tags will be withheld. Unfortunately, once the HTML field has been created and any data created in it (even a blank string), Notes will always display that field when the page is loaded. The only way to prevent this is to remove the field from the Form and then create a simple agent that uses @DeleteField on the HTML field. For example: FIELD HTML := @DeleteField; Run this agent on the document in question, and the document will be displayed as normal. HIDING THE SUBMIT BUTTON Each form created in Notes is made for one purpose--inputting data. Notes assumes that if you view the form from the Web, you'll need to submit the data, and thus, a Submit button always appears at the bottom of the screen if one was not already created within the document. There are a few ways to remove this button, but the simplest is to include a bit of JavaScript at the bottom of the page that ensures no other scripting can be done beyond that point. To remove the Submit button from a Web form, use [
  • Most tips are from TipWorld - http://www.tipworld.com :The Internet's #1 Source for Computer Tips, News, and Gossip