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
Software/Hardware used:
ASKED:
December 2, 2008 9:00 PM
UPDATED:
December 12, 2008 8:54 PM
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 …
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.
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…
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
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.