Subject: Private documents
Have an onChange event on the radio button that asks who should be in the readers field if “Private” is Selected. This event should also clear the readers field if public is selected and there are values in the readers field.
Have the event run on the change and trap so it does not rerun on the exit (a nasty bug in ND6 as far as I am concerned).
Here is an example of a Radio Button field asks for a choice similar to yours (asks if a document should be processed for the author or another individual):
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim uidoc As NotesUIDocument
Set uidoc=ws.currentdocument
Dim strChanged As String
’ THIS FIELD IS TESTED ON THE EXITING OF THE FIELD TO SEE IF A CHANGE HAS OCCURRED
strChanged=uidoc.FieldGetText
(“eqcoReserveChoiceChanged”)
Dim strChange As String
strChange=uidoc.FieldGetText
(“eqcoReserveChoiceChange”)
’ THIS TESTS TO SEE IF THERE WAS A CHANGE SO THE EVENT DOES NOT FIRE AGAIN WHEN EXITING THE FIELD
If strChanged<>“” Then
If stChanged = strChange Then
Messagebox "exiting sub"
Exit Sub
End If
End If
If strChange=“Another Individual” Then
Call uidoc.FieldSetText
(“eqcoReserveForPick”,“”)
End If
If strReserve=“Myself” Then
Call uidoc.FieldSetText
(“eqcoReserveChoiceChange”,strReserve)
Elseif strReserve=“Another Individual” Then
Call uidoc.FieldSetText
(“eqcoReserveChoiceChange”,strReserve)
Dim messagelist As String
Dim varName As Variant
varName=ws.PickListStrings(PICKLIST_NAMES,
False)
If ( Isempty( varName ) ) Then
Messagebox "Canceled" , , "Name selected"
Else
Forall n In varName
Set nam = session.CreateName(n)
Call uidoc.FieldSetText
("eqcoreserveForPick",Nam.Abbreviated)
End Forall
End If
End If