The CheckFieldUniqueness method can be used to test the uniqueness of a targetEntity's field against the entities in the target entity space.
# field: string of the field # entitiesToTest: collection of targetEntities FieldUniquenessResult function CheckFieldUniqueness(field, entitiesToTest)
The CheckFieldUniqueness returns an object called FieldUniquenessResult which contains the results of the uniqueness test. FieldUniquenessResult contains the following attributes:
|Uniques||A collection of target entities that passed the uniqueness check||
|LocalNonUniques||A collection of target entities that failed the uniqueness check against another entity in the tested collection||
|ContextNonUniques||A collection of target entities that failed the uniqueness check against an entity in the target entity space.||
$report = $components.CheckFieldUniqueness("uniqueId", $targetEntities); # Entities with unique value for 'uniqueId' field $uniqueEntities = $report.Uniques; # Entities with a non-unique value for 'uniqueId' field compared against other entities in $targetEntities $locallyNonUniques = $report.LocalNonUniques; # Entities with a non-unique value for 'uniqueId' field compared against other entities already in the target entity space $contextNonUniques = $report.ContextNonUniques;
Customer support service by UserEcho