IsOriginal

Description

Returns True if this Entity has duplicates but is not itself a duplicate.

This method reports whether an Entity object is a true original, that is, one that is not itself a duplicate. If this method returns True, then the IsDuplicate method must return False and the HasDuplicates method must return True. An Entity object must have at least one duplicate to be considered an original.

Syntaxe

VBScript

entity.IsOriginal 

Perl

$entity->IsOriginal(); 
Identificateur
Description
entity
Objet Entity représentant un enregistrement de données utilisateur. Si vous omettez cette partie de la syntaxe au sein d'un point d'ancrage, l'objet Entity correspondant à l'enregistrement de données en cours est faux (VBScript uniquement).
Return value
A Boolean whose value is True if this object has duplicates but is not itself marked as a duplicate of any other Entity object.

Exemples

VBScript

'Display a window indicating the IDs of the
' the duplicates of this record
If entity.IsOriginal Then
   ' Get the ID of this record
   originalID = entity.GetDisplayName

   ' Display the IDs of its duplicates
   duplicateLinkList = entity.GetDuplicates
   For Each duplicateLink In duplicateLinkList
      duplicateObj = duplicateLink.GetChildEntity
      duplicateID = duplicateObj.GetDisplayName
      OutputDebugString "Parent ID:" & originalID & _
            " child Id:" & duplicateID 
   Next 
End If 

Perl

# Display a window indicating the IDs of the

# the duplicates of this record

if ($entity->IsOriginal())

 {

 # Get the ID of this record

 $originalID = $entity->GetDisplayName();

   # Find out how many duplicates there
   # are so the for loop can iterate them. 
   # Display the IDs of its duplicates

   $duplicateLinkList = $entity->GetDuplicates();

   $numdups = $duplicateLinkList->Count();

   for ($x = 0; $x < $numdups ; $x++)

  {

   $duplicateLink = $duplicateLinkList->Item($x);
   $duplicateObj = $duplicateLink->GetChildEntity();
   $duplicateID = $duplicateObj->GetDisplayName();
   $session->OutputDebugString("Parent ID: ".$originalID." child
      Id:".$duplicateID);

  }

 } 

Commentaires