Learn how to a build a cloud-first strategyRegister Now


Another one of those questions

Posted on 2006-05-19
Medium Priority
Last Modified: 2013-12-18
Hi all,

Please take a look at the following scenario:

I have a database which has 3 forms.

Form 1 (Main Form) - Customer form
Form 2(Response Form) - Product form
Form 3(Response to Response Form) - Test form

Only one main customer document is created for each customer, however, for each customer many response product documents can be created and for each product many response to response test documents can be created.

To start using this db, we will be importing all the customer list, then at random, someone will start entering each product for each customer into the database.

What I need to do is the following:

Create an scheduled agent to run, everytime this agent checks to see if a newly entered product has a response test document, if not, to create a response to response test document and populate in it only those inheritence fields from the newly created response document. When the first response to response document(first test document for each product) exist in the database, it will then help us to schedule new test schedules based on dates set on it and then the engineer will create additional tests documents based on those schedules.

In short, is there a way to create an agent to run and test if a new product document has been created and created an initial test document for it?

Keep in mind that the initial test document is a response to response document of product? how would you create that in lotusscript.
I know that you can easily create a response to main, but i am not sure if you can use the same structure to create a response to a response document/

Thank you all in advance

P.S. I can see your 10 YEARS celebration logo on the page.

Question by:varvoura
  • 3
  • 2
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16717150
With respect to main and response document: there are only two types of documents, a document that has a parent and a document that has no parent. A document with a parent is a response document (or a response-to-response or response-to-response-to-response document). Creating a response document from LotusScript isn't very difficult.

Now about your agent. Why do you need it? Wouldn't it be easier to create the first Test-document the moment the Product document is saved?

About the scheduling: why don't you add a field in the Product document that contains a date and an interval? Whenever a test is completed, a new test date is calculated based on the date and the interval, and a new (empty) Test document is generated.

Author Comment

ID: 16717246
Great, I am glad you understood exactly what I want, if I create a new product, i want when it is saved to create an initial test document which inherits the fields required from the product document and, yup and the idea of interval is great, I am implementing this on the test form, but I'll clarify with you whether it is best to use on product form. But first, let's takle these one at the time.

1) How can that be done? should I write a querysave script to check whether or not a new doc and then create the response?

What happens if my manager decided to give me a list of thousands products per customer to import in, then i'll need the agent, wouldn't i? as the product may need to be imported from the list?

2) I am doing the scheduling on the test form, where I am setting intervals and test due dates, when these due dates are reached a notification is sent to responsible person, but how would I go about creating a blank test document when the schedule is reached(this bit may not be necessary as my manager may request that the engineers will create their own test documents after the initial one) however, I'll have to clarify.


Author Comment

ID: 16717273
one more thing:

While creating the response to response document, it is easy to create those field which inherits from response doc, what about all these additional fields that I need to add on response to response doc which are not on the response doc.
Do I need the structure of


Before saving the doc?
Would that work?


Author Comment

ID: 16717507
I was able to create the response document on save, thank you.

Do you think having the schedule set on the test document will work, or do you think that it is best to use them on product doc?
LVL 46

Accepted Solution

Sjef Bosman earned 2000 total points
ID: 16717622
1) yes
1a) Hm, import, that's a totally different ballgame. You'd have to write a separate agent to do that, because you have to search the Customer, then create the Product and then the first Test document.
3) IMHO it is not a property of a test when the next test is to be done, but the property of a Product. Logically speaking...

4) To create a Test-document, do the following:
    - it MUST be in the PostSave, because the Product document has to be there
    - in the QuerySave, you need to save a variable that tells the PostSave that it was in fact a new document
    - code like (you do the Dim's):
        Set rrdoc= New NotesDocument(db)
        Call rrdoc.MakeResponse(rdoc) ' assuming rdoc is the current Product document
        Call rrdoc.ReplaceItemValue("Form", "Test")
        Call rrdoc.ReplaceItemValue("SomeField", rdoc.SomeField) ' copy the fields you need
        Call rrdoc.Save(True, False)

Featured Post

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.

Question has a verified solution.

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

IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

810 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