How to Link to Document - Noobie

Im quite new to Lotusscript and trying to display a list of docs from a database using a search on a webpage. I’m successful doing this however I have two issues. First is that I can figure out how to be able to get a link to the results listed (each document). The second is in the “from” field how to just show the the regular name not the CN=etc. I can do this without a problem in formula language but not in lotusscript. Below is the code I am using.

Set doc = col.GetFirstDocument

Do Until(doc Is Nothing)

	Set nName = New NotesName( doc.From(0) )

	markup = markup + |<span class="entry">| + |<table border="1"><tr><td> | + Join(doc.GetItemValue("From"), "") +_

	| <td> | + Join(doc.GetItemValue("PostedDate"), "") + | <td> | + Join(doc.GetItemValue("Subject"), "") +_ 

	| </table> | + |</span>|

	Set doc = col.GetNextDocument(doc)

Loop

Any thoughts would be appreciated.

Subject: Try this

For the name, use nName.Common, or nName.Abbreviated, as desired.

For the link, if your Notes app is web-enabled, you need to generate a URL containing the document unique ID and the path of the database similar to the example below. All the info can be obtained using properties of NotesDocument, NotesDatabase etc. If you want to open the document in Notes rather than a browser, then you generate something similar, but use the “notes://” protocol.

Document X

Subject: Progress

Thanks for your input Wayne.

I’m still struggling with a way to get the link to the specific doc. I’m using the code below to get the link to the database which is great but how do I pull the link to the specific document.

Since the agent list several docs I want the user to be able to get the link directly to the document.