Help with changin status field value in documents from web

Hello and thanks to any that can help me with a small problem.

I would like to make it possible for a user on the web to set a “status” field to a new value in the opened document and all other documents in the database with the same value in another field “name” as the opened document.

preferebly in a button if possible.

the pseuocode would be something like:

@For all documents in view “lookup”

@If field “name” in document = filed “name” in opened document

@Set field status = “Canceled”

i have tried to solve this problem with an agent but i dont know how to call the agent with an argument like field “name” in the opened document.

Thanks

Regards

ORK

Subject: Help with changin status field value in documents from web

One simple approach would be to create ‘profile’ documents associated with all the documents for each value of your ‘name’ field. This profile document could contain the status field (& any other common data). Then make the status field on your documents form do a DBLookup to the status field on the profile document. Then updating Status on all the documents is a simple agent to do a document refresh.

But if you want to stick with saving the status on each individual document, have a look in the Designer help about DocumentContext: If you invoke your update agent from the current document, you can access it’s data using DocumentContext, to get field values for use in your agent e.g. in you agent:

Dim session As New NotesSession

Set doc = session.DocumentContext

lstrName = doc.Name(0)

etc.