How change the documents are “unprocessed” to “processed”

pts.
Tags:
Domino Designer
Lotus Domino
hello, i have an agent that run after mail has arrived. My Script take all unprocessed documents in database and after send this document to other people. I want that this document change the status to "process", and the next time the agent run this document don't take. I don't know if I'm explain correctly. My english is very bad. Thanks in advance. Cristina.

Answer Wiki

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

I’m replying to all so everyone knows this explanation has been sent.

This is from Notes Designer Help. I think there is a way to loop through all docs and then mark them all processed with one command as well. Anyhow, this will do the job.

Call notesSession.UpdateProcessedDoc( notesDocument )
Parameters
notesDocument
The document to be marked as processed.

Usage
You use this method in conjunction with the UnprocessedDocuments property, the UnprocessedFTSearch method, the UnprocessedFTSearchRange method, and the UnprocessedSearch method in NotesDatabase in an agent that runs on all new and modified documents, newly received mail documents, newly modified documents, and pasted documents.
This method marks a document so subsequent invocations of the same agent recognize the document as processed. You must explicitly mark a document with this method. No implicit marking occurs in a LotusScript agent.
If a marked document is modified, it is unmarked and will be processed by the next invocation of the agent.
This method marks a document as processed only for the particular agent from which it is called. Using this method in one agent has no effect on the documents that another agent processes.

Discuss This Question: 6  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
  • Brooklynegg
    To update an entire collection. Call notesDocumentCollection.UpdateAll
    3,845 pointsBadges:
    report
  • Stiletto
    Look at the UpdateProcessedDoc method of the NotesSession class.
    3,940 pointsBadges:
    report
  • PaulRyan
    It is my understanding that, say, you have two agents agent A and agent B. If agent A runs successfully on all the documents it considers to be 'Unprocessed' it will mark these documents as 'Processed' and never use them again. However when it is time for agent B to perform it's task, it will run on all the documents that it considers are 'Unprocessed', this document set could well contain documents that have previously been marked as 'Processed' by agent A.. Have you considered setting a flag in the processed documents and using it to determine which to subsequently exclude.
    0 pointsBadges:
    report
  • Humbleguy
    not only that Paul, but my understanding is that as soon as agent A gets modified for any reason, all bets are off. All documents in the database will now again be "unprocessed". Another solution to this is to use the stampall method of the document collection, which can be used to put the same value in the same field of all documents in a collection. dim db as notesdatabase dim dc as notesdocuemntcollection set db = session.currentdatabase set dc = db.unprocesseddocuments ' gets new, pasted, selected, etc. : ' code here to process the collection : : call dc.stampall("Status", "Processed") this method lends a little more permanence to the situation but is as convenient as the updateall method.
    0 pointsBadges:
    report
  • Humbleguy
    not only that Paul, but my understanding is that as soon as agent A gets modified for any reason, all bets are off. All documents in the database will now again be "unprocessed". Another solution to this is to use the stampall method of the document collection, which can be used to put the same value in the same field of all documents in a collection. dim db as notesdatabase dim dc as notesdocuemntcollection set db = session.currentdatabase set dc = db.unprocesseddocuments ' gets new, pasted, selected, etc. : ' code here to process the collection : : call dc.stampall("Status", "Processed") this method lends a little more permanence to the situation but is as convenient as the updateall method.
    0 pointsBadges:
    report
  • CRISTINAC
    Thanks for all guys. I've solved with UpdateProcessedDoc Thanks for all.
    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