ISOrgMember.ContainsOrgMemberID

Description

This function returns True if the current organisation node contains the organisation node with the specified ID.

Syntax

object.ContainsOrgMemberID(aOrgMemberID)

Part Attribute Type Description
object Required
The object always implements the ISOrgMember interface
aOrgMemberID In, Required
int
ID of the organisation node

Return Value

bool

Returns True if the current organisation node contains the organisation node with the specified ID.

Example

Load two organisation nodes and display if the first organisation node contains the second organisation node.

Dim aFilter
Dim aOrgMembersA
Dim aOrgMembersB
Dim aOrgMemberA
Dim aOrgMemberB
Dim aMessage

Set aFilter = Profile.CreateOrgMembersFilter

aFilter.Code = "AUTO12" 
set aOrgMembersA = Profile.LoadOrgMembers(aFilter)
if aOrgMembersA.Count = 0 then
  Profile.MsgBox("There is no organisation node with the specified code")
  exit sub
end if   

aFilter.Code = "AUTO13" 
set aOrgMembersB = Profile.LoadOrgMembers(aFilter)
if aOrgMembersB.Count = 0 then
  Profile.MsgBox("There is no organisation node with the specified code")
  exit sub
end if

set aOrgMemberA = aOrgMembersA.Item(0)
set aOrgMemberB = aOrgMembersB.Item(0) 

if aOrgMemberA.ContainsOrgMemberID(aOrgMemberB.Id) then
  Profile.MsgBox("The org node " & aOrgMemberA.Name & " contains " & aOrgMemberB.Name)  
else  
  Profile.MsgBox("The org node " & aOrgMemberA.Name & " does not contain " & aOrgMemberB.Name)
end if 
Note:

In Profile Client v8 on User Interface Organisation Nodes can be found in Organisation > People & Places > Organisational Structure.

Version information

Added in v7.8.0