I needed to create a Button to create a Connection Document. I found this forum, and several examples. The one I used contained this stanza to check for the connection:
While Not(doc Is Nothing)
destination = doc.GetItemValue(“Destination”)
If (destination(0) = “CN=server/O=domain” Or destination(0) = “CN=server/O=domain” _
Or destination(0) = “CN=server/O=domain” Or destination(0) = “CN=server/O=domain” _
Or destination(0) = “server” Or destination(0) = “Server”) Then
Goto OpenDatabase
End If
Set doc = view.GetNextDocument(doc)
Wend
I know programming, but not LotusScript, although I don’t think my question relates to LotusScript. What is the ‘CN’ and “O” referring to in “CN=server/O=domain”? Would I substitute my server name for ‘server’ and the domain for “domain” ? And I’m assuming there are multiple checks to allow for different capitalizations?
Subject: Newbie question - What is this code doing?
CN = common name = the common name of the user or server certificateO = organization = the organization certificate
Yes. Substitute the server name and, if the domain name is the same as the O certificate name, substitute it for the domain name.
e.g. Server1/ABC
server1 = CN
ABC = O
Subject: Newbie question - What is this code doing?
“CN=server/O=domain” is a textstring with the fully qualified name of a domino server. The servername string you usually see (domino/organisation) is the “abbraviated” servername. The keys cn stand for common name an o for organisation.
your code looks like a sample code which is to fill out with any existing server names.
it does nothing since look for the value of the field “destination” in notesdocuments. if the value maches with one of the items in the if condition, the control goes to a label “OpenDatabase”
Subject: Newbie question - What is this code doing?
The CN and the O are part of the heirarchical naming convention Notes uses. CN stands for Common Name, and O stands for Organization. There is a possibility, at your location, that you might even have a more complicated naming setup, with OU’s in between. For example:
“CN=myservername/OU1=HR/O=mydomainname”
This code appears to be written for the situation where there may be multiple servers that could return TRUE. If you are only looking for one server, you would only need one of those. You could also use UCase() around it to make sure that case sensitivity doesn’t enter the picture. It could very well, depending on your operating system (UNIX is case sensitive, for instance).
Personally, I think I would write this something like this:
dim svr as string,dest as string
dest = UCase(destination(0))
svr = UCase(“CN=myservername/O=mydomainname”)
if StrComp(dest,svr,5) = 0 then
goto OpenDatabase
…
Good luck.