Sean Cull

Jake Howlett’s ( codestore.net ) Fake Names - 40,000 names in a domino directory ( 10/10 ) 

Sean Cull  30 May 2008 09:42:01

This is good for demos and anonymising demo data although you will need to add some randomisation otherwise all of your demo people will be called Aaron or Abbot.

Strangely in the 2064 surnames there are no Culls !

http://www.codestore.net/store.nsf/unid/BLOG-20070104?OpenDocument

I have also included the code that I used to cut the names down to the first occurrence of each surname, leaving 2064 names

Image:Jake Howlett’s ( codestore.net ) Fake Names - 40,000 names in a domino directory ( 10/10 )
Sub Initialize
       
       'This code takes all of the records apart from the first occurence of any surname
       ' and puts them in a folder where they can be mnually deleted from
       ' Sean Cull
       
       Dim session As New notessession
       Dim db As notesdatabase
       Dim view As notesview
       Dim vn As NotesViewNavigator
       Dim vec As NotesViewEntryCollection
       Dim vec_ToDelete As NotesViewEntryCollection
       Dim entry As NotesViewEntry
       Dim CurrentFamilyName As String
       
       Set db = session.CurrentDatabase
       Set view = db.GetView("($VIMPeopleByLastName)")
       Set vec = view.AllEntries
       Set vec_toDelete = view.GetAllEntriesByKey("gobledegook")
       Set entry = vec.GetFirstEntry
       
       CurrentFamilyName = entry.ColumnValues(0)
       
       Do Until entry Is Nothing
               Print entry.columnvalues(0)
               If entry.ColumnValues(0) <> CurrentFamilyName Then
                       ' keep this record
                       CurrentFamilyName = entry.ColumnValues(0)                
               Else
                       Call vec_ToDelete.AddEntry(entry )
               End If
               Set entry = vec.GetNextEntry(entry)
       Loop
       
       Call vec_ToDelete.PutAllInFolder("$To_Delete")        
End Sub



 My resources  Lotus 


No Comments Found

Please leave a comment


Subject:
   
Name:
E-mail:
 
Comment:  (No HTML - Links will be converted if prefixed http://)
 
Remember Me?