Manage Learn to apply best practices and optimize your operations.

Access Lotus Notes shared resources with a dynamic Domino URL command

Learn how you can use the dynamic Domino R6 URL command "?OpenFileResource" to access shared resources in a Lotus Notes database.

VIEW MEMBER FEEDACK TO THIS TIP
There is a dynamic Lotus Domino R6 URL command called "?OpenFileResource" that can be used to access any shared resource in a Lotus Notes database. The code in this tip can also be used with all Domino URLs that relate to the same Lotus Notes database.
Related information from SearchDomino.com:
Opening a Word doc from a shared resource file in LotusScript

LotusScript advice

LotusScript Learning Guide

LotusScript Reference Center

In fact, if you need to access other Lotus Notes databases on the same host, you can still omit the host argument and simply use the file name or the replica ID preceded by two underscores.

If you need to access a Lotus Notes database on a different Domino server, you need to provide that Domino server's hostname or IP address.

The formula in the given code dynamically obtains the name of the Lotus Notes database in this line:

cDBName := @ReplaceSubstring
(@Subset(@DbName;-1);"\";"/") 

In the above code, @DbName returns a text list that contains the Domino server name and the Lotus Notes database.

@Subset(@DbName; -1) produces the name of the Domino server. However, the name of the Domino server and the hostname are not the same. The hostname is the name associated with the server's IP address in Domain Name System (DNS), or the IP address.

You can find the name of a Domino server in the HTTP section of the server document under "Internet Protocols." If the entry is blank, it uses the name of the machine on which the Domino server runs.

The @ReplaceSubstring command flips the backslash to a forward slash to support Web addressing if the Lotus Notes database contains a long path, such as DDriveMyapp.nsf.

 
REM "/host/database/style.css?OpenFileResource";
cLink := 
"<LINK REL=STYLESHEET HREF=" ;
cDBName := @ReplaceSubstring
(@Subset(@DbName;-1);"\";"/");
cFileName := "style.css";
cLink + "/" + cDBName + "/" + 
cFileName + "?OpenFileResource" +">"

MEMBER FEEDBACK TO THIS TIP

In my opinion, it's more efficient to retrieve the "URL ready" database file path using the @WebDbName command:

cDBName := @WebDbName; 

It's much simpler than using the "old fashioned":

cDBName := @ReplaceSubstring
(@Subset(@DbName;-1);"\";"/"); 

—Tomas Z.

******************************************

I agree with Tomas Z. in that the newer @WebDbName formula is easier. Also,
"?OpenFileResource" is not new to Lotus Notes Domino R6; this has been around since R5.
—Mike M.

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Deepali S. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Dig Deeper on LotusScript

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

Hi Guys,

I am new in using Lotus Script specific commands inside Lotus Notes SE 9.0.1 , in particular specific accessing and manipulating "web page content"/DOM  in Internet and combine it into Lotus Notes Database.

Can I get some guidance where to look for complete tutorial / reference topics anything relate to this objective?, appreciate for your guidance.

Thank you for your help/guidance, I am looking forward to hear from you at my email address: frans.suwardi@gmail.com.


Cancel

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close