Hi,this is my problem. I have a web-db, where users can see a list of offered services with available containers. They can click on one service, which opens a new document (with reader field) where they can enter the amount of containers the like to book. To get the right amount of already booked containers (from all other clients also) I need a view where all booked containers are visible, and due to the reader field that doesn’t work with that form. Therefor I thought I create an agent on the booking-form, which creates a new document in the backround (without reader field), which I could use in a view for counting. This is the script of the agent
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim parent As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("c1")
view.AutoUpdate = False
Set parent = view.GetFirstDocument
While Not (parent Is Nothing)
Set doc = db.CreateDocument
doc.col_service = parent.GetItemValue("bu_service") doc.Form = "collector"
Call doc.ComputeWithForm( True, True )
Call doc.Save(True, False)
parent.collect = "0"
Call parent.Save(True,False)
Set parent = view.GetNextDocument(parent)
Wend
At the moment it has only one field for testing. The agent works fine if I run it manually from “Action”. But when I enter this agent either in “WebQuerySave” (ToolsRunMacro), or after my “@Commanc(FileSave)” nothing happens.
So I don’t know now, if this agent is not running at all or if it is not working from when started from web. Can maybe someone give me a hint on this. Thanks
Oliver