It has been a long time since I have done much LS and Native Notes development so when I went to do a simple address dialog I got stumped.
I created a field of type names and specified the Address Dialog, allow multi value and have the allow name not in the list deselected. I get the dialog and can select the names all is fine except that I can type any name I want directly into the names field not using the dialog.
So the next step was to create a button with the following code behind it:
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim rtn As Variant
Dim thisDoc As NotesDocument
Dim origNames As Variant
Set thisDoc = ws.CurrentDocument.Document
origNames = thisDoc.CCTo
rtn = ws.PickListStrings( PICKLIST_Names,True )
If Not(Isempty( rtn)) Then
thisDoc.CCTo = rtn
thisDoc.CCToChanged = 1
End If
ws.CurrentDocument.Refresh
End Sub
Now this works fine but I want the values in origNames to be the the default values in the PickList and can't see how to get them there.
So the Names Field prompt ignores the Allow Values Not in list and the PickList does not have any default values. I could probably write a bunch of code (on the PickList) to compare the two lists and make them unique but what if they need to remove a name from the list. This seems to be way to complicated. Been working in XPages and having trouble getting my head back into LS and Native Notes.