Solved

Linking documents.

Posted on 2004-10-11
10
330 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
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Peculiar IBM Lotus Notes / Cisco VPN Issue 21 893
HP DP 7.03 and lotus collaboration suite 9 3 151
Lotus Domino server 11 62
Lotus Domino 9 relay to Office 365 Exchange Online 5 87
For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now