Script functions reference > Script functions in alphabetical order > G > GetDistributionChannelsForRole

GetDistributionChannelsForRole
Syntax
GetDistributionChannelsForRole(role_name, doc_type, directory, channels_var);
role_name
doc_type
The document type for which the role’s users use the distribution channels. The document type must be defined in the Project and the StreamServer application started.
directory
0 = internal directory, 1 = external directory
channels_var
The variable that will contain the returned values. If you specify $<channels_variable>[0], all channels are returned (if your counter starts on 0, see example below). If you specify $<channels_variable>, only the first channel is returned.
Description
Returns the distribution channels for a role, for a specific document type.
Returns
An array with the distribution channels for a role’s users. If the argument channels_var is a string, only the first distribution channel is returned as a string.
Example
$channels[0] = "";
$cnt = getDistributionChannelsForRole("administrator","invoice",0,$channels[0]);
$a = 0;
while ( num($a) < num($cnt) )
{
   Log( 0, "Channel : " + $channels[num($a)] );
$a++;
}
OpenText StreamServe 5.6 Updated: 2013-03-01