Composed Documents in large quantities

Hi,

Right now i am trying to compose a new document for each and every piece of items registered under my server, a TOTAL of 1,122 documents. All of which will be display on a view

My code :

while not docpart is nothing

uidoc.ComposeDocument(“”,“”,“nameofDocument”)

…

Wend

The problem arise when the program starts to compose new document and will caused an error. Pls advice me on what to do.

Many thanx in advance.

Regards,

Hengshi

PS: the entire procedure is, i created an action button in a view which when clicked will start to search and save the seria numbers of all the items to be recorded. And that view shall display the documents which i had composed for the items.

Subject: Composed Documents in large quantities

Hi Sue,

Thanx for the recommendation, i used what u suggested, the turn out is what i desired for, but the problem of system hanging during the composing of that 1,122 items still present…sigh

Regards

hengshi

Subject: Composed Documents in large quantities

I’m not sure I understand exactly but… It seems to me that you are using UIDOC when you should be using DOC.

So you have a document collection of all documents in the view or found by the search, then you loop through each document in the collection creating new ones etc.

set docpart = dc.getfirstdocument

while not (docpart is nothing)

set newdoc = db.createdocument

newdoc.form = “formname”

set all the fields you need

call newdoc.save(true,true)

set docpart = dc.getnextdocument(docpart)

wend