Users of the Business Control Center can add the same item more than once to a collection property type if the collection is a list or an array. For example, in Merchandising, a SKU can be added twice to the same product, or a category can be added twice to the same parent category.

You can prevent this type of duplication by setting the prohibitDuplicates attribute to true in the item descriptor of the asset that contains the collection property. The asset item descriptor is located in the repository definition XML file for the repository that contains the asset. By default, duplicates are allowed for lists and arrays.

Caution: Setting the prohibitDuplicates attribute to true only prevents addition of duplicate values through the user interface. This setting does not prevent the direct import of duplicate values. Also, this setting has no effect on existing duplicate values.

You can set the prohibitDuplicates attribute individually for any repository item asset type. Continuing the Merchandising example, you can allow a product to be added multiple times to a category, but prohibit a SKU from being added multiple times to a product.

In the following sample XML, the prohibitDuplicates attribute is set to prevent users from adding the same fixed child product more than once to a single category:

<property category-resource="categoryProducts" name="fixedChildProducts"
 data-type="list" component-item-type="product" column-name="child_prd_id"
 queryable="true" display-name-resource="fixedChildProducts">
 <attribute name="propertySortPriority" value="-4"/>
 <attribute name="references" value="true"/>
 <attribute name="prohibitDuplicates" value="true"/>
</property>

For more information about repository definition XML files, item descriptors, and collection property types, see the ATG Repository Guide.