Subject: Try this approach … no guarrantee of course
If I understand correctly
-
you have a Notes database
-
In this database you have a form that allows you to enter the name of a file (on a shared file server with a path common to all user)
-
using this form you have created a large set of documents
(naming lots of files)
-
You wish to show this list of files in a view
-
and when the user double clicks on a view entry just open the corresponding file NOT open the document
All this Have I got that right?
If YES, my first approach woul be
A. Create my view or view showing the list
B. Create a second form and name that in the form formula of those views
C. In the WQO open of the form make Lotusscript code like
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Dim doc as Notes Document
set doc = source.document
Dim fn as string
fn = doc.FilePath(0) ’ Filepath is item on first form holding string
Dim ret as integer
ret = Shellid( fn , 1) ’ 1 is normal window with focus
Continue = False
Exit sub
As you will see that directly mirrors the requirements :=).
Lots more work to deal with error cases etc but you could test the principle in 15 minutes
NOte: In my honest opinion, your whole approach is a little vulnerable. The function depends two key settings i.e.
a) their drive mappings … though of course you could use a full server name and path to avoid that
b) their file associations - so that opening an XLS file opens a suiable application.
is all that likely to be true for EACH and EVERY potential user?
Anyway good luck. Let us know how you get on.