Additional Capabilities > Windchill PartsLink > Classification Administration > Classification Attributes > Attribute Information Pane > Classification Constraints
  
Classification Constraints
Constraints restrict the values that can be assigned to attributes.
Windchill supports several types of constraints and allows more than one constraint for an attribute. For example, you can constrain an attribute to support only a single value. You can then further restrict the value to belong to a specific set of strings.
Constraints can only be applied in the context of a classification node and are maintained on the Constraints tab available from the classification attribute information pane:
For information on adding a new classification constraint, see Add Constraints.
More detailed information is also available from the Type and Attribute Management utility help: Constraints Tab
Constraint Types
The following constraints are available for classification attributes. For more information on data types, see Supported Data Types.
Enumerated Value List
Data Types
Description
String
An enumerated list of legal values. The enumerated list is different than other value lists in that it can use a global enumeration or be based on a global enumeration.
If an Enumerated Value List condition uses or is based on a global enumeration, the name of the selected global enumeration displays when creating or editing the condition.
For information on adding data to an enumerated value list, see Enumeration Constraints and Managing Global Enumerations.
* 
For unwanted global enumeration entries that have already been used, it is better to disable the entry rather than delete it. For more information, see Deleting an Entry.
External Enumerated Value List
Data Types
Description
String
An enumerated list of legal values from an external source, such as an ERP system or other database outside of Windchill.
For example, you could link values in your ERP system to the Name attribute of an object type in Windchill. When users are creating or editing objects of that object type, they could choose from a list populated from the ERP system.
This enumerated list supports the following:
Localized values
Sort order
Dynamic updates from the external source.
Once the external enumerated value list constraint has been added to an attribute, specify the class name of the EnumerationInfoProvider implementation and the initialization string customized for this value list.
* 
Conditions cannot be added on external enumerated value list constraints.
For details on creating and adding data to the external enumerated value list, see External Enumerated Value Lists.
Immutable
Data Types
Description
All
The attribute values cannot be set, edited, or removed.
This constraint is primarily intended for making an attribute obsolete, without removing it from the user interface.
* 
Calculated attributes always have an Immutable constraint, as their values are derived from their formulas, rather than edited.
Legal Value List
Data Types
Description
Examples
All
A list of allowable attribute values. The attribute value must be the same as one of the specified constraint values.
Enter multiple values separated by the pipe character ( | ), or click the edit icon next to the text field to open the Edit Constraint window.
* 
Legal Value List values cannot be localized. If you want to localize your legal values, use the Enumerated Value List constraint rule instead.
* 
For Reference data types, the Legal Value List constraint includes two text fields. One field is for specifying the internal name of an attribute on the type specified in the reference, and the other for entering the list of legal values for that attribute.
The legal value list specified is abc|cde|efg.
The legal strings that can be specified for the attribute are abc, cde, or efg.
For the object reference data type, the Other Side Class specified for the object reference relationship is to the wt.org.WTUser object type. the attribute entered for the constraint data is last and the legal value list specified is Johnson|Olsen|Smith, then the legal values for the Last Name attribute of the referenced user can only be Johnson, Olsen, or Smith.
Lowercase
Data Types
Description
Examples
String
Uppercase characters are converted to lowercase when saved.
The user enters AB-aBc1.
The value is saved and generated as ab-abc1.
No Duplicate Values
Data Types
Description
All global attribute data types
Requires the set of values for a multi-valued attribute to be distinct. Duplicate values are not allowed.
Regular Expression
Data Types
Description
Examples
String
A regular expression defining the pattern of text the attribute value must match. Standard regular expression syntax is supported.
You specify the following expression:
f..l
Accepted values include:
fall
foil
Rejected values include:
fossil
foot
You specify the following expression:
[fall|winter]2016$
Accepted values include:
Product Line Winter 2016
Release Fall 2016
Rejected values include:
Winter Catalog 2016
Release Fall 2012
Required
Data Types
Description
All
The attribute must have at least one value.
Single-Valued
Data Types
Description
All
No more than one value is allowed.
* 
Windchill ProjectLink does not support multi-valued attributes. This constraint is inherently applied to all Windchill ProjectLink attributes.
String Format
Data Types
Description
Examples
String
A basic mask to constrain the format of a string.
The mask uses the following substitutions:
C—One letter or digit.
L—One letter.
D—One digit.
* 
The String Format constraint rule is retained for compatibility with previous releases. PTC recommends using the Regular Expression constraint rule for new constraints.
The definitions of letter and digit can be found in java.lang.CharacterClass.
You specify the following mask for telephone numbers:
(DDD)DDD-DDDD|DDD-DDD-DDDD|DDDDDDDDDD
Accepted values include:
123–456–7890
(123)456–7890
1234567890
Rejected values include:
123–AB–6789
123/456/7890
String Length
Data Types
Description
Examples
String
The length of the string must be equal to or within the values specified.
From specifies the minimum value; To specifies the maximum value.
From3To5
Accepted values include:
abc
abcd
abc12
Rejected values include:
ab
abc123
Suggested Value List
Data Types
Description
Examples
Date & Time
Integer Number
Real Number
Real Number with Units
Reference
String
URL
A set of suggested values for the attribute.
Enter multiple values in the text field, separated by the pipe character ( | ), or click the edit icon next to the text field to open the Edit Constraint window.
For the string data type, if the suggested value list specified is abc|cde|efg, then the suggested values for the attribute are abc, cde, or efg.
Uppercase
Data Types
Description
Examples
String
Lowercase characters are converted to uppercase when saved.
The user enters AB-aBc1.
The value is saved and generated as AB-ABC1.
Valid Range
Data Types
Description
Examples
Date & Time
Integer Number
Real Number
Real Number with Units
String
The value of the attribute must be equal to or within the values specified.
From specifies the minimum value; To specifies the maximum value.
The data type is an integer and you specify the following range:
From3To5
Accepted values include:
3
4
5
Rejected values include:
2
6
Strings can be alphanumeric characters.
If you are expecting strictly alphabetical character input, you can specify the following range:
FromcatToorange
Accepted values include:
dog
fish
Rejected values include:
apple
zebra
If you are expecting the input to include strictly numbers, you can specify the following range:
From3To5
Accepted values include:
33
465
58
Rejected values include:
29
6008
Wildcard
Data Types
Description
Examples
String
URL
The attribute value must match the wildcard pattern of the constraint data specified:
Contains—Contains the value specified. This is the equivalent of *string*.
Begins With—Begins with the value specified. This is the equivalent of string*.
Ends With—Ends with the value specified. This is the equivalent of *string.
Equals—Equals the value specified. This is the equivalent of string.
Containssign
Accepted values include:
Design
Signal
Rejected values include:
Despite
Segment
Ends Wither
Accepted values include:
Engineer
Writer
Rejected values include:
Engineering
Written