Domino Ldap multiple values on shortname

A third party product is trying to use the Domino LDAP attribute uid but expecting the content to be a single value but it may contain a multiple values. What would be best approach around this issues. I could create another field in the person form with a formula taking the first value from the shortname field. Then map the LDAP attribute “uid” to that field. Does anyone have any ideas on this ?Thanks

Bob

Subject: Answer

Here is code that you can run as a scheduled agent on a hub server on off hours. Initially it would modify all the person docs in the names.nsf and then just modify the one that are new and different value in the uid field.

Once that it setup you new to add the new fields to the ldap schema.

Change the server name and I used the new field to be called New_uid

Sub Initialize

Dim db As New NotesDatabase( "Server name", "names.nsf" )

Dim dateTime As New NotesDateTime( "01/01/1980" )

Dim selection As String

Dim collection As NotesDocumentCollection

Dim q As String

Dim j As Long

Dim doc As NotesDocument

q = Chr(34)

selection = "Form = " & " & q   & Person & q & "  & " @Member(@lowercase(uid) ; (@lowercase(New_uid))> 0"

Set collection = db.Search( selection, dateTime, 0 )



For j = 1 To collection.Count

	Set doc = collection.GetNthDocument( j )

	doc.new_uid = LCase(doc.uid(0))

	Call doc.save(True,True)

Next



Print j;" Docs updated" 

End Sub