Filtering Field Elements
Field elements can be filtered by using the Filter icon .
The filter icon displays when a Filters element is defined in the Workspace Definition File (wdf.xml). Clicking the Filter icon displays the list of filters. Fields containing a SearchTag matching the selected filter are displayed. Fields that do not contain search tags or whose SearchTag value does not match the Filter selection are not displayed.
SearchTags are defined for individual fields in the Workspace Definition file. SearchTags can also be assigned to new fields created in the Word Add-In or when editing fields created in the Word Add-In. Assigning a SearchTag to a field is optional; they are only used to filter fields.
Search Tags
A search tag is a field object property that is used to filter or categorize related fields. Users can more easily identify and select the desired fields when looking at a smaller, more focused list of fields instead of having to scroll through or search through all fields.
The field node definition under the <CommonFields>
group in the Workspace Definition file will recognize the new child node <SearchTags>
. SearchTags are assigned to individual fields. A field may have none, one or multiple (comma-separated) search tags which are specified in a single text string.
For example:
Field with no SearchTag -
<Field Name="Policy Effective Date">
<Type>Alphanumeric</Type>
<Length>10</Length>
<Required>false</Required>
<NoUserEdit>false</NoUserEdit>
<Locale />
<Scope>Section</Scope>
</Field>
Field with one SearchTag -
<Field Name="VIN">
<Type>Alphanumeric</Type>
<Length>10</Length>
<Required>false</Required>
<NoUserEdit>false</NoUserEdit>
<Locale />
<Scope>Section</Scope>
<SearchTags>Automobile</SearchTags>
</Field>
Field with multiple SearchTags -
<Field Name="Business Type">
<Type>Alphanumeric</Type>
<Length>10</Length>
<Required>false</Required>
<NoUserEdit>false</NoUserEdit>
<Locale />
<Scope>Section</Scope>
<SearchTags>Automobile, Property</SearchTags>
</Field>
Keep in mind:
- Search tags provide a way to filter the field list in Documaker Add-In for Microsoft Word. They are not required so unless you want to filter your field list, you do not need to define SearchTags or Filters in your Workspace Definition file
- Search tags are case-insensitive; a filter of “Auto” or “auto” will match the SearchTag “Auto”
- Leading and trailing spaces are removed from search tags. For example
<SearchTags> Auto , Life , Home </SearchTags>
defines three SearchTags: Auto, Life and Home without leading or trailing spaces - Comma in SearchTag identifies a SearchTag separator. For example
<SearchTag> Personal, Umbrella </SearchTag>
will be treated as 2 search tags – Personal and Umbrella - Search Tags are optional. You are not required to add SearchTag element to Fields in the Workspace Definition File
If you do elect to use SearchTags, they can be added to fields in your Workspace Definition file using an XML editor.
The New and Edit Field dialogs in the Word Add-In include the Search Tag setting. Search Tags can be optionally assigned when creating a new field or editing an existing field in the Word Add-In.
Filters Element
In addition to SearchTags, a Filters Element must also be defined in the Workspace Definiton file in order to Filter fields. The Filters element is a list of the Search Tags assigned to fields in the Workspace Definition File.
For example, the Workspace Definition file contains these fields and their respective SearchTags:
<CommonFields>
<Field Name="VIN">
<Type>Alphanumeric</Type>
<Length>10</Length>
<Required>false</Required>
<NoUserEdit>false</NoUserEdit>
<Locale />
<Scope>Section</Scope>
<SearchTags>Automobile</SearchTags>
</Field>
<Field Name="Business Type">
<Type>Alphanumeric</Type>
<Length>10</Length>
<Required>false</Required>
<NoUserEdit>false</NoUserEdit>
<Locale />
<Scope>Section</Scope>
<SearchTags>Automobile, Property</SearchTags>
</Field>
<Field Name="Personal Umbrella Limit">
<Type>Alphanumeric</Type>
<Length>10</Length>
<Required>false</Required>
<NoUserEdit>false</NoUserEdit>
<Locale />
<Scope>Section</Scope>
<SearchTags>Umbrella</SearchTags>
</Field>
</CommonFields>
The Filters element would include those same Search Tags:
<Filters>
<Tag>Automobile</Tag>
<Tag>Home</Tag>
<Tag>Life</Tag>
<Tag>Property</Tag>
<Tag>Umbrella</Tag>
</Filters>
Keep in mind:
- The
<Filters>
element can be defined before or after the list of fields in the<CommonFields>
node - The
<Filters>
element must be defined within the<CommonFields>
element - The Filter list in the Documaker Add-In for Microsoft Word will display the provided Filters list as is. The Documaker Add-In for Microsoft Word does not validate the Filters list and will not check for or correct misspelled words, redundant tags, missing tags, etc
- If the
<Filters>
element is missing from the Workspace Definition File, the Filter icon will not display - If the
<Filters>
element is defined outside the<CommonFields>
note, the Filter icon will not display
Filter icon and list
Clicking on the Filter icon will display a list of the Filters defined in the Workspace Definition file. The filters list also includes Select All and Inverse selections.
Option |
Description |
---|---|
Select All |
Selects all of the items from the Filter list |
Inverse |
Selects all fields that are not selected by the current filter |
Specific Filter |
Fields containing a Search Tag that matches the selected Filter are displayed. Fields that do not have a Search Tag that matches the selected Filter are excluded from display. <Field Name="Last Name"> |
Keep in mind:
- If you select more multiple items from the Filter list, the field must contain all of the selected Filter items for it to be displayed