ISProviderGroup.AddGroupMember

Description

This function adds the group member with the specified ID to the selected provider group.

Syntax

object.AddGroupMember aGroupID

Part Attribute Type Description
object Required
The object always implements the ISProviderGroup interface
aGroupID In, Required
int
The index of the group that will be added

Example

Add the group member with the specified ID to the selected provider group and display the name of the provider group, the number of the members it has.

Dim aFilter
Dim aProviderGroups
Dim aProviderGroup
Dim aTrans
Dim aGroupMember
Dim aMessage

Set aTrans = Profile.StartMapTransaction

set aFilter = Profile.CreateProviderGroupFilter
aFilter.Code = "DISTR"
set aProviderGroups = Profile.LoadProviderGroups(aFilter)

if aProviderGroups.Count = 0 then
  Profile.MsgBox("There is no provider group with the specified code")
  exit sub
end if

set aProviderGroup = aProviderGroups.Items(0)
aProviderGroup.AddGroupMember(154)

aTrans.SnapShot

aMessage = "The provider group '" & aProviderGroup.Name & "' has " &_
  aProviderGroup.GroupMembers.Count & " group member(s):" 
for each aGroupMember in aProviderGroup.GroupMembers
  aMessage = aMessage & vbNewLine & " - " & aGroupMember.Name
next
 
Profile.MsgBox(aMessage)
Note:

In Profile Client v8 on User Interface Group Member can be added in Organisation > People & Places > Organisation and Places > Open the selected Provider Group > Add.

Version information

Added in v7.8.0