Previous Topic: Create a Policy Xpress Logical Attribute Handler

Next Topic: WorkPoint Workflow Integration

Example: Dependant Drop-Down Boxes

The following process is one way of creating an easy set of a dependant drop-down boxes.

On-screen Attribute Validation

  1. In the Management Console, create two logical attribute handlers using the Policy Xpress class name. Both should contain an item and a list (a total of four attributes, two items and two lists).
  2. Add the four new attributes to a screen.

    Note: The two lists should be hidden (automatically) and the two items should be set as drop-down boxes.

  3. In the first drop-down (the item attribute), set the flag "validate on change". This flag will appear at the bottom of the attribute configuration after setting the type to drop-down.
  4. In Policy Xpress, create a policy which populates the initial values of the first drop-down box.

    This policy is of type Task and runs at (Run at Event) Set Subject. An action in this policy sets values to the list attribute of the first handler. In the example, that would be |StateFirstList|. This policy can also assign an initial value to the item attribute, if a current value is available.

  5. Create a second policy to update the values of the second drop-down box when the first drop-down box changes.

    This policy is of type Attribute and runs at Validation. The value of the first drop-down box is read as a normal attribute of the user, and is taken from the item attribute. In the example, that would be |StateFirst|. An action in this policy sets values to the list attribute of the second handler, based on the result from the first.

When using this screen, the first policy sets optional values to the first drop-down box. When a value is selected, the second policy updates the options in the second drop-down box. You can do various things with the results of the second drop-down box. For example, you can set up a third policy of type Task that runs at Validation (different from attribute validation) and copies the value in the item attribute of the second handler to a physical attribute.


Copyright © 2009 CA. All rights reserved.