Dynamic filters

A typecode filter uses categories and category lists at the typecode level to restrict or filter a typelist. Typecode filters use a parent typecode to restrict the available values on the child typecode.

You define a typecode filter directly on a typecode in Guidewire Studio™. In the Typelist editor, you select a specific typecode and set a filter, or category, on that typecode.

There are two types of typecode filters that you can define:

Filter type

Use to

More information

Category

Associate one or more typecodes on a parent typelist with one or more typecodes on a child typelist.

Dynamic filters

Category list

Associate all of the typecodes on a parent typelist with one or more typecodes on a child typelist.

Dynamic filters

Category typecode filters

  • You use a category filter to associate one or more typecodes from one or more typelists with a specific typecode on the filtered typelist.
  • You define a category filter in the Typelist editor by adding a category to a typecode.

Category list typecode filters

  • You use a category list filter to associate all of the typecodes from one or more typelists with a specific typecode on the filtered typelist.
  • You define a category list filter in the Typelists editor by adding a category list to a typecode.
This topic includes the following:

Creating a dynamic filter

In general, to create a dynamic filter, you need to do the following:

As the process of declaring a typecode filter on an entity can be difficult to understand conceptually, it is simplest to proceed with an example. Within Guidewire PolicyCenter, a user with administrative privileges can define a new activity pattern (Administration > Business Settings > Activity PatternsNew Activity Pattern). Within the New Activity Pattern screen, you see the following drop-down lists:

  • Type
  • Category

PolicyCenter automatically sets the default value of Type to General. This value determines the available choices that you see in the Category drop-down list. For example:

  • Correspondence
  • General
  • Interview
  • New mail
  • ...

The ActivityCategory typelist is the typelist that controls what you see in the Category field in PolicyCenter. If you open this typelist in the Studio Typelist editor, you can choose each typecode in the list one after another. As you select each typecode in turn, notice that the Studio associates each typecode with a category containing typelist and code values. In this case, Studio associates each ActivityCategory typecode with an ActivityType typecode. Thus, PolicyCenter filters each individual typecode in this typelist so that it is available for selection only if you first select the associated typelist and typecode.

Step 1: Set the category filter on each typecode

The process is the same to create a category list typecode filter. In that case, you associate a single typelist (and all its typecodes) with each individual typecode on the dependent typelist. You make the association by selecting a typecode in the dependent typelist and adding a category.

Open the ActivityCategory typelist and select each typecode in turn. As you do so, you see that Studio associates each typecode with an ActivityType code value as a category. For example, if you select the interview typecode, you see that PolicyCenter associates this typecode with an ActivityType code value of general. You would need to duplicate this process if you create a custom filtered typelist or if you customize an existing typelist. The following graphic illustrates this process.



After completing this task, complete Step 2: Declare the category filter on an entity.

Step 2: Declare the category filter on an entity

Before beginning this task, complete Step 1: Set the category filter on each typecode.

The question then becomes how do you set this behavior on the ActivityPattern entity. In other words, what XML code do you need to add to the ActivityPattern entity to enable the ActivityType typelist to control the values shown in the PolicyCenter Category field? The following sample illustrates what you need to do. You must add a typekey for both the parent (ActivityType) typelist and the dependent child (ActivityCategory) typelist.


Entity editor with typekey added for the relevant typelists.

The sample defines a typekey element with name="Type" and typelist="ActivityType". This is the controlling (parent) typelist. The sample also defines a second typelist (ActivityCategory) with a keyfilter name="Type". It is the typelist referenced by the keyfilter element that controls the behavior of the typelist named in the typekey element. Thus, the value of the ActivityType code controls the associated typecode on the dependent ActivityCategory typelist.

For more information on the <keyfilter> element, see <typekey>.

After completing this task, complete Step 3: Set the PolicyCenter field value in the PCF file.

Step 3: Set the PolicyCenter field value in the PCF file

Before beginning this task, complete Step 2: Declare the category filter on an entity.

After you declare these two typelists on the ActivityCategory entity, you need to link the typelists to the appropriate fields on the PolicyCenter New Activity Pattern screen. To access an entity typelist, you need to use the entity.Typelist syntax. For example, to access the ActivityCategory typelist on the ActivityPattern entity, use ActivityPattern.Category with Category being the name of the typelist.

After completing this task, complete Step 4: Regenerate the Data Dictionary.

Step 4: Regenerate the Data Dictionary

Before beginning this task, complete Step 3: Set the PolicyCenter field value in the PCF file.

Guidewire recommends that you regenerate the PolicyCenter Data Dictionary before proceeding. If you have made any mistakes in the previous steps, regenerating the Data Dictionary helps to identify those mistakes.

In any case, you need to stop and restart the application server before you can view your changes in the PolicyCenter interface. Restarting the application server forces PolicyCenter to upgrade the data model in the application database.