How To: Write a script that returns a list of my web members |
Article Type | How To |
Title | Write a script that returns a list of my web members |
| <i>I want to write a script to send email to all of the members of my web. How can I enumerate through all of the web members from script?</i><br />
<br />
Query your web's <a href="http://support.dataweb.com/default.view?Topic=designer/addressbook">AddressBook</a>:<br />
<br />
There is currently no script method for generating a list of usernames or email addresses from your web's member list. However, by default your web's AddressBook should contain a record of this information. The following script returns an array of web members' email addresses:<br />
<br />
<span class="smallCode"><pre>
// return an array of email addresses
function aEmailList()
{
var aEmailList = new Array;
var rsAddressBook = new Resultset( "AddressBook", "email", "Email is NOT NULL" );
while (rsAddressBook.next() )
{
aEmaillist.push( rsAddressBook.email );
}
return aEmailList;
}
</pre></span> |
Last Reviewed | February 20, 2015 14:07:48 |
|