How to set default values for a LotusScript PickListString using Names

861 views Asked by At

I have the following code on a button on a Notes Form

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

The picklist works fine and sets the values into the field CCTo however, I need to have the values in origNames as a set of default values in the PickList and can't see how to get there.

1

There are 1 answers

0
tvdpol On BEST ANSWER

The PickListString does not utilize pre selected choices. I think you should use the notesUIWorkspace.Prompt( )

The type PROMPT_OKCANCELLISTMULT to be precise. The Notes Designer Help has some example code.