share data between documents created on different Forms in the same Lotus Notes V5 database

110 pts.
Tags:
Lotus Notes
Lotus Notes 5.x
Lotus Notes Database
Lotus Notes Forms
How do I share data between documents created on different Forms in the same Lotus Notes V5 database? They are not response documents. I have created fields to capture the document ID, but I don't what my next step is. Thanks

Answer Wiki

Thanks. We'll let you know when a new response is added.

You need to explain what you mean by “share data”. If you want Form A to display information from documents using Form B, based on a lookup, you could create a field on Form A, computed for display, that uses @DbLookup, which will go to a view containing the Form B documents, seek a key value from Form A, and return the desired fields from all documents that match. Look in Designer Help for @DbLookup.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • BruceWayne
    I would just add an other information (if you want to use @DbLookup) : you have to create a sorted view to achieve that (with a first sorted column on the ID Field) ! Hope it helps ...
    4,110 pointsBadges:
    report
  • Joeydog
    Thanks Ledlincoln and BruceWayne for replying to my question. I was pulled away on some different work so I haven't tried the @DbLookup yet. To clarify 'Share Data': Form A has a computed ID field that I know how to display in a field in Form B by checking On Create Formula inherit and Inherit entire and this also creates a link on Form B to Form A. Now, on Form B a different Names field will have a value entered into it and I need that Name value to also become saved as a Names field on Form A linked document. That is why I used the term Share because I need data to move both ways Form A <----> Form B. I hope this is clearer. Let me know.
    110 pointsBadges:
    report
  • BruceWayne
    Hi In that case, i suggest you put your code in the QuerySave of each document (A & B) So when you will save document A, it vwill first search document B, check if it is not being edited (to avoid save conflicts) and put the A fields in the B document. Same technique with the other document.... You have to know that all your data will be double (A fields in doc B and B fields in doc A) ! Not so pretty but it should work...
    4,110 pointsBadges:
    report
  • Joeydog
    Just to update, I am working on the QuerySave suggestion, which I believe involves NotesDocumentCollection. I have never used this before so I am researching. and trial and error. Any suggestions in Lotus Script would be welcome :)
    110 pointsBadges:
    report
  • Joeydog
    I have had some success! I am created a subroutine that I call in QuerySave of FormA to set its field with the value from a field in FormB. Here is a snippet. I will add some error checking later. num = uidoc.FieldGetText("ID_A_Number") Set collection = db.FTSearch(num, 10) Call collection.FTSearch(num,10) For j = 1 To collection.Count Set docA = collection.GetFirstDocument() Set itemB = docA.GetFirstItem( "FormBfield") strField = itemB.text If strField <> "" Then Exit For Next Call uidoc.FieldSetText("FormAfield", strField) I still need to get the FormB part working.
    110 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following