How can create a document with a specific form in LotusScript?

Tags:
Lotus Domino
I have a question I'm building an agent to collect ColumnValues from different databases, (obtained dinamically via Oracle query) but I need to create one document, to save the results and then Sort whit a different way. Example: I launch the agent from a AuxDB. 1. Con.execute to obtain a list of Notes dbnames 2. Collect data from the dbnames list 3. For each db I open documents from a Specific View 4. I collect the values from specifics Items in a new document created in AuxDB.* 5. When I processed all the Notes dbs, I save the document 6. I reopen the document and sort any Columns. 7. Output the results (*)It's possible create a Notes Document whit a specific Form in LoutsScript? Thanks a lot! [Xavi]

Answer Wiki

Thanks. We'll let you know when a new response is added.

The following 2 lines can be used to create a new document that uses a specific form. I’ll assume that you already have the database (db) where the document will be located defined elsewhere in your code:

Dim newDoc as New NotesDocument(db)
newDoc.Form = “FormName”

Obviously, FormName is the name of your form. Now you can do anything else you need to with other fields on the form. When done, add this line:

Call newDoc.Save(True, True)

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Devangvnb
    hi in case there are computed field then don;t forget "computewithform" method refer designer help for details regards devang
    0 pointsBadges:
    report
  • SlimDude
    The second parameter to the Save method should be False unless you are creating a Response document. Otherwise it should be called as such: Call doc.Save(True, False) Cheers, Slim
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following