How to compose a document through an agent

Hi,

I want to compose a new document through an agent.

is it possible and how?

I appreciate your help.

thanks

Subject: how to compose a document through an agent

If it’s via a LotusScript agent, look in the designer help for NotesDocument. It details how to create documents, for example, the createDocument method for NotesDatabases.

HTH

Steve

Subject: RE: how to compose a document through an agent

Steven,

Thanks for the info. Actually I was not sure how to open the created document through a required form.

I created the document using an Agent (lotus script), now I want to open the document using a specific form.

is it possible?

Subject: RE: how to compose a document through an agent

Can you post your code?

Off the top of my head, I’m wondering why you couldn’t change the form property to the name of the new form you want to use and then open the doc?

Steve

Subject: RE: how to compose a document through an agent

Steve,

we have an intranet home page developed using dreamweaver and on which we had a field which takes a value and when submitted has to open a domino form and continue from there.

I was not sure how to pass values from a HTML form to Domino form, i passed values from a HTML form to an agent using request_content(0) before.

so i was hoping i will get the field value in an agent then create a new document from the agent and then pass this new value to that new document and then open the new document.

is this possible or is there any easier way for this.

Subject: RE: how to compose a document through an agent

Okay. It might have helped to put all this information in your original post.

If you want to submit an HTML form and have domino create the form for you you have a number of options.

One way is to create an identical form in Domino as to the one in Dreamweaver and submit like this post says:

http://www-10.lotus.com/ldd/nd6forum.nsf/ShowMyTopicsAllFlatweb/47c108f86fa84feb85256eb60001895b?OpenDocument

If you only want to pass one value from an HTML form, I would have your HTML form post to a domino agent like you mentioned. The agent can read the request_content, create the form, set the specific field on the document and then open it. All you have to do is a print (assuming this is lotusscript) at the end of your agent. The output needs to be a valid URL to the document you created in your agent. There are plenty of examples in this database of doing something like:

print “[/” & db.FilePath() & “/0/” & newlycreateddoc.UniversalID() & “?OpenDocument]”

HTH

Steve

Subject: RE: how to compose a document through an agent

Alternately, you can design the form to look for values in the URL, so that you can pass in the field values as URL arguments. Read about @UrlQueryString in the Domino Designer help. That way you don’t need an agent – the performance will be better, and if the user chooses not to save the new document, you don’t have a leftover document in the database.