I am having problems with a case statement working with an if statement within it. Below is a portion of a LotusScript case statement. When I walk this through the debugger, it appears that everything should execute, but it doesn't.
When I view the value of "Planner_Yes_No" in the debugger, the value is "Yes", but the value does not execute the next line. Instead, the else statement is executed. Can anyone tell me what I am doing wrong?
Here's the code:
Case "2"
If doc.getitemvalue(Planner_Yes_No)(0) = "Yes" Then
Set maildoc=New notesdocument(db)
Set body = New NotesRichTextItem( maildoc, "Body" )
plannerName = Planner_List
maildoc.sendto= doc.Planner_List
maildoc.form="Memo"
maildoc.Principal = doc.Name
maildoc.subject = "Planner Review Parts Request
from Service"
Call body.appendtext("Please review the Service
Parts Request and determine the ETA."
Call body.addnewline(2)
Call body.AppendDocLink( doc, "" )
doc.mail_send="3"
Call doc.save(True, True)
Call maildoc.send(True)
Set doc = view.getnextdocument(doc)
Else
Set doc = view.getnextdocument(doc)
End If
------
Thanks,
Jean
When I view the value of "Planner_Yes_No" in the debugger, the value is "Yes", but the value does not execute the next line. Instead, the else statement is executed. Can anyone tell me what I am doing wrong?
Here's the code:
Case "2"
If doc.getitemvalue(Planner_Yes_No)(0) = "Yes" Then
Set maildoc=New notesdocument(db)
Set body = New NotesRichTextItem( maildoc, "Body" )
plannerName = Planner_List
maildoc.sendto= doc.Planner_List
maildoc.form="Memo"
maildoc.Principal = doc.Name
maildoc.subject = "Planner Review Parts Request
from Service"
Call body.appendtext("Please review the Service
Parts Request and determine the ETA."
Call body.addnewline(2)
Call body.AppendDocLink( doc, "" )
doc.mail_send="3"
Call doc.save(True, True)
Call maildoc.send(True)
Set doc = view.getnextdocument(doc)
Else
Set doc = view.getnextdocument(doc)
End If
------
Thanks,
Jean