Hi There,
Thought i had this sussed - but it aint workin!
Wonder if anyone could help?
Here is my agent code :
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim ProjDoc As NotesDocument
Dim strPath As String
Dim strURL As String
Dim intGood As Integer
Dim intBad As Integer
Dim strCastNo As String
Dim strJobNo As String
Dim strItemNo As String
Dim strAtt As String
Set db = session.CurrentDatabase
Set doc = session.DocumentContext
intGood = doc.QtyGood(0)
intBad = doc.QtyBad(0)
strCastNo = doc.Heat_CastNum(0)
strJobNo = doc.JobNum(0)
strItemNo = doc.ItemNum(0)
strPath = Replace(db.FilePath, "\", "/")
strURL = "/" + strPath + "/NuclearNCRForm?OpenForm&JobNum=" & strJobNo & "&ItemNum=" & strItemNo & "&Heat_CastNum=" & strCastNo & "&QtyBad=" & IntBad
Msgbox strURL
Print "[" + strURL + "]"
I have this in the WebQuerySave event :
@Command([FileSave]);
@If(InspOutcome = “Failed”;@Command([ToolsRunMacro];“CreateNCR”);@Command([FileCloseWindow]))
When i save the document, it does load the form i specified in the agent, but its not passing then values,
Can anyone help?
Thanks
F1H
Subject: RE: Passing Values - Not Working 
F1, you’ve posted dozens of questions here as well as a lot of answers. I think by this time, you should be able to post a crispier question than this. What do you mean it doesn’t work? Your agent evidently runs, it evidently produces a URL. What is in the URL? If the arguments are in the URL, your problem is in the CreateNCR form, about which you’ve told us nothing. If the arguments are not in the URL, the problem is in the code that generates the URL.
Incidentally, what are these save and close doing in the Webquerysave formula? It’s supposed to run an agent – or not, based on your if test. I don’t think these commands do anything in that context.
Subject: RE: Passing Values - Not Working 
Apologies,
The agent is generating the URL correctly, see log entry below :
14/03/2008 12:54:24 PM Agent message: /pmpgb/quality/ncsystem.nsf/NuclearNCRForm?OpenForm&JobNum=AB00227-001/04&ItemNum=183&Heat_CastNum=test&QtyBad=3
The problem must be with the NCR form then.
I will work it out from there - thanks!
F1H
Subject: RE: Passing Values - Not Working 
Working fine now.
Forgot to put in the @UrlQueryString(“field”) in the default value
careless!
Thanks
f1H