Getting the values from the view

I have a multivalue field (EmailList) and District field (DC) on a form.

I have 3 documents in a view.

First document have “John” in the EmailList field. DC is 4.

Second document have “Jack” in the EmailList field. DC is 5

Third document have “John;Jack” in the EmailList field. DC is 4.

I have a view with two columns. First column (EmailList) is categorized.

I need to get the values of the EmailList from all the documents in the view and send them only one email.

Any input will be helpful Thanks in advance

Subject: Getting the values from the view.

You need to do a dblookup or getdocumentbykey on a view sorted by District, then if using Lotusscript, put all the returned documents email addresses in an array and then make the array unique.

Subject: Getting the values from the view.

here is my codeserver$ = “server name”

dbfile$ = "db name"

counter% = 1



Dim db As New NotesDatabase( server$, dbfile$ )

Dim view As NotesView

Dim doc As NotesDocument



Dim EmailList( 1 To 1000 ) As Variant	

Dim CurrentList As Variant



Set view = db.GetView( "Array Email Reminder Agent" )

Set doc = view.GetFirstDocument   





While Not ( doc Is Nothing )         

’ Get the value on the current document that shows up in

’ view’s first column

	CurrentList = doc.ColumnValues( 0 )

	EmailList( counter% ) = CurrentList

	

'Messagebox counter%

	Messagebox  CurrentList(counter%)

	

	Set doc = view.GetNextDocument( doc )

	counter% = counter% + 1

Wend   

’ There are now counter% - 1 items in the productList