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
Solved

Linking documents.

Posted on 2004-10-11
10
336 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lotus Domino Server Failure 1 187
Lotus notes email code 6 116
Disable Return Receipt In Lotus Notes 15 336
IBM Notes How to read an encrypted mail saved as .eml file 7 55
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

860 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