Skip to main content
FORUM PLAN UPDATE: Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

Solution: DocLinks in View
Jerry Glover 17.Jun.08 01:14 AM a Web browser
Notes Client 6.5.5 Windows XP


The following recipe is a solution (or workaround depending on your point of view) to displaying a link icon in a view which, when clicked, opens a document in another database related to the one displayed in the current view. The solution takes advantage of the InViewEdit feature of Notes.

Assumptions:
- There is a field on the displayed documents containing a UNID for the related document to be displayed.
- Actual in-view editing is not required for the view.

First, create a column to display an icon for the link. Enter a formula for the column value as follows:

Icon := 41;
Icon

This value (41) represents the tan dog-eared page icon which is similar to the standard doclink icon. It's important to use the variable assignment rather than a numeric literal because the Editable Column option will be grayed out and unavailable if a literal is used.

Next, bring up column properties and select the checkboxes for "Display values as icons" and "Editable Column"

Finally, open the view's InViewEdit event and add the following LotusScript code and modify as necessary to open your target documents.

----------

Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim caret As String
Dim URLparts(4) As String

caret = Source.CaretNoteID
If caret = "0" Then Exit Sub 'check for click on a doc, not a category

Set db = Source.View.Parent
Set doc = db.GetDocumentByID(caret)

'build the url to the link target document
URLparts(0) = "Notes:/" 'Notes protocol for the URL
URLparts(1) = db.Server 'this assumes the target db is on the same server as the current db
URLparts(2) = "my/target/database.nsf" 'your db path goes here
URLparts(3) = "0" 'special view placeholder, don't change
URLparts(4) = doc.LinkUNID(0) 'replace with fieldname containing a UNID for the target doc

Call ws.URLOpen( Join( URLparts, "/") )

----------

Hope this helps,
-jerry




Displaying Links in View Columns (Scott D Tylicke... 16.Jun.08)
. . RE: Displaying Links in View Column... (Esther Strom 16.Jun.08)
. . RE: Displaying Links in View Column... (J Aubry 16.Jun.08)
. . Solution: DocLinks in View (Jerry Glover 17.Jun.08)
. . . . RE: Solution: DocLinks in View (Scott D Tylicke... 17.Jun.08)
. . . . Thank-you Jerry, what a fantastic s... (judy kilpinen 10.Nov.11)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite