Solved

Linking documents.

Posted on 2004-10-11
10
337 Views
Last Modified: 2013-12-18
I have a document number that is created programatically in this document and this number corresponds to another form in the database. My question, how can create a link to this number.
     Form 1      ABC no.  -   123     -  I should be able to link to form 2 when I click on 123
     Form 2      DEF no.  -   456
Thanks
 
             
0
Comment
Question by:cyle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 12279369
Create a view with first column the no field and second col evaluating to @DocumentUniqueID...

Do a dblookup to this view and extract the 2nd col using the no field as the key

eg;
@DBLookup( "Notes":"NOCache"; @DBname; "VIewToLook"; No_FIELD_Name; 2)

Place this formula in a computed field.. When you save and reopen this will become a link

~Hemanth
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 12284098
or if Form1 is saved and after that form2 is opened, then u can use Form properties.
in the second tab, Inherit ... enable this option.

In the form2 field, u should have one RTF field and give the field name in the form properties. this will also creates link in form2 for form1 doc.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12285737
I couldn't understand the question.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:cyle
ID: 12288067
FORM1 has a number created automatically when saved. Let's say 1234. Then, you click a button in FORM2 to create FORM2. Form2 also has its own number say 4567.

Now, when I open FORM1 again, it will have both numbers shown.

FORM1              1234
                         4567

this number should be able to open up each other or linked to each other. When I click on 4567 FORM2 should come up.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 12297949
I typed a reply to your question. But before submitting it I found it was just an elaboration on Hemantha's post. He read the question correctly (that is if i read you last comment correctly). Go ahead with that. If you face a problem, let us know.
0
 
LVL 3

Accepted Solution

by:
Andrea Ercolino earned 500 total points
ID: 12300937
I do not completely understand the flow of actions...
  1- You create a doc1 with Form1, and at saving time its ID number is generated.
  2- Then you create a doc2 with Form2, and at saving time its ID number is generated.
  3- You finally want doc1 to show a link to doc2 named doc2.ID( 0 ) and doc2 to show a (backward) link to doc1 named doc1.ID( 0 )

Here the problem is that when doc1 is created, it does not know anything about doc2 yet, so it's not possible to create a (forward) link at that time. Instead when doc2 is created, it already knows all about doc1, so you just need to execute the following code at the end of the querysave event script fo the Form2 form, after the generation of ID

  Dim doc2 as NotesDocument
  Set doc2 = Source.Document
  Dim doc1 as NotesDocument
  Set doc1 = session.CurrentDatabase.GetDocumentByUNID( doc2.UNID1( 0 ) ) ' this could be different
  Dim link1 as New NotesRichTextItem( doc1, "Link" )
  Call link1.AppendDocLink( doc2, "", doc2.ID( 0 ) )
  Call doc1.Save( True, True )
  Dim link2 as New NotesRichTextItem( doc2, "Link" )
  Call link2.AppendDocLink( doc1, "", doc1.ID( 0 ) )

Then
  1- put a Link richtext field in each form (Form1 and Form2) for showing the link
  2- put a UNID1 field (Computed for display) in the Form2 form and use @InheritedDocumentUniqueID as its formula
  3- check the flag in the Form2 form where says "On Create - Formulas inherit values from selected document".
  4- Finally always create doc2 having selected doc1 before, either in a view or opened.

NOTE that if you want to use an different method for getting at doc1 from doc2, then you should change the line marked in the code snippet, and points 2 through 4 maybe discarded altogether
0
 
LVL 3

Expert Comment

by:Andrea Ercolino
ID: 12727084
If the problem was cross linking documents, I think my comment gives the right solution.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question