EXECUTING MULTIPLE COMMANDS VIA A TEXT FILE
CHANGING A SERVER'S COMMON NAME
SPECIFYING AN ADMINISTRATION SERVER FOR DATABASES IN R5
ADMINP MOVE MAILFILE REQUEST ADDS TWO NEW FIELDS
DETERMINING WHICH NOTES.INI FILE DOMINO IS USING
COMPLETELY DISABLE PASSWORD CHECKING
CONVERT CONTENT FROM QUICKPLACE DATABASES, PART 1
CONVERT CONTENT FROM QUICKPLACE DATABASES, PART 2
ACCOMPLISH MULTIPLE TASKS AT ONCE WITH ADMINISTRATOR CLIENT
NOTES PLUG-IN FOR PERFORMANCE MONITORING
YOU CAN JUDGE A FORM BY ITS TITLE
NOTES HELP VS. NOTES HELP LITE
EXTRACTING UNIQUE ELEMENTS FROM A LIST
USE OF REPLICA IDs WITHIN THE ACL
USE JAVASCRIPT TO CONTROL NAVIGATION
JAVASCRIPT VS. NOTES VALIDATION
Ever wondered if there's a way to send commands (to execute different tasks and/or operations) to the server console from a DOS command line? If so, keep reading. In order to send a command to the Domino 5.x server console from a DOS prompt, go to the directory where the Notes executable files are installed and enter one of the following commands. For NT x86, enter: nserver -c "show stat" For NT Alpha, enter: aserver -c "show stat" For UNIX, enter: server -c "show stat" For Linux, enter: server -c "show stat" For OS/2, enter: iserver -c "show stat" where "show stat" can be replaced with other Domino commands (e.g. "load http," "tell http quit," etc.). The command is sent to the Domino server console and processed as usual. If the server is partitioned, you'll need to set the partition number you want to send the commands to using the environment variable NOTESPARTITION: set NOTESPARTITION=n where "n" is the partition number.
Technical Tips © KRMS Productions 2000
Instead of the client status bar, you'd like to display broadcast messages in a Notes dialog box for your users. So how do you accomplish this? At the Domino 5.x server console, append (!) to the beginning of the broadcast server command.
For example: Broadcast "(!)The server will be down for maintenance, Sat. Dec. 5th, 7 A.M.--10 A.M."
Technical Tips © KRMS Productions 2000
EXECUTING MULTIPLE COMMANDS VIA A TEXT FILE
Is it possible to execute scripts or a list of commands via a text file on a Domino 5.x server? As a matter of fact, it is. You can create a text file that lists the commands you'd like to execute on the Domino 5.x server. The commands can be anything that can be typed at the server's console. To load the script, use the less-than symbol (<) command, followed by a blank space, and then the name of the text file you created. For example, if you want to execute the commands SHOW USER SHOW TASKyou can create a file called F:\MYFILE.TXT and, within this text file, enter the commands that are to be executed. After you save the .txt file, enter the following at the Domino server console: > < F:\MYFILE.TXT If there's more than one command in the .txt file, they'll be executed in the order in which they appear in the .txt file.
Technical Tips © KRMS Productions 2000
You'd like to move a database from one location to another. The move should be transparent to the users. How can you accomplish this? Two words: database link. Database links are text files that can be created to act as pointers to other volumes, drives, and subdirectories. They're link files that point to databases in a directory other than the Notes data directory specified in the User Setup dialog box. The database can be in the same volume, such as the C: drive, or in a different volume, such as the D: drive. To users, the database appears to be in the current data directory. The link should have a full path specification to the physical location of the database. The extension for a database link is .NSF. Any full text indexes associated with the database will also be stored in the directory to which the link points. Here's an example. Say you'd like to move the database SALES.NSF to the PROJECTS directory on the D: drive.
To create a database link:
1. Using a text editor, create a link file named SALES.NSF in the Notes data directory (the old location).
2. Enter D:\PROJECTS\SALES.NSF into the text file (the new location).
Technical Tips © KRMS Productions 2000
After a name change has been submitted to the Administration Process (AdminP) and a Tell AdminP Process All has been run, a user attempts to accept the changes and receives the following error message: "Error updating local ID file, cannot create a file when that file exists." Users should have Read/Write access to their User.ID files. In many cases, an ID file is written to during authentication. If the ID file is located on a floppy disk, the floppy disk must not be write- protected. If the ID file is located on a network drive, take the User.ID file off of the network server and make sure that the KeyFileName= line in the NOTES.INI points directly to where this file is located.
Technical Tips © KRMS Productions 2000
CHANGING A SERVER'S COMMON NAME
Can the Notes 4.x or Domino Server (5.x, 4.6x, or 4.5x) Administration Process (AdminP) be used to change a Notes server's common name (SERVER.ID) or to change certifiers? Nope. Also, a SERVER.ID can't be certified to a new certifier through AdminP.
SUPPORTING INFORMATION
* To change a server's common name, the SERVER.ID must be manually certified with a different certifier. Another alternative is to register a new SERVER.ID.
* The Notes Administrator must change any corresponding Connection documents, Group documents, Server documents, and/or Person documents that reference the old server name. Also, be sure to change ACL references to server name and Mail-in Database documents.
* In addition, any other references to the old server name must be changed to the new server name, including Dial-in Connection documents. Changing a server's name is very tedious. Basically, any reference to the original server name must be changed to reflect the new server name.
Technical Tips © KRMS Productions 2000
SPECIFYING AN ADMINISTRATION SERVER FOR DATABASES IN R5
Using the R5 Administration client, you want to specify an administration server for databases in Domino R5. Here's how.
For a single database:
1. Highlight or open the desired database.
2. Click File | Database | Access Control | Advanced tab.
Or:
1. Open the database in the Administration client.
2. Click File | Database | Access Control | Advanced tab.
For multiple databases at one time:
1. In the Administration client, choose the correct domain, and then choose the correct server in the domain where the database resides.
2. Click the Files tab, and then select the database whose administration server you want to change.
3. Click the Tools tab, followed by Databases | Manage ACL.
4. In the resultant Multi ACL Management dialog box, click the Advanced tab.
5. Check the Modify Administration Server check box, and then click the radio button labeled Server. From the drop-down list, choose or type in the desired server name. If you want to change it to None, select the None radio button.
6. Click OK.
Technical Tips © KRMS Productions 2000
A Notes/Domino customer wants to know how to change a user from one hierarchical name scheme or certifier to another. For example, let's say user John Smith's been promoted from director of HR to VP of International Relations. His current hierarchical name, John Smith/HR_1/Acme, should be updated to John Smith/IR_1/Acme.
To change a user's organization or organizational unit:
1. Open the Public Name And Address Book (NAB).
2. Select the appropriate user's name.
3. Click Actions | Rename Person | Request Move To New Certifier | Original Certifier ID | OK.
4. Enter the password, followed by the name of the new certifier in the New Certifier field.
5. Click Submit Request.
6. Open the Administration Request Database.
7. Choose the Name Move Requests view.
8. Click Actions | Complete Move For Selected Entries.
9. Select the new certifier that will recertify the name and click OK.
10. Enter the password for the certifier and click OK.
11. Accept the default certifier expiration date or a different date. Here, you'll be asked if you want to select a New Qualifying Organization Unit.
If you want to distinguish the user from another person within your organization with the same common name, you can assign a qualified organizational unit to one or both of them. If you have two people named John Smith, for instance, you might assign one of the John Smiths the qualified organization unit Marketing so that you can distinguish between John Smith/IR_1/Acme and John Smith/Marketing/IR_1/Acme. This adds a differentiating component between the common name and certifier name. You won't enter an organizational unit certifier name here. If you do, the new name will include the organizational unit certifier name twice. For example, if you rename John Smith/Acme John Smith/IR_1/Acme, and you specify IR_1 in the New Qualifying Org. Unit field, the new name actually becomes John Smith/IR_1/IR_1/Acme. Now click Certify and you're done. Whew!
Technical Tips © KRMS Productions 2000
You're using the Domino Administration Process (AdminP) when the ADMIN4.NSF database suddenly shows the Hammer And Wall icon. What does the icon mean? Don't wig. It's merely an indication that a process is being acted on by the server's Administration task. At times, the ADMIN4.NSF database will show the icon on Response documents in the ADMIN4.NSF file.
If a Response document is stuck on the Hammer And Wall icon, follow these steps to force AdminP to rerun the original request:
1. Delete the Response document showing the Hammer And Wall icon.
2. Refresh the view in AdminP ([Shift][F9]).
3. Tell AdminP to process the request again.
4. Let AdminP run its regular timed tasks.
Technical Tips © KRMS Productions 2000
ADMINP MOVE MAILFILE REQUEST ADDS TWO NEW FIELDS
The Administration Process (AdminP) Move MailFile request adds two new fields to a Person document: NewMailFile and NewMailServer. To see them, right-click on a Person document and click Document Properties | Fields. These new fields force the Notes clients' Dynamic Client Configuration (DCC) module to update users' local Notes clients with new mail server info when they authenticate using their original mail server (usually when users open their mailfile). After the clients authenticate, AdminP will continue adding requests to move the mailfile.
Technical Tips © KRMS Productions 2000
When you issue a Show Stat command at the Domino server console, it displays values like: Server.Users = 3 Server.Users.1MinPeak = 17 Server.Users.1MinPeakTime = 03/14 02:01:55 PM Server.Users.5MinPeak = 26 Server.Users.5MinPeakTime = 03/14 09:14:03 AM Server.Users.Peak = 65 Server.Users.PeakTime = 03/13 11:42:02 AM What do these values mean?
* The Server.Users line specifies the number of active Notes Sessions. This includes all users and server tasks connecting to the server. In the example above, there are three users currently connected to the server.
* The Server.Users.1MinPeak line specifies the number of users who've performed a Notes transaction in the last minute. This value DOESN'T specify the number of users or transactions within the last minute. The Domino server checks this data regularly and updates the value only if the number is greater than the previous value.
* The Server.Users.1MinPeakTime value shows the date/time at which the maximum number of users performed a network operation in the past minute.
* Server.Users.1MinPeak specifies the number of users during the past minute. Users who've not performed any transactions so far, but are waiting for transactions, are also counted in this list.
* Server.Users.5MinPeak and Server.Users.5MinPeakTime show the number of users and the time, respectively, at which the server had the most users performing a transaction during the past five minutes.
* Server.Users.Peak and Server.Users.PeakTime show the maximum number of users and the time, respectively, for users who had an active connection to the server. So, in the example above, we have three users currently active on the server. On March 13 at 11:42 A.M., we had the most users (65) active on the server. On March 14 at 2:01 P.M., we had the most users (17) who'd performed any network operation to the server in the past minute. And on March 14 at 9:14 A.M., we had the most users (26) who'd performed any network operation to the server in the last five minutes.
Technical Tips © KRMS Productions 2000
So you want to run the Domino Release 5.x Incremental Installation Program for UNIX? Follow these steps.
1. As either the account that runs the Domino server, or "root," download the appropriate incremental installation program to a temporary directory on your UNIX system.
2. Select the correct upgrade for your version of Domino, the correct UNIX platform, and the correct product (e.g., North American vs. International).
3. Note the file size, and ensure that enough disk space is allocated in the mounted volume for both the incremental install program and the expanded files created in Step 5 below.
4. Once the download is complete, if you're not already "root," switch to the "root" user on the system.
5. Change to the directory containing the incremental install program and expand the tar file using the following command: tar xvf <incremental_installer_filename> This command creates a subdirectory named after the architecture on which you're running (aix, sol', linux, or hppa). The directory contains the incremental install script program and additional subdirectories beneath itself.
6. Shut down the Domino server to be upgraded. (It's best to do this when you're logged on as the user that started the server.)
7. Change to the "architecture" directory (refer to Step 3) and run the following command to begin the incremental installation program: /install NOTE: Don't simply type install. If you do, a message will appear explaining the proper use of install. This is the binary executable /usr/bin/install from the UNIX system, not Lotus' script file for upgrading the Domino system.
8. The incremental installation program will display the Domino server's current configuration. If this information is incorrect, press E to exit the installation. The incremental install program has an integrated Help feature you can access by pressing H. Make the appropriate selections and complete the installation.
9. Once complete, switch back to the user who starts Domino on the system.
10. Enter the command /opt/lotus/bin/server to launch the Domino server.
11. Once the server's fully initialized, after being prompted to upgrade your templates to the new version it detects, you can verify the successful update of the server by typing show server at the Notes console and checking the new version currently running.
Technical Tips © KRMS Productions 2000
The following error may appear at various times on a Domino server: "Invalid Drive" For example, the error may display when you issue the Show Disks command at the server console, or in the LOG.NSF in a message such as: "xx/xx/xx 06:03:16 AM Error full text indexing <database.nsf> : Invalid drive" In each case, the file system used is NTFS and the drives are valid and functional. This error message may also appear if Domino is run as a Service on Windows NT and the NTFS permissions are incorrectly set on the drive or drives in question. In order to correctly recognize the drives and subdirectories, the SYSTEM user account needs to have full access to the root of the drive, as well as any subdirectories Notes will need to access. By default, NTFS permissions designate Everyone with Full Control. If security concerns warrant a change, the SYSTEM user may need to be specifically listed.
To do this, follow these steps:
1. Right-click the file or directory and choose Properties | Security.
2. Select Permissions and click Add.
3. By choosing the Show Users option in the Add Users And Groups dialog box, the SYSTEM user becomes available. Select this user, making sure to allow Full Control.
4. Click OK three times to back out of all dialog boxes.
5. If prompted to apply the setting to all subdirectories and files, accept this box. This ensures that all subdirectories also allow the SYSTEM user access to them.
Technical Tips © KRMS Productions 2000
DETERMINING WHICH NOTES.INI FILE DOMINO IS USING
Since users often have multiple NOTES.INI files running on their servers, Domino usually uses the first file it finds in the path, making it difficult to determine which file it is. One solution to this problem is to use the SET CONFIG command from the server's console. The SET CONFIG command sets INI parameters while the server is running. An administrator may want to use SET CONFIG to set a bogus parameter on Domino and then check the files from the OS level to determine which file is written to Domino. For example, an administrator may type the following at the console: SET CONFIG FindMyNotesINIFile=TestConfiguationParameter Manual inspection of the various NOTES.INI files will show that one file now has a line that looks like this: FindMyNotesINIFile=TestConfigurationParameter Since Domino doesn't use a parameter called "FindMyNotesINIFile," this line shouldn't affect the server's performance. NOTE: Lotus doesn't recommend running servers or clients with multiple NOTES.INI files on the system. In order to retain older versions of the NOTES.INI file, administrators and users are encouraged to rename the file to NOTES.OLD or NOTES.00x--where x is the version number of the saved file. In Windows NT, the server looks in the root directory first and then searches the Notes data directory. (The root directory for Windows NT is determined during installation. This can be set to anything but defaults to \WINNT, which is what most customers use.) In UNIX, the server searches for the NOTES.INI file in the data directory; if it isn't found, it will search the PATH statement of the user account that's running Notes. It's important to note that if the NOTES.INI file is placed in a directory other than the data directory, the "Directory=" line could be overwritten to reflect the file's current location.
Technical Tips © KRMS Productions 2000
In Notes/Domino R4 and R5, the replication process is now multiprocessed (multiprocessed, mind you, NOT multithreaded). This means that more than one replicator can run at the same time. You can specify the number of replicators you want to run concurrently, via the NOTES.INI file, using one of the following methods.
* Add additional Replica tasks to the Server Tasks= line. For example, to allow up to three replicators to run concurrently, add: ServerTasks=replica,replica,replica,update,stats
* Add a new NOTES.INI configuration variable (Replicators=n) to enable multiple replicators, where "n" represents the number of replicators. The replication process now tells the Job Scheduler when the session has Started, Stopped, and is In Progress. The replicator Starts and Stops appear on the server console. In addition, each active replication session can be seen when you run a Show Tasks server command. When no replication processes are active, the Replicator task remains idle (the same as it always has). There's no limit to the number of replicator sessions you can run concurrently. The more replicator processes allowed, the greater potential impact on server performance.
Other factors that can influence server replication performance include:
* The number of Replicator tasks running.
* Replication with another R4/R5 server takes less time because field- level replication can be used. Replication with Notes V3 servers still replicates the entire contents of the record being replicated (i.e., isn't done at the field level).
Technical Tips © KRMS Productions 2000
COMPLETELY DISABLE PASSWORD CHECKING
You've tried repeatedly to disable the password-checking feature, without any luck. After following the instructions in the Administrator's Guide to the letter, your users are still being prompted with a dialog box stating that their passwords will expire on mm/dd/yy. To completely disable the password-checking feature, do the following:
1. From the Administration client, Release 5.x users should click the People And Groups tab, followed by the People view. Release 4.x users should select People from the Administration panel, followed by the People view.
2. Select each Person document for which you want to disable password checking.
3. Go to Actions | Set Password Fields and click Yes when you're prompted to continue.
4. Select Don't Check Password.
5. Next to Required Change Interval, enter 0.
6. (Optional) Next to Grace Period, enter 0.
7. Click OK.
8. Disable password checking on a server. Open the Server document in the Public Address Book and, next to the Check Passwords field in the Security section, select Disabled. The request "Set Password Information" will be posted in the Administration Request database.
When the request is executed and the user, after reauthenticating with the server (the next day), still receives a prompt that the password will expire on mm/dd/yy, have him or her go to File | Tools | User ID | Basics | Set Password. Next, enter the old password, followed by a new password. Click OK and then re-enter the new password for verification. After the user's password has been changed, it needs to be changed a second time at least one day later. If it isn't, the user will continue to be prompted with the dialog box.
Technical Tips © KRMS Productions 2000
CONVERT CONTENT FROM QUICKPLACE DATABASES, PART 1
QuickPlace is Lotus' custom groupware program for sharing information on the Web between parties quickly and effectively. But what if you want to get all of your information out, possibly because you're changing platforms or for other administrative reasons? It can be done, although all of your info can't be retained. QuickPlace runs as a stand-alone server, serving its own databases from its own port. The biggest problem is that the QuickPlace databases aren't built like standard databases, so the information is stored differently. There should be a Main.nsf file within the QuickPlace server. Create a backup of this database to work from. Next, create a view called All (or whatever you'd like--just pick something to represent all of your documents), and set the view selection to SELECT Type="Page". This will select everything in the database that was created by the users. Set up a destination database with a form that contains a field for Title and a rich-text field for Body. All documents will be copied from the original database to the destination database via an agent.
Technical Tips © KRMS Productions 2000
CONVERT CONTENT FROM QUICKPLACE DATABASES, PART 2
You're converting existing information from a QuickPlace database. At this point, the original database has been set up with a new view, and the destination database has been set up with a correct form to store the information. Create an agent in either the source or destination database that will be used to copy the information; it will run once as a LotusScript agent.
The agent will:
1. Create a variable for both databases and assign them.
2. Get the All documents view that was created before. (If needed, you can check the h_SetReturnURL field to see if it contains "hLibrary"; if so, it came from a library. If not, it came from a discussion group.)
3. Copy the existing up_title field to the new form's title field (this is the title of the document). 4
. Define a richtextitem and assign it to the Body field of the original document.
5. Extract the text and copy it into the Body field of the new document.
6. Detach any existing attachments and reattach them to the new Body field. (This will be the most difficult part of the process. The simplest way is to loop through the doc.items and look for the item type ATTACHMENT. Get the filename, extract the file to a directory created with the document's unique ID, and reattach it to the new document.)
7. Save the new document(s). This will convert any existing dialog and attachments for use in a "normal" Notes database. Now you can work with the data as needed.
Technical Tips © KRMS Productions 2000
Suppose you want to create a Custom Search Form. (The search form that Domino defaults to is effective, but it almost never looks professional.) Using a special form name and some specific fields, you can create your own look and specify which options you want to appear on the form.
1. Create a form called $$SearchTemplateDefaultForm. Domino will use this form instead of the default search form.
2. Next, add a text field called "Query" to the form.
3. Modify the form to include any of the following fields:
* MaxResults--limits the number of documents returned by the search
* Count--the number of results that will be shown at a time (default 30)
* SearchWv (checkbox)--will search word variants (default no)
* UseSearchFuzzy (checkbox)--will return similar strings (default no)
* Sort (listbox, 1 | 2 | 3)--Sorts by 1=Relevance, 2=Oldest First, 3=Newest First (default 1)
If any of these options aren't specified, Notes continues the search with the default values. Graphics and text can be placed anywhere on the form; it's a standard form, except that it overrides the default search form. The fields may also be placed anywhere and in any order on the form.
Technical Tips © KRMS Productions 2000
ACCOMPLISH MULTIPLE TASKS AT ONCE WITH ADMINISTRATOR CLIENT
The administrator client (new to R5) facilitates a lot of administrative tasks, among them signing databases and cross-certifying users. Not only does it make them easier, it makes them easier to do SIMULTANEOUSLY. For example, if you move a series of databases from one server to another within an organization, the databases need to be signed by the new server to ensure that they'll work correctly in the new environment. Thanks to the administrator client, this formerly tedious task is now a cinch! Simply open the server in question, select the databases that need to be signed, click Database | Sign, and then choose the options you'd like to use to sign them. This method can be used for any tasks that must be done in batch or performed on a regular basis.
Technical Tips © KRMS Productions 2000
Not all fields and/or text in a document are meant for viewing. Some computed fields, for instance, are created to calculate values for future use in other functions, such as reporting. Other fields may need to be hidden at different times for different users or access levels. Hide When formulas for the text (which encompasses fields, here) make sure these fields show up when they should.
To access a Hide When formula, right-click the line you want to hide and go to Text Properties | Hide. (Or simply press [Ctrl]K.)
* The first option you'll see allows you to hide the text in all cases, from either Notes or Web clients. For example, say you've customized part of the form for each and only want to show a particular part at a time.
* The second section allows you to customize it a little more for reading/editing/printing purposes.
* The last option allows you to use @Language formulas to fully customize (based on access, for example). Note that the Hide When formula assigns the attribute an entire line at a time, even if only part of the line is selected.
Technical Tips © KRMS Productions 2000
When you install Office 2000, you may get an Internal Error 2343 message. This problem occurs if Lotus Notes isn't installed correctly or if you've uninstalled Lotus Notes. Apparently, the Lotus Notes uninstall program doesn't remove all entries in the registry and the Win.ini file. Microsoft has released a utility to resolve this issue (see Knowledge Base article Q234435); however, if you prefer, you can just rename the Notes.ini file, located in either the \Windows or \WinNT directory. Install Office 2000, and then rename it back after the install has completed. Copy and paste this URL into your browser: support.microsoft.com/support/kb/articles/Q234/4/35.ASP?LN=EN- US&SD=gn&FR=0
Technical Tips © KRMS Productions 2000
NOTES PLUG-IN FOR PERFORMANCE MONITORING
Lotus has provided hooks that allow you to watch every aspect of your server's performance in real time. Although the NT Task Manager will tell you the process ID, the amount of CPU usage it's currently using, the amount of CPU time that's been dedicated to it, and the amount of memory allocated to a process, it's limited to the processes themselves, not the internals of the Notes server system. During server installation, you have the option to install the performance module for the NT Performance Monitor. This module is automatically installed and can be accessed when you run NT's Performance Monitor (usually located in Administrative Tools on the NT Start Menu). You'll have access to several hundred Notes items-- everything from CPU usage to threads allocated for a particular task. It may be more efficient to set up commonly used data in a series of graphs on Performance Monitor, and then save the configuration. Then you can easily start the monitor file, either at startup or on command.
Technical Tips © KRMS Productions 2000
Once every two years, all local IDs need to be recertified so that the server can continue to use them. Also, users on different Notes servers will need to be certified if they want to use those servers with their current IDs. This process of authentication ensures security. The easy way to recertify an ID is via e-mail. The end user can e-mail the system administrator a request for certification, and the administrator can recertify the ID upon receipt of said e-mail. The Notes client has this functionality built in. To e-mail your system admin, go to File | User ID and type the user password. Next, click Certificates | Request Certificate. In the resultant dialog box, provide the address of the administrator of the system for which you'd like to be certified. Once the administrator receives the e-mail, he or she can then certify the sent ID for that server. The ID file will be good for the next year on that server.
Technical Tips © KRMS Productions 2000
All Lotus-created databases are created from templates. This construction allows them to distribute databases that may later be upgraded by an update from the template. For example, suppose a client is using a Lotus-distributed database for his data when a bug appears. Instead of throwing away all his data or trying to fix the bug by editing the code, he can use the updated template to that database and update the design without affecting his data.
The simplest way to create your own template is to:
1. Create the complete database that you want, and then change the name of the database (in the file system) to have an .ntf extension (instead of an .nsf).
2. Go to Database Properties | Design and select the check box that indicates the database is a template.
3. Give it a name. It will now be available when you create new databases from the template selection. Due to administrative processes running on the server, however, it may take a little while to be available.
To make it available instantly, reboot the server. Any new databases created will be based on this template, and any changes made to this template will propagate to the databases.
NOTE: Creating/using templates is a very involved process. Refer to Notes Help for more information.
Technical Tips © KRMS Productions 2000
Each quarter, Lotus releases a major bug fix and enhancement pack for every platform for almost all of its clients and servers. These are known as Quarterly Maintenance Releases (QMRs). Quarterly Maintenance Updates (QMUs), which address urgent and critical problems that have come up over the past several months, are released on an as-needed basis. Typically, since the changes addressed in the QMUs only affect a very small percentage of specific problems, there's no need to install them when they come out (unless you're having technical problems with the clients or servers). QMRs, on the other hand, SHOULD be installed, as they may include fixes--such as a fix for a security hole--for problems that could be detrimental to your system if left unfixed. You can download QMRs and QMUs from Notes.net. Each release also contains several documents that can be viewed online. Refer to these to see what bug fixes and updates have been made. http://www.notes.net/
Technical Tips © KRMS Productions 2000
The Notes.ini file (usually located in the \Windows or \WinNT directory, but sometimes it resides in the Notes directory) contains a slew of parameters. One such parameter is ServerTasks, which is basically a list of tasks that will start when you boot your machine up. To really streamline your server, you can remove some of these tasks, leaving only the essential ones. For example, if you're only hosting one database that doesn't have any type of scheduling or calendar functions, you probably don't need the POP3/SMTP services. Before you remove any task, however, you need to do some investigative work to find out exactly what it does. Alternatively, you can start and stop the tasks from the console and run your applications to see which ones are required. By streamlining your server, you can save as much as 75 percent of the resources required to run the same Notes server. Plus, you'll have more CPU cycles left over for other tasks!
Technical Tips © KRMS Productions 2000
YOU CAN JUDGE A FORM BY ITS TITLE
Titling your forms not only makes them look more professional, it also provides a visual reference for the user. Nice. If the application is used from within the Notes client, the window title will actually change the text of the window itself. If that same document is viewed from the Web, the Web page's title will be set to the window title. To set the window title, simply set the Window Title event for a form (e.g., Entry Form, or whatever suits the document will work). Note that you can't assign window titles to subforms. You CAN, however, use formulas to create dynamic titles. And here's some form for thought: Base your title on statistics found within your document. This will convey a lot about it to the user in one glance. For instance, you could use the same formula as the subform formula in the title to assign the title based on subform, and thus by user access or roles.
Technical Tips © KRMS Productions 2000
Templates allow the design of a database to be replicated to existing databases without affecting the actual data within said database. They also offer a way for companies to create databases and distribute them to clients, as well as send occasional updates. But what are your options if you don't want to allow the client access to the design that was used to create the database? Normally, when you create a database from a template, the template's entire design is copied. To prevent client access to a database's design, use the Hide Design option. There is one caveat, however: Once the design of the database has been hidden in this manner, it can't be retrieved. In other words, there's no known way to make the design viewable after using this option. The only other option you have is to copy all the data from one database to a new, unpopulated one without a hidden design.
Technical Tips © KRMS Productions 2000
Roles can be a very powerful way to assign usage of a database and still allow any amount of flexibility. They're global to the database, permitting users and groups to change without affecting the database structure. Roles are defined in a database's Access Control List (ACL) dialog box: File | Database | Access Control (there's a separate section for them). They're arbitrary, i.e., their names have no bearing on their end functions; therefore, you can name them anything you deem suitable. For example, you could define a role, say Maintenance User, to designate a user or user group as someone that has greater-than-normal access. Just select this role for the appropriate user(s) in the Basics section of the ACL dialog, and the setup is complete. The last step is using the role within the application, which you can accomplish easily with the @Language. A sample of the code would be: @if(@IsMember("Maintenance User"; @UserRoles);--..;--..)
Technical Tips © KRMS Productions 2000
NOTES HELP VS. NOTES HELP LITE
Notes Help or Notes Help Lite? Both the Notes server and Notes client install give administrators the option. So which Help database should you choose? Here are some considerations to weigh:
* A Help file that's never used (as on the server) is a waste of 25 MB.
* The larger Help database takes longer to access, especially over a slow connection.
* Both databases contain the most commonly used help, and the standard help includes all the help available; so, since their info is largely redundant, using both of them is a waste of space.
* Because the Help database includes development help, the Lite version is ideal for users who only use the Notes client and don't do any development work.
Technical Tips © KRMS Productions 2000
Occasionally, you may need to reference a field as it appears in another document. Suppose, for instance, you want to check the last value of a field against the one being saved in an Input Validation event. Unfortunately, this procedure is pretty difficult. Because Notes saves the document while performing the validation, you can't look up the original value of that field. Now for the good news: There's a workaround. If you can access the current document from the @Language via a view, you can look up the field on that document. For example, if you have a view called All Documents, you can use an @Dblookup in that view for the current document to retrieve the same field on which you're performing the validation. By doing so, Notes will actually grab the value of the field, which in turn allows you to test it against itself to see if it's been changed or modified a certain way when saved this time.
Technical Tips © KRMS Productions 2000
The full text index is the index of words and phrases that allow searches across the database. Instead of searching the entire database, a quick search of the full text index will yield close results. This method is commonly used by many database management systems. Want to tweak the index to your needs? Notes gives you several options. You can update, create, or even delete the index. Just go to File | Database Properties | Full Text. When you create an index, you have several options: case sensitivity, attachment indexing, and others. Modifying these options will help limit the size of the full text index (kept in a separate directory than the database itself) and customize it to the database's particular needs. After creating the index, you can set the update frequency. Given how much information is added to the database, as well as how many people will be searching the database versus how much extra CPU the server has, you can customize this setting to provide the best performance.
Technical Tips © KRMS Productions 2000
EXTRACTING UNIQUE ELEMENTS FROM A LIST
Working with the @Language can be really easy--or really difficult. Lists are especially tricky to work with, since there's no way to loop through them. So here's a way to extract the elements that are unique to a specific list. Suppose you have two lists: ListA := "Fred" : "Jane" : "Mark" : "Joe"; ListB := "Fred" : "Moe" : "Jane" : "Mark"; You want to figure out which elements exist in ListB that DON'T exist in ListA. The easiest way to do this is to use the @Replace function and allow it to propagate through the two lists, replacing anything not found with an empty string. Then use the @Trim function to get rid of any extra spacing, which results in the final code: UniqueToB:= @Trim( @Replace( ListB, ListA, ""))
Technical Tips © KRMS Productions 2000
When you create a Notes form, you usually don't have the luxury of documenting the code. To compensate, try color-coding the text and formatting. For example, color all of your hidden fields light green; this could include any field that processes data or acts as a special field. In addition to color-coding, vary your font sizes. For example, make all of your programming fields a smaller font size (eight usually works well). This--coupled with the fact that they're light green--will set them apart from the standard data, making the form much easier to maintain and read. Keep in mind, though, that the schemes will only work well if implemented consistently.
Technical Tips © KRMS Productions 2000
Folders, views, tomato, tomahto...not a whole lot of difference, right? True, both of them categorize and sort documents based on certain criteria. But with folders, the only criteria are those set by the user. Folders are very useful for sorting documents that don't really have any, ahem, programmable relevance; for example, a user might put all of the humorous e-mails he or she receives into one folder (to read after work, of course). Writing a view for that would be impossible. Folders don't affect the use of views--a document can be listed in a folder and view (or multiple views). Folders have the same design elements (sorting, columns, etc.) as views, but don't have a selection formula. Documents may only be listed if added by a user or script. Lastly, your end users can create their own folders (Create | Design | Folder) and mark them private or shared. This allows them to have custom folders for use in that database.
Technical Tips © KRMS Productions 2000
You can achieve complex view navigation by manipulating the URL query string. Here are the URL commands used.
* Open the view using the default settings: Db.nsf/view?OpenView
* Open the view, starting at the first document, and then list the first 100. Collapse all trees: Db.nsf/view?OpenView&Start=1&Count=100&CollapseView;
* Open the view using the default settings and expand the second tree: Db.nsf/view?OpenView&Expand=2 All views will work with these simple commands within the URL, and you can create some complex views using these functions.
By default, simply using Db.nsf/view will create the view as needed, and Notes will provide all default links to navigate the view.
Technical Tips © KRMS Productions 2000
By default, editable fields have certain properties when they're displayed on the Web. But you may not always want to use the default properties. Say, for instance, you want a field that needs to be somewhat protected to use the TYPE=PASSWORD tag in the HTML in order to appear. This forces the field to use HTML-type properties, allowing size, maximum length, etc., to be edited. To set an HTML tag, go to Field Properties | Options | Help Definition. In normal Notes syntax, the tag should be enclosed with brackets.
It might look something like this:
[<SIZE=30 MAXLENGTH=30>]
When the document/form is displayed on the Web, these parameters are actually passed to the browser as is, and within that field definition, although it has no bearing on any Notes application. One drawback is that the tags will show up if the form is also used in the Notes client. To avoid this, you could implement a subform for HTML and a subform for the Notes client, each with its particular properties.
Technical Tips © KRMS Productions 2000
When you're using the @Language, certain kinds of information are almost impossible to display in a form or document. Any type of math, for instance, will probably require the use of LotusScript to process and format the info so it can be displayed. To populate a field with an agent, use the QueryOpen or WebQueryOpen event of the form. Edit the existing @Language code to include your agent name (skeleton code is provided). When the relevant event happens, the LotusScript agent will run. When the document appears, any fields that are populated from within the agent will be populated.
From within the agent, define both a session and a database, and set them to the current document:
* Dim session As New NotesSession
* Dim doc As NotesDocument
* Set db = session.CurrentDatabase
* Set doc = session.documentContext
* doc.myfield = "hello, world" In this example, the field "myfield" was populated with "hello, world" upon loading the document/form.
Technical Tips © KRMS Productions 2000
USE OF REPLICA IDs WITHIN THE ACL
In some instances, you need authentication on an individual basis, but you also need to allow that user's SESSION to access more than would normally be allowed. A good example of this involves the use of any kind of agent that must refer to another database for a lookup, but for which the user may not have explicit rights. For instance, a multi-database search can be achieved simply by opening up the databases and searching their full-text indices. The LotusScript code queries the databases in sequence and returns the documents as needed. However, if the user hasn't been given explicit rights to one or more of the databases being searched, an error will occur within the agent, which won't necessarily show up when the agent is run--resulting in utter confusion on the part of the user. So how can you allow this functionality without giving the user those rights? Give another database access instead. Use the replica ID of the querying database as an entry in the Access Control List (ACL) of the target database. (To find the replica ID, go to the Information (i) tab of the Database Properties dialog box or do a database synopsis.) The ID is used as is; no quotation marks or other punctuation are necessary. Once you set the access as needed for the other database, the server will treat the agent as a user with those permissions.
Technical Tips © KRMS Productions 2000
Your users' R5 servers (HTTP) are crashing whenever they use tabbed tables. How do you go about troubleshooting these HTTP crashes? You don't. As of right now, Lotus hasn't posted a solution to this problem. Unfortunately, when a table is created within a tab section, and two or more rows are merged, problems are inevitable. The Notes Designer will allow the merged tables, as will the Notes client, when viewed; but when the same design is viewed on the Web, an error is thrown and the HTTP server task is frozen--and won't resolve itself without administrative intervention (i.e., stopping/starting the HTTP task). The only workaround at present is to use multiple tables to achieve the same formatting the original table would've provided.
Technical Tips © KRMS Productions 2000
Notes R5 gives developers two options for displaying rich text fields. Prior to R5, users could only enter multiple-line text via textareas (rich text), and could only specify the size in rows and columns. Now, in addition to the old textarea field, developers can use a new Java applet that supports different font and formatting options. Keep in mind, though, that the only way the data in the Java applet can be edited is by using the Java applet; the data is stored as MIME- ENCODED, not as rich text, so any modification (typically by LotusScript) will destroy any existing information in the field. Also, if the field is changed from the Java applet option to the HTML option, the data may not be transferred correctly.
Technical Tips © KRMS Productions 2000
An image resource is a design element that acts as a resource library of images to use throughout your database. With image resources, images can all be referenced from one location (before, this was typically done by attaching them to a document), and can easily be selected to use for page backgrounds, form backgrounds, images on pages, or any other place within an application that requires an image. Just like every other component within the database, each image has its own ID that distinguishes it. When it's placed on a page or used in a background, it's referenced by that identifier. This leaves room for developer error. If an image listed in image resources is deleted and replaced with a new, updated image--even with the same name--it won't be used in the same places because the ID is different. To get around this, "refresh" the image by selecting it and choosing Resource | Refresh. A dialog box for the replacement image will appear. By replacing this image with the new one, the ID will stay the same and the image will be updated correctly within the database.
Technical Tips © KRMS Productions 2000
USE JAVASCRIPT TO CONTROL NAVIGATION
Navigation and frames go hand-in-hand. Frames let you have a navigation panel (usually on the left side of the screen) that's consistent throughout your site. Users choose the links to the information they want to view in this frame, and the info appears in another frame (usually on the right side of the screen). But while the built-in functionality of the frameset within Notes is nice, it's limited. What happens, for instance, when a document is edited? Where are the other navigation buttons? How about the context-sensitive icons? With a little JavaScript, you can control what page comes up in which frame, making your application look much more professional. For example, you could specify an onClick event so that when a document is opened from a view, a different page opens on the left side of the screen that gives users the option to edit or delete the page, or to browse the next or previous buttons. Using JavaScript's window.open (page, frame) method on the onClick events, the different pages can be controlled for a very nice, seamless effect. For a context-sensitive effect, use multiple window.open events to control multiple frames.
Technical Tips © KRMS Productions 2000
Speed is always a concern when creating Web applications. Notes pages can be especially slow performance-wise when doing multiple @DbLookups or WebQueryOpen scripts. Any little component that can be optimized, even just to let the user know that the page is still loading, is always helpful. There are a couple of HTML and JavaScript tricks you can use to make that wait seem a lot shorter. Many Web pages have background images; while they take a little time to load, you can actually use this time to your advantage by coupling it with a similar background image. Suppose a background image uses a grey grid background, for instance. Since the page text will load first, followed shortly by the images, you could specify the background image and the background color (a matching grey) so the effect would be color, then image, then page. While this would only encompass a fraction of a second, it would let the user know that the page is still loading. Another trick involves the preloading of images when doing JavaScript rollovers. The code for this can be found almost anywhere, but makes the page much faster, as the images are downloaded every time the mouse rolls over an image. The implementation takes just a little longer, but the result is a much more professional application
Technical Tips © KRMS Productions 2000
When saving or deleting a page, users may not realize that the view or page they're returned to is a good sign that everything's in working order.
The long delay between saving or deleting a page and the rebuilding of the view apparently compels them to click the Submit button millions of times. One good way to appease impatient users is to create an intermediary "flash" page that's returned when a document is saved or deleted.
This page could say something like, "Page being saved. Please wait," and users would be redirected to the view or another page through the use of HTML META tags or a JavaScript timed event.
To accomplish this, set the $$Return field on a form to the intermediary page with the message and redirect, and then create the $$ReturnDocumentDeleted page (or form).
Each can redirect or simply link to the new location.
Technical Tips © KRMS Productions 2000
JAVASCRIPT VS. NOTES VALIDATION
Form validation is used to ensure that users fill in the required fields before submitting their data. If a user submits a form minus any of the required info--which is usually set off somehow--he expects (or SHOULD expect) some type of alert that keeps him from submitting the page.
There are several ways to validate your forms, among them:
using the Notes @Language validation (available in the Validation property of the field);
and via JavaScript.
Both methods have their advantages:
JavaScript is cleaner, while Notes validation, which works in both the Notes client and on the Web, is easier to use.
Notes validation typically looks something like this: @If(myfield = "";"Please enter a value for myfield.";@Success)
The required fields are tested, and if all the conditions are met, @Success is returned; otherwise, an error message is displayed.
Unfortunately, on the Web, this error message appears on a screen by itself. Without some extra formatting elbow grease, the page looks really plain, and the poor users are pretty much on their own as far as a fix. JavaScript validations, which are executed upon submission, typically show a JavaScript alert when a condition isn't met: ("Please enter a value for myfield") This keeps the form from being submitted, but it doesn't display another screen in the meantime--making the process less confusing for end users.
Technical Tips © KRMS Productions 2000
Have you ever tabbed from field to field in a Windows program?
In Notes R5, this functionality has been extended to developers, allowing them to select the tab order of existing fields. This option is only valid for Notes client applications, however. It won't show up on Web applications. The tab order is set in the field properties. By default, the Position In Tab Order specification is set to 0, meaning it has no effect. If the tab order is set, a number will appear in the field placeholder on the form, letting developers know at a glance what position the current field is in.
Technical Tips © KRMS Productions 2000
Design Synopsis is a reporting tool that provides database, replication, access control list, and design element information for everything used to build an application, including script libraries. A synopsis can be run for any element (forms, views, fields, etc.) and will provide all the details related to it.
The biggest benefit of generating a synopsis (File | Database | Design Synopsis) is data dumping--either used for recreating the database for another platform or a straight text dump for backup purposes.
NOTE: This ISN'T a good backup method; it's simply the best way to get the most complete information about an application in the event that something happens to the original database. Here's another way this tool can help you analyze your app: Say you have a page or design element that's not working, and you're basing the design on another working database. Running a synopsis will show any differences that may exist between them.
Lastly, Design Synopsis lets you copy and paste IDs (such as replica IDs) that you otherwise could only copy by hand. Okay, so it's not the most efficient method, but it does ensure a more reliable copy of the ID.
Technical Tips © KRMS Productions 2000
Notes gives you several options when it comes to opening or deleting documents via QueryOpen fields and the $$ReturnDocumentDeleted form. Now, with a last-minute addition to R5, you can control everything more easily using database scripts. These scripts are database-wide and give you the flexibility to control what happens when documents are submitted, opened, or deleted.
To access them, go to Design | Resources | Other | Database Script.
Suppose you want to keep people from deleting any document within the database given certain situations. You can modify the QueryDocumentDelete script to check certain conditions (username, location, existence of other documents, etc) and allow the deletion to occur or be stopped.
Likewise, you can keep users from opening documents that aren't meant to be opened under certain circumstances via the PostOpen event of the database script. As you can see, the use of these scripts doesn't merely give you more control; it gives you more control on a global level.
Technical Tips © KRMS Productions 2000