I am looking for a script that can do the following.
I have two databases, A and B. Database A has two forms. Database B has one form. All three forms have a unique field on them.
I have a button on Form1, which, when clicked, will change the status of that form to "NA." When I am saving the document created with Form1 with the "NA" value, I want to search for the documents corresponding to the common field in the other two forms (one in the same DB and another in a different DB) and set the status field in those forms to "NA" also. Is this possible? If so, does anyone have a sample script? Please let me know.
Your best solution would be to have a view in each database sorted on the key value of the common field. When a document is opened for editing, I would save the value of the field in question for later reference.
In the post save event of the form being changed, check to see if the field value has changed. If it has, get a document collection of the documents in the current database with the key.
Check each document in the collection. If the field doesn't match the current saved value of the first document, update the document from the collection. Repeat this for a collection of documents with the key value in the second database.
Do you have comments on this Ask the Expert Q&A? Let us know.
Dig Deeper on Lotus Notes Domino Application Development
Related Q&A from Brian Mahoney
Find out what types of calculations can be computed for a column in a Lotus Notes view and the best way to go about it with this expert response. Continue Reading
Find out why you can't use Formula language to include a doclink to a specific Lotus Notes view or database and need to use LotusScript instead. Continue Reading
Discover the reasons behind a Notes/Domino admistrator having trouble with disabled options in the "customize this view" section of his Lotus Notes ... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.