Basic Customization > User Interface Customization > Presenting Information in the UI > Attribute Customization > Windchill Attribute Customization Overview > Common Attribute Customization Procedures > Visibility and Modifiability
  
Visibility and Modifiability
You want to control the visibility and the modifiability of an attribute.
Solution Elements
Element
Description
Immutable constraint
A constraint defined in the Type and Attribute Management utility. See Attribute Constraint Rules for more information.
Changeable constraint
A property constraint. Applies to modeled attributes only.
See the javadoc for com.ptc.windchill.annotations.metadata.PropertyConstraints and Modeling Business Objects for more information.
Visibility setting in the Type and Attribute Management utility
A configuration in the Type and Attribute Management utility. See Visibility Tab for more information.
Role-based Attribute Visibility
A configuration in the Profiles Management tool. See Managing Profiles for more information.
Attribute validator
Java classes that can be used to perform attribute validation and filtering. See UI Validation for more information
Intended Outcome
Attributes are displayed as follows in view mode for the various configurations:
Outside a table
In a table
Hidden attribute
The attribute (both label & value) is not displayed.
Column header will be displayed. For those row objects for which the attribute is hidden, the UI displays “(Secured Information)”
Created By
(Hidden)
Value hidden
Created By: (Hidden)
Created By
(Hidden)
Read-Only
When the attribute does not have a value
Created By: (Unassignable)
When the attribute has a value
Created By: John Doe
When the attribute does not have a value:
Created By
(Unassignable)
When the attribute has a value:
Created By
John Doe
Read-Write
When the attribute does not have a value yet
Created By:
When the attribute has value
Created By:
John Doe
When the attribute does not have a value yet:
Created By
When the attribute has value:
Created By
John Doe
Solution
The configurations required to achieve the different kinds of behavior are listed below:
If you want to…..
Configuration
Always hide an attribute from a specific UI, for all profiles
Simply exclude it from the UI (i.e. do not add it to an attribute panel or a table configuration).
Hide an attribute from a specific UI, for all profiles, based on specific business logic
Use the validation service.
Hide an attribute from all UIs, for specific profiles only
Use Role-based Attribute Visibility.
Limitation: This feature is available only for global attributes. See Creating a New Attribute for more information.
Always make an attribute not modifiable in any of the UIs it is displayed on
Use the Immutable constraint / changeable constraint.
Limitation: If the attribute is immutable on create or edit, do not add it to an area of the UI where fields that will be updated are placed.
Control the modifiability (hide value, make value editable or read-only) of an attribute in a specific UI, for all profiles
Use the visibility settings in the Type and Attribute Management utility to control the modifiability of an attribute in the end user UI. See visibility settings in the Type Manager for more information.
Limitations: This feature is limited to Create and Edit UIs only.
Also, at this point, the visibility & modifiability settings are honored only for those attributes that have local attribute behavior (All local attributes, global attributes and some modeled attributes). Modeled attributes with special OOTB behavior like Name, Number and Principal may not reflect this configuration.
Control the modifiability (hide value, make value editable or read-only) of an attribute in all UIs, for specific profiles only
Use Role-based Attribute Visibility.
Limitation: This feature is available only for global attributes. See Creating a New Attribute for more information.
Resolution of Multiple Configurations
When a global attribute has visibility configured both in the Profiles Management tool and in the Type and Attribute Management utility, it is resolved as follows:
The most restrictive setting of the Type and Attribute Management utility configuration and the result from the Profiles Management tool will be the final visibility setting of the attribute.
Example: Visibility settings for the attribute ‘Color’
in the Profiles Management tool:
Value Hidden
in the Type and Attribute Management utility, for Create Screen:
Read-only
Resulting visibility setting applied in the Create UI:
Value-Hidden (this is the most restrictive of the two settings)