Specialized Administration > Tailoring Business Objects > Type and Attribute Management > Working with the Type and Attribute Management Utility > Managing Types > Attribute Information Page > Constraints Tab > Attribute Constraint Rules
  
Attribute Constraint Rules
The following table lists and describes the rules available for attribute constraints within Windchill, and the data types to which they apply.
If multiple constraints are added to an attribute, then the attribute values must satisfy all of the enabled constraints on that attribute.
Rule
Data Types
Description
Example Data
Legal Value List
Real Number
Real Number with Units
Hyperlink
Integer
String
Date and Time
Boolean
A list of allowable attribute values. The attribute value must be the same as one of the specified constraint values.
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 legal value list specified is abc|cde|efg, then the legal strings that can be specified for the attribute are abc, cde, or efg.
For the integer data type, if the legal value list specified is 1|2|3, then the legal integers that can be specified are 1, 2, or 3.
Enumerated Value List
String
An enumerated list of legal values. This enumerated list can:
Use a global enumeration
Be based on a global enumeration
Be uniquely created for this condition
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 constraint.
For details on adding data to an enumerated value list, see Enumerated Value List Constraints.
Suggested Value List
Real Number
Real Number with Units
Hyperlink
Object Reference
Integer
String
Date and Time
Provides 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.
Significant Figures Set
Real Number
Real Number with Units
A specialized form of Legal Value List, allows any values that match the supplied set of values when rounded to the same number of significant figures as the values from that set. Does not require exact numerical matches.
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.
If the significant figures set is 2.0 | 4.5 | 265.400, then the allowed values are 1.95 <= value <= 2.05  or  4.45 < value < 4.55  or  265.3995 <= value <= 265.4005.
Valid Range
Real Number
Real Number with Units
Date and Time
Integer
String
The actual value of the attribute must be equal to or between the values specified (the range is inclusive). The From field specifies the minimum value; the To field specifies the maximum value.
For the numerical data types, if the valid range is specified as From1To7, allowable attribute values include 2 and 7, but not 9.
For the string data type, the Valid Range constraint behaves like a dictionary. If the valid range is specified as FromaardvarkTobutton, allowable attribute values include antelope and bread, but not carrot. If the valid range for a string data type with numerical values is specified as From1To7, allowable attribute values include 2, 22, and 58, but not 82.
Regular Expression
String
A regular expression defining the pattern of text the attribute value must match. Standard regular expression syntax is supported.
c.t
Examples of legal values: cat, cot, cut
String Format
String
Provides a set of basic masking to regulate the format of a string. The constraint data is a set of strings defining positional formats for the string content. C, L, and D in constraint data are reserved characters and should not be used as delimiters; all other characters are considered delimiters.
C means one letter or one digit.
L means one letter.
D means one digit.
The definitions of letter and digit can be found in Java.lang.CharacterClass.
* 
The String Format constraint rule is retained for compatibility with previous releases. PTC recommends using the Regular Expression constraint rule for new constraints.
1. SSN formatting value: DDD-DD-DDDD.
Examples of legal strings:
123–45–6789
452–98–4444
2. Telephone number formatting value: (DDD)DDD-DDDD|DDD-DDD-DDDD|D-DDD-DDD-DDDD
Examples of legal strings:
(555)454–6789
555–198–3247
1–800–436–7869
Wildcard
String
Hyperlink
The attribute value must match the wildcard pattern of the constraint data specified:
Contains—Contains the value specified.
Begins With—Begins with the value specified
Ends With—Ends with the value specified.
Equals—Equals the value specified.
1. Containsabc
Legal strings can be Ababc, abcZ, AabcZ
2. Ends Wither
Legal strings can be ABCer, Developer.
String Length
String
The length of the string value must be greater than or equal to the minimum, and less than or equal to the maximum values specified (the range is inclusive). The From field specifies the minimum value; the To field specifies the maximum value.
If the string length is specified as From3To200, then the number of characters in the string can be greater than or equal to 3 and less than or equal to 200.
Lowercase
String
Non-lowercase characters are converted into lowercase when saved.
For example, if MyValue is entered as the attribute value, it is converted to myvalue.
No data is specified for this constraint.
Uppercase
String
Non-uppercase characters are converted to uppercase when saved.
For example, if MyValue is entered as the attribute value, it is converted to MYVALUE.
No data is specified for this constraint.
Immutable
All
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.
No data is specified for this constraint.
Required
All
The attribute must have at least one value.
No data is specified for this constraint.
Single-Valued
All
No more than one value is allowed.
* 
Windchill ProjectLink does not support multi-valued attributes. All attributes in Windchill ProjectLink are considered to have this constraint applied.
No data is specified for this constraint.
Legal Type List
Object Reference
The list of allowable types for the reference link.
* 
Only the type and subtypes of the type specified for the Other Side Class attribute can be specified.
Enter multiple types by their internal names, 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.
* 
You must specify the Internal Name of the type, rather than the Display Name.
If you want to include both the specified type and all if its subtypes, add a caret ( ^ ) in front of the type name.
If the Legal Type List is specified as wt.doc.WTDocument|com.ptc.ptcnet.Agenda|com.ptc.ptcnet.General, then only documents of the Document parent type and the General and Agenda document subtypes can be selected for this attribute.
If the legal type list is specified as ^wt.doc.WTDocument, then only documents of the Document parent type and all of its subtypes can be selected for this attribute.
Classification
String
(Available only if Windchill PartsLink Classification and Reuse is installed.)
Used to create a binding attribute on parts for classification. Attributes with this constraint applied can be selected when adding a nested classification layout element to an attribute layout.
Specify the namespace (for example, com.ptc.csm.default_clf_namespace) and optionally the internal name of a classification node.
For more information on classification, see, About Classification Administration.
No Duplicate Values
All data types for global attributes.
Requires the set of values for a multi-valued attribute to be distinct. Duplicate values are not allowed.
No data is specified for this constraint.
External Enumerated Value List
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 Windchill type, they would choose from a list populated from the ERP system.
This enumerated list can:
Support localized values
Support a sort order
Be dynamically updated 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.
For further information on customizing attribute behavior, see Attribute Customization.