Solved

Linking documents.

Posted on 2004-10-11
10
326 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

20 Experts available now in Live!

Get 1:1 Help Now