Create a static filter

About this task

See Working with typelists in Studio.

Procedure

  1. Open Guidewire Studio™.
  2. Define the typecodes for this typelist in the Typelist editor.
  3. In the selector next to Add , click typefilter.
  4. Set the following information for your static filter:

    Attribute

    Description

    name

    The name of the filter. PolicyCenter uses this value to determine if a field uses this filter.

    desc

    Description of the context for which to use this typefilter.

    includeAll

    (Boolean) Typically, you only set this value to true if you use the exclude functionality.

    • true indicates that the typelist view starts with the full list of typecodes. You then use exclusions to narrow down the list.
    • false (the default) instructs PolicyCenter to use values set in the various subpanes to modify the typelist view in the application.
  5. In the selector next to Add , click one of the following:

    Subpane

    Use to

    More information

    Add Categories

    Specify one or more typecodes to include by category within the filtered typelist view.

    Creating a static filter using categories

    Include Into Filter

    Specify one or more typecodes to include within the filtered typelist view.

    Creating a static filter using includes

    Exclude From Filter

    Specify one or more typecodes to exclude from the full list of typecodes for this typelist.

    Creating a static filter using excludes

  6. In the appropriate data model file, add a <typefilter> element to the child <typekey> for this typelist. To be useful, you must declare a static typelist filter (a typefilter) on that entity. Use the following XML syntax:
    <typekey name="FieldName" typelist="Typelist" desc="DescriptionString" typefilter="FilterName"/>

    You must manually add a typelist to an entity definition file. Studio does not do this for you.

    For example:
    • The following code adds an unfiltered YesNo typelist to an entity:
      <typekey desc="Some Yes/No question." name="YesNoUnknown" typelist="YesNo"/>
    • The following code adds a YesNoOnly filtered YesNo typelist to an entity:
      <typekey desc="Some other yes or no question." name="YesNo" nullok="true" typefilter="YesNoOnly"
              typelist="YesNo"/>
  7. (Optional) Regenerate the Data Dictionary and verify that there are no validation errors.
  8. Stop and restart the application server to update the data model.

What to do next

See also