How to create a mail list for all users

I have a project tracking database where project leaders have multiple projects. How do I generate a mail send to list consisting of all project leaders without duplicating the names?

Subject: How to create a mail list for all users

Hi,

You could do an @dbcolumn to a view where all project leaders are listed, then use @unique on the list. No duplicates!

tList:=@unique(@DbColumn(“”;“”:“INVENTRY.NSF”;“vwProjectLeaders”;2));

@MailSend( tList ; “” ; “” ; “Project Leader Mail” ; “” ; “” )

HTH,

Ranjan Returns

Subject: How to create a mail list for all users

M,

Lots and lots of ways. One way I like is to make a view sorted on that field and use GenerateUniqueKeys to trim the view for you. Now you can do an @DbColumn or whatever to get an already trimmed list of names.

Search on “Performance view” in the LDD articles section and you should get some matches for an article I wrote in January that covers this topic.

regards,

raphael

Subject: RE: How to create a mail list for all users

Raphael–I did what you suggested and created a view with a sorted column and used GenerateUniqueKeys. The view worked for a couple months but now I get an “Entry Not Found in Index” error. What happened?

Subject: RE: How to create a mail list for all users

This could blow up if there are a lot of names and the result exceeds 16K?

Subject: How to create a mail list for all users

Not sure where you want to use this Send to list, so there are several possibilities for how to generate it.

Here are a couple of suggestions:

For each suggestion, create a categorized view by project leader.

  1. With the view collapsed, select all categories and export the data.

  2. If you are going to use this information programmatically, you could use the NotesViewNavigator class and hit each category, capture the value from the first column and build an array of the data. Then, just shove that into ‘send to.’