Administering : Managing business rules and expressions : Business rules definitions : SetChoice business rule
  
SetChoice business rule
You can use the SetChoice business rule to set a Choice attribute to a specific item when the value of one or more other attributes change.
Prerequisites
A Choice attribute
A business rule container attribute, which must be a Text attribute
Format
SetChoice business rule can be used in 2 formats: basic or extended. Enter the business rule in either the basic format or in the extended format, in the business rule container attribute.
In the basic format, the value of the choice attribute is not based on the source attribute. The "Choice Item ID" provided in the format is used to set the value of the choice attribute.
=SetChoice("Choice Attribute ID","Choice Item ID",
"Trigger on Element Creation",'Source Attribute Name') 
In the extended format, the value of the choice attribute depends on the value of the source attribute. The source attribute values and the corresponding choice item IDs are provided in the following format:
=SetChoice("Choice Attribute ID","Choice Item ID",
"Trigger on Element Creation","strict",
"Corresponding Choice Item ID1_Source Attribute Value 1",
"Corresponding Choice Item ID2_Source Attribute Value 2",
'Source Attribute Name')
Note If the value of the source attribute changes to a value that is not mapped to a Choice Item ID, the business rule uses the default choice item ID "Choice Item ID" specified in the format. To change this behavior, provide "true" as the value for the strict parameter. If this is provided, the business rule will update the choice attribute only if the changed attribute value matches the value specified in the mapping.
Parameters
 
Parameter
Description
"Choice Attribute ID"
The ID of the Choice attribute.
"Choice Item ID"
The ID of the Choice Item.
In the basic format, the business rule sets the value of the choice attribute based on the Choice Item ID that is provided.
In the extended format, the source attribute values and the corresponding choice item ID values of the Choice attribute are provided. The "Choice Item ID" is used only when the value of the source attribute is not mapped to a specific choice item ID.
"Trigger on Element Creation"
Set this parameter to "true" to trigger the business rule when an element is created. Set this parameter to "false" to trigger the business rule during attribute change.
"strict"
Optional. Specify "true/false" as the parameter value. Defaults to "false" if this parameter is not provided. If the value "true" is provided, the business rule will update the choice attribute only if the changed attribute value matches the value specified in the mapping. If the value is "false", the choice attribute is updated to the default value even if the matching pattern is not met.
"Corresponding Choice Item ID1_Source Attribute Value 1" (and 2)
In the extended format, provide choice item ID of values in the Choice attribute that has to be set based on the value of the source attribute. Use "_" to indicate the mapping between the source attribute value and the corresponding choice item ID value in the choice attribute.
Note: If the source attribute is a choice attribute, then you must provide the ID of the choice item as its value and not its display text. In this case, the parameter takes the form:
“Corresponding Choice Item ID1_Source Choice Item ID1”
'Source Attribute Name'
The name of one or more attributes that the business rule listens to. Use commas to specify more than one source attribute parameter; for example:
'Source Attribute Name1','Source Attribute Name2'
Go up to
Business rules definitions