You can decide which attributes to make visible in a form based on the values of other
attributes in that form. For example, if the user selects United States in the country attribute,
you can make visible its dependent State attribute. You can also make attribute groups visible based
on values of other attributes in a form.
About this task
You can build rules on single-select and single-select from database attributes only. When you
select the option value from the drop-down that triggers the rule, another attribute or attribute
group becomes visible.
Procedure
-
Open or edit a form.
-
Add attributes and attribute groups to the form as needed.
If you want to build a rule to make State visible when users select United States as the
Country, you must create attributes for Country and State.
-
Click Create/Edit Form Attribute Rules.
The Rule Builder opens with existing rules and an area to create new rules.
-
Create or edit rules as needed by following these steps:
-
In the Select an Attribute lisbox, select the attribute that triggers
the rule. Then, in the next listbox, select the In or Not
In option to indicate whether the rule is triggered by the selected attribute value or
attribute values that are not selected. In the third listbox, select the attribute value for the
rule. For example, to trigger the rule when United States is selected as the Country, select Country
in the Select an Attribute listbox, the In option, and
United States as the attribute value.
-
In the Attributes and Attribute Groups box, select the attribute or
attribute group that you want to make visible and use the right arrow button
to move the selected attribute or attribute groups to the Selected Attributes and
Attribute Groups box. For example, to make the State attribute visible when United
States is selected, move the States attribute to the Selected Attributes and Attribute
Groups box.
When you select an attribute group, the attribute group header and all its attributes are added
to the Selected Attributes and Attribute Groups box.
-
Click Save Compound Condition to save the rule. The rule is displayed in
the Condition tab at the top of the screen. The Preview
tab shows the rule's code.
-
Repeat steps a through c for each rule that you want to add to the form. Use the
Up and Down arrows to specify the sequence for
executing the rules.
-
Click Accept and Close after you create, edit, and delete attribute
rules.
-
Save the form.
What to do next
When you add rules to forms, be careful not to make conflicting or circular rules.
If you edit rules on a form that is already published, you must publish the form again to use the
modified rule.
When you change or delete attributes or attribute groups, Unica Plan warns you if that the attribute or
attribute group is used in a rule. If you delete the attribute or attribute group anyway, the
attribute or attribute group is removed from the rules. If a rule is invalid, it is flagged in the
rule builder for your attention.
All attributes and attribute groups that you do not build rules for are by default made visible
and are shown.