Hi guys,
I’m pretty sure this may be a simple problem. I have a WebQuerySave agent, in one of the sections of the script i am trying to read a column in a view. The column is populated by a formula. Below is the type of formula:
@If(G2BCom = “G2B”; “Yes”; G2BCom = “”; “No”; G2BCom)
i.e., if the G2BCom field = “G2B” then the cell displays Yes. If the G2BCom = “” then the cell displays No. This formula works fine.
My agent is trying to read this column. Here is my code:
Sub UpdateRecord(WindowsUserName As String)
Msgbox "Update Record - START"
Dim s As New notessession
Dim db As notesdatabase
Set db =s.currentdatabase
Set globalAppsRequest = db.getview("AllApplications")
Dim doc1 As notesdocument
Dim doc2 As notesdocument
Dim G2BfromView As String
On Error Resume Next
Set doc1= globalAppsRequest.getfirstdocument
Msgbox "G2B in View Yes/No 1 = " + doc1.G2BCom(0)
Do While Not (doc1 Is Nothing)
Set doc2= globalAppsRequest.getnextdocument(doc1)
If doc1.WindowsUserName(0) = WindowsUserName Then
Msgbox "1.1.1"
End If
Set doc1=doc2
Loop
Msgbox "Update Record - FINISH"
End Sub
You can see the above ’ Msgbox “G2B in View Yes/No 1 = " + doc1.G2BCom(0)” ’ when i check the server, the doc1.G2BCom field (that should say Yes/No) is blank.
I thought something strange is going on so i set the MsgBox to output that value of a different field that isnt populated by a formlua. It worked perfectly.
Can anybody see what is wrong here??