Search these areas:
Help
Support Forums
Product Info



-Introduction
-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Views
-Templates
-Components
-Data Analysis
-Members
-Security
-Importing
-Exporting
-FTP
-JavaScript
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-Glossary
-New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

KnowledgeBase


How To: Write a script that returns a list of my web members
Article TypeHow To
TitleWrite 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 ReviewedFebruary 20, 2015 14:07:48

  
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us