Linking Notes and Domino directories and application

A very powerful feature in linux is linking files and directories. Used in the right way it can save you a lot of space and keep thing often used or changed in one directory structure to be easily find.

All Administrators knows the feature in the Admin client where you can create links to directories and nsf files. For some developers it may be new! For some admins and developers it may also be new that it works really well within the notes client on the local machine.

You can easily create links to directories and nsf files which is then resolved by the notes client.

Personally I try to keep a folder structure on my PC where important stuff is located under one directory.
Doing a back of the machine is then much easier and the number of folders to consider in a backup set is greatly reduced.

So how does it work!

  1. Create a text file in the domino/notes data directory and name it eg.  BackupedData.txt.
  2. Open the text file in your preferred text editor and type in the path to the source directory eg. C:\Documents and Settings\Tomas\My Documents\DominoData.
  3. change the file type from .txt to .dir. (“BackupedData.dir”)

The linked folder will be shown as “BackupedData” when browsing for files in the Notes client.

This can also be done on single NSF files. Instead of naming it .dir change it to .nsf and the content in the file should contain the full path to the target nsf file.

Step by step guide linking nsf file:

  1. Create a text file in the domino/notes data directory and name it eg.  myApplication.txt.
  2. Open the text file in your prefered text editor and type in the path to the application eg. C:\Documents and Settings\Tomas\My Documents\DominoData\myApplication.nsf.
  3. change the file type from .txt to .nsf

The link files can be  put anywhere in the data directory structure!

Advertisements

One line @ReplaceSubString for lotusscript

[Update: Read the comments for a better solution with short strings (unverified)!]

Had this problem removing single characters in a string. I don’t like the idea to use strRight() and strLeft() since they can only handle a single entry of the search string.

There are a lot of different solution for this. I have also made my own lotusscript function for @replaceSubString, as every one else. All to complex since Release 6.

Some split and join will do the trick. This is my one liner:
resultStr = join( split( sourceStr, fromStr ), toStr )

The replace is case sensitive.

Example replacing word:
ReplaceSubString Example1

Button code:

Dim ui As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Set uidoc = ui.CurrentDocument
Set doc = uidoc.Document
doc.result = Join(Split(doc.text(0),doc.Replace(0)),doc.replacewith(0))

Example removing character:
ReplaceSubString Example2

Or make a function out of it to make it more readable:

Function replaceSubString(sourceStr As String, fromStr As String, toString As String) As String

replaceSubString = Join(Split(sourceStr,fromStr),toString)

End Function

Installing SNAPPS template

Last week I installed quickr for the first time and the free quickr templates from SNAPPS .
I started of with with QIssues. Following the instruction everything went well until “load qptool register…” it gave me an error in the connection with LDAP. Something with a wrong credential. Google said it is probably caused by a wrong password or user name.

After playing around a bit, I found away of installing the templates. I’m pretty sure it is not the best way but it worked for me. Some step may not be necessary.

This is what I did:

  1. Registered at SNAPPS to download the templates and documentation.
  2. Install qcommon_files.zip and qengine_db.zip. as described in the documentation
  3. Then follow the description in step 1 and 2 in the “Instructions for Installing a Single Template for Standalone Use” section.
  4. Before you do step 3. Create a group in the domino directory called “QuickPlaceAdministratorsSUGroups” can be found in the ACL in main.nsf in the qissues folder, put your Quickr administrator and Domino administrator in it. Without it you have no access to the application since default is set to “No Access”.
  5. Now sign the three files in the qissues folder. Use an ID that can run agents on the server.
  6. I had the option “Allow managers to create new users in each place” active. Can be found in User Directory => Change Directory => LDAP Server. I’m not sure if this solved the problem or the signing of the databases.
  7. Now go to the 3:d step in “Instructions for Installing a Single Template for Standalone Use”.
  8. Since the manager of the template, now has been registered in Quickr but not in LDAP (Domino directory), it was not possible to log in with the suggested user name in step 4. Therefor I added a new person in to the directory, with mail system set to “none”. To get the right user name I copied it from the main.nsf ACL in the qissues folder and pasted it in to the User Name field. Then gave it the first name qissues and last name SNAPPS. In short name I entered qissues and set the password to the same. Then I was able to move on to step 4.

After that had no more problems. All the tests I did went well.

I tried to install it, with the template q*-user registered in the domino directory beforehand. But then I got an error telling me that the user already existed when loading qptool register.

Hope it can save you some time when trying the templates!