Automatically create form on status change of another form

Hello,

I am looking for some guidance on how best to apply the following requirement.

Once a purchase order is approved and the status changed to ‘approved’, the P.O. form is locked from further editing to prevent items being added to the order after approval. This is done by using lotus script in the QueryModeChange event.

The requesters must be able to indicate the delivery and receipt of goods ordered. As the original P.O. form is locked and there is no space on the form for additional information anyway, I have currently created a button on the P.O. form that becomes visible when the status is ‘approved’. This creates a new form which inherits the unique PO number and details of the goods ordered. The users then mark each item as received by clicking a button next to each listed item and this enters the value of date received and username into a field next to the item. So far, so good.

However, this seems an inefficient method and requires the user to remember to do this. Sometimes the user will create the delivery form and indicate that 2 out of 3 items have been received, then save the form and rather than return to it at a later date to mark the final item as received, will then go back to the original P.O. form, click the button to create a new delivery notification form and mark all items as delivered. This results in uncompleted delivery notification forms being forgotten or duplicated.

What I would like to happen, is that once the final approver approves the document and the status is changed to ‘approved’, a copy of the delivery confirmation form is automatically created, inheriting the required information from the main P.O. document. No button for the user to have to press, they simply have to locate their original order form and the associated delivery notification and complete the receipt details.

If a delivery confirmation remained in an uncompleted state for a designated time, an agent would be run and generate a reminder email, with a link to the delivery form.

This only needs to run in the Notes client but I just can’t figure out how and any guidance would be appreciated.

I apologise if this seems to be a drawn out explanation, I just wanted to clarify what I would like to achieve.

Thank you.

Subject: RE: Automatically create form on status change of another form

I am looking for some guidance on how best to apply the following requirement.

Once a purchase order is approved and the status changed to ‘approved’, the P.O. form is locked from further editing to prevent items being added to the order after approval. This is done by using lotus script in the QueryModeChange event.

This last statement is part of the design, not a requirement. I would advise against using form events for this purpose as they are not a security feature. Authors fields and electronic signatures are the only sure-fire ways to prevent unauthorized editing and detect tampering.

If you really need to prevent any editing whatsoever, use an Authors field.

If it is sufficient to prevent modification by all but “power users” and to be able to detect any such meddling, you might use a controlled-access section with a signature to let the document be edited without allowing modification of the items and quantities (they can still be modified by someone who knows what they’re doing, but not undetectably). Hide the section header to prevent the user collapsing it. Add CFD field(s) within the section to display the date received, which is entered into hidden field(s) from outside the section (for instance using a dialog launched by an action button).

I encourage you to consider combining the order and the order status into one document, so that you can have half as many documents (better performance) and be more easily able to create views, e.g. of orders that have not yet been filled. Otherwise you’ll find yourself writing many agents to perform updates between the two documents, and you’ll have to deal with the confusion caused by having two documents to represent what the user considers a single object – their order.

The requesters must be able to indicate the delivery and receipt of goods ordered. As the original P.O. form is locked and there is no space on the form for additional information anyway,…

No space on the form? You have reached some limit of length? As I mention above, all you need to add is a non-editable column.

… I have currently created a button on the P.O. form that becomes visible when the status is ‘approved’. This creates a new form which inherits the unique PO number and details of the goods ordered. The users then mark each item as received by clicking a button next to each listed item and this enters the value of date received and username into a field next to the item. So far, so good.

However, this seems an inefficient method and requires the user to remember to do this. Sometimes the user will create the delivery form and indicate that 2 out of 3 items have been received, then save the form and rather than return to it at a later date to mark the final item as received, will then go back to the original P.O. form, click the button to create a new delivery notification form and mark all items as delivered. This results in uncompleted delivery notification forms being forgotten or duplicated.

If you must use two documents, what odds you could create a button that searches for an existing delivery notification. If it finds one, it opens it in edit mode. If it doesn’t find one, it composes a new one. So easy!

What I would like to happen, is that once the final approver approves the document and the status is changed to ‘approved’, a copy of the delivery confirmation form is automatically created, inheriting the required information from the main P.O. document. No button for the user to have to press, they simply have to locate their original order form and the associated delivery notification and complete the receipt details.

So if you didn’t like the above idea, you have an agent that runs when documents are created/modified, that filters its input document set based on the form and status, and creates the new document. Not hard to do in LotusScript.

If a delivery confirmation remained in an uncompleted state for a designated time, an agent would be run and generate a reminder email, with a link to the delivery form.

Of course. This could be done whether the order is one document or two.

Subject: RE: Automatically create form on status change of another form

Thanks for your comments Andre. I’ll re-evaluate my form design.

Subject: Automatically create form on status change of another form

Here is something that I have done on something similar. Because the main document is not to be directly edited I have a response form that is created and the user fills in the predefined fields. Then I have a server based agent that kicks off and rolls the fields in the response document up into the parent. This means that the server must have the rights to modify the document, but regular users can’t. It can work pretty well. In addition you can allow the user to create different response documents that will allow different functions to be performed, while maintaining the audit integrity of the original purchase order in your case.