You can create a control that is displayed only when a
related control is set to a specific value.
About this task
The following procedure illustrates how to create a control that is displayed only when a
related control is set to a specific value. The heritage coach in this example is used by new
employees to specify the benefits that they want. If the employee decides to participate in a 401K
plan, the heritage coach displays an input field where the employee can indicate the percentage of
his pay to contribute to the plan. Or, the employee can defer the decision to a later
date.
Procedure
-
Open the service that contains the heritage coach that you want to work with and then click the
Coaches tab.
- Drag a List control from the palette onto the design area.
- In the properties for the control, type
Do you
want to contribute? in the Label text box.
- Click the Presentation option in the properties.
- Under the Manual Data section, click
the Add button.
With the
Add button,
create three Value-Display pairs, one for each list item option as
shown in the following table:
Table 1. Entries for the Value and
Display Text fields
| Value |
Display Text |
| true |
Yes |
| false |
No |
| defer |
Decide at a later date |
- Drag a Text control from the palette onto the design area.
- In the properties for the control, type
401K Contribution
% in the Label text box.
- Click the Visibility option in the properties.
- Select the Override Parent Visibility check
box. Doing so allows you to change the default Visibility properties.
- From the Default Visibility drop-down list, select the Hidden
(no access) for everyone option.
- Click the Depends on Control button.
This creates a new override condition.
- Under the Control Dependent Visibility section,
select the Required (full access) option from
the Visibility drop-down list.
- From the Control list, specify the
coach control the input value of which is to determine if the selected
control is displayed to participants when the service runs. In this
example, the control is the
Do you want to contribute? List
control.
- From the Operator list, select the ==(equals)
operator.
- In the Value text box, type
true.
This is the value that you assigned to the Yes list
option in step 5.
- Drag a Date Selector control from the palette onto the
design area.
- In the properties for the control, type
Date in
the Label text box. Depending on the selection list choice, this can
be the date of contribution or the date until a contribution decision
is deferred.
- Click Visibility, and repeat the steps above to make the
Date Selector dependent on the control
Do you want to contribute?.
- From the Operator list, select the in operator.
- In the Value text box, type
"{'true','defer'}".
These are the values that you assigned to the Yes and Decide
at a later date list options in step 5. The Date Selector
will be displayed if either of these options is selected.
-
Save the heritage coach and then run the service to see how the Input and Date Selector
controls are hidden and then shown according to the visibility rules you have specified.
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15