This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Jun 13, 2015, 6:28 PM
31 Posts

default values for PICKLIST_Names or Names field

  • Category: Notes Client
  • Platform: All Platforms
  • Release: 9.0.1
  • Role: Developer
  • Tags: Lotusscript
  • Replies: 0

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.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal