I have a form that allows users to submit suggestions. Over the web the functionality is working fine but within the client there is a problem. I have a radio button in the submission form that allows users to have their name posted or to be anonymous. Within the client it continues to post their name no matter what selection they make on the form. Anyone have any ideas why this is happening? I have an agent and here is the code…
SubmitAnonymousSuggestion
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim richy As NotesRichTextItem
Dim newrichy As NotesRichTextItem
Set db=session.CurrentDatabase
Set doc = session.DocumentContext
Set richy=doc.getfirstitem("Suggestion")
If doc.IncludeName(0)="Do Not Include My Name" Then
'create anonymous form
Set newdoc=db.CreateDocument
newdoc.Form="suggestionform"
Set newrichy = New NotesRichTextItem( newdoc, "Suggestion" )
Call newrichy.AppendRtItem(richy)
newdoc.Topic=doc.Topic(0)
newdoc.Status="Open"
Call newdoc.Save(True,True)
End If
End Sub
I also have 3 hidden fields on the submission form…
User CN:(textfield/computed) @If(IncludeName=“Do Not Include My Name”;“Anonymous”;@Name([CN];@UserName))
return after submit:(text field/editable) “
Thank You!
Your suggestion has been submitted.”
save optionst:(text field/computed) @If(IncludeName=“Do Not Include My Name”;“0”;“1”)
If anyone can give me some ideas I really would appreciate it.