Fundamentals > Windchill Search > Advanced Search Examples > Duplicate Criteria with Multi-Valued Attributes
Duplicate Criteria with Multi-Valued Attributes
Most attributes are single-valued. For example, the Format attribute can only have one value. The document is either Microsoft Word or PNG Image, but it cannot be both at the same time.
Therefore, when searching duplicate values, you must join these values with an OR operator:
Similarly, when you assign an object owner, you can select from a large list of users. However, once assigned, an object typically has only one owner (unless otherwise customized by your site). Therefore the Owner attribute is single-valued.
A multi-valued attribute is an attribute for which you can have zero, one, or more values. These are typically custom reusable attributes created by your site administrators. For example, a multi-valued attribute might be a list of codes to identify which departments contributed to an object. If no department contributed, then the attribute value would be empty. If departments did contribute, then you can select one or more codes from a list of values.
When searching for duplicate multi-valued attributes, AND and OR can be combined with the equal to and not equal to operators to perform complex searches.
* 
See Advanced Search Examples for an explanation of the formatting used in the result table examples.


Example: Multi-Valued Attribute Values Joined By AND
In this example, you are searching for objects owned by Jane Patel and which have department codes “A” and “B” and not “C.”
Owner
Jane Patel
Criteria
AND
Department Code
A
Department Code
B
Department Code
C
Search Results


Example: Multi-Valued Attribute Values Joined By OR
In this example, you are searching for objects owned by Jane Patel and which have department codes “A” or “B” or not “C.”
Owner
Jane Patel
Criteria
OR
Department Code
A
Department Code
B
Department Code
C
Search Results
Because every field is joined with an OR operator, objects owned by other users are also returned. Any object owned by Jane Patel is returned regardless of the department code.


Example: Multi-Valued Attribute Values Joined By Nested Criteria (1)
Owner
Jane Patel
Criteria
OR
AND
Department Code
A
Department Code
B
Department Code
C
Search Results
This returns the following objects:
Objects with department code A (any owner).
Objects with department code B (any owner).
Objects owned by Jane Patel that do not have department code C.


Example: Multi-Valued Attribute Values Joined By Nested Criteria (2)
Owner
Jane Patel
Criteria
AND
OR
Department Code
A
Department Code
B
Department Code
C
Search Results
This returns the following objects:
Objects that have department code A AND do not have department code C AND are also owned by Jane Patel.
Objects that have department code B AND do not have department code C AND are also owned by Jane Patel.


Isto foi útil?