Specialized Administration > Tailoring Business Objects > Type and Attribute Management > Working with the Type and Attribute Management Utility > Managing Types > Type Information Page > Cascading Attributes Tab > Cascading Attributes Rules Example
  
Cascading Attributes Rules Example
The following example uses a simple attribute data set with limited values.
* 
Create all cascading attribute rules for a scenario before using them.
Assume that you have three attributes on the Region type: Country, State, and City. You want to create a set of cascading attribute rules so that the values of the Country attribute to drive the available values for the State attribute, and the values of the State attribute drive the available values for the City attribute, as shown in the following table:
Country
State
City
USA
Arizona
Avondale
Bisbee
Douglas
Colorado
Alamosa
Denver
Westminster
Florida
Atlantis
Jacksonville
Miami
Australia
New South Wales
Albury
Sydney
Wollongong
India
Gujarat
Ahmedabad
Rajkot
Surat
Assume the following:
The Country, State and City attributes exist on the Region type.
Global enumerations have been created with the desired values for each of the attributes.
A single, enabled enumerated value list constraint has been created for each of the attributes, using the existing global enumerations.
For more information, see Enumerations and Cascading Attribute Rules.
First, create cascading attribute rules one level down the cascading attributes tree (from Country to State):
If Country = USA, then State = Arizona, Colorado, Florida
If Country = Australia, then State = New South Wales
If Country = India, then State = Gujarat
Then create rules that represent two levels down the cascading attributes tree (Country to State to City):
If Country = USA, and if State = Arizona, then City = Avondale, Bisbee, Douglas
If Country = USA, and if State = Colorado, then City = Alamosa, Denver, Westminster
If Country = Australia and if State = New South Wales, then City = Albury, Sydney, Wollongong
If Country = India and if State = Gujarat, then City = Ahmedabad, Surat, Rajkot
You can create a rule where a driven attribute can be hidden. For example, Singapore is a sovereign city, state and country. It has no states or cities.
In this case, a rule can be created where If Country = Singapore, then State = Is hidden. The State attribute will not be visible in the end-user user interface when this rule is satisfied.
You can also create a rule where it becomes mandatory for the user to assign a value to a driven attribute. For example, Singapore doesn’t have states or cities, so you may want to make it mandatory to provide a value for Zip code in order to capture some more information about the location.
In this case, you can create a rule where If Country = Singapore, then Zip Code = Is required. Providing a value for the Zip Code attribute will be mandatory in the end-user user interface when this rule is satisfied.
For more information on setting an attribute hidden or required in a rule, see Creating a New Cascading Attribute Rule.
* 
You must create rules that represent one level down the tree, because the Attribute Set Report is generated by looking at the intersection of all cascading attribute rules and constraints defined on the attributes involved in the attribute set. If these rules are not created, the report does not understand that certain values for State are constrained by certain values of Country.
For example: If the rule "If Country = USA, then State = Arizona, Colorado, Florida" is not created, the system thinks that all values of State are valid for all values of Country. This is true even though we have the rule: "If Country = USA, and if State = Arizona, then City = Avondale, Bisbee, Douglas" because this rule only specifies when the City values of "Avondale", "Bisbee" and “Douglas” are selectable. This rule does not specify when the "Arizona" value for State is selectable.
For more information, see Attribute Set Report.