Add search support to the ContactManager user interface

Make changes to the ContactManager user interface to support searching for the InterpreterSpecialty field.

About this task

This step is the first in the multi-step process described at Adding the InterpreterSpecialty property to search.

In this step, you make changes that affect only the ContactManager user interface. You add InterpreterSpecialty to ABContactSearchCriteria.etx. Then you add a CriteriaDef element to the ContactManager search-config.xml file to specify where the InterpreterSpecialty column is located.

Procedure

  1. In Guidewire Studio for ContactManager, in the Project window, navigate to configuration > config > Extensions > Entity, and then double-click ABContactSearchCriteria.etx.
  2. In the editor, at the top of the Element hierarchy, click nonPersistentEntity (extension).
  3. Click the drop-down list next to and choose column.

    You use the column element rather than typekey because the data type is varchar and is not a typekey.

  4. To the new column, add the following values that support searches for IntepreterSpecialty.
    Name Value
    name InterpreterSpecialty
    type varchar
    nullok true
    desc Interpreter language specialties
  5. Click the drop-down list next to and choose params.
  6. Enter the following values to specify the size of this varchar column:
    Name Value
    name size
    value 30
  7. In the Project window, navigate to configuration > config > search and double-click search-config.xml to edit the file.
  8. Increment the version attribute in the SearchConfig element at the top of the file.
    In the following example, the original version number was 1 and has been changed to 2.
    <SearchConfig
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="search-config.xsd"
      version="2">
  9. Find the following comment:
    <!-- Specific fields in ABContact subtypes -->
  10. After the last CriteriaDef element in this group, add a new CriteriaDef element for the target entity ABInterpreter that tests IntepreterSpecialty for equality:
    <CriteriaDef entity="ABContactSearchCriteria" targetEntity="ABInterpreter">
      <Criterion property="InterpreterSpecialty" matchType="eq"/>
    </CriteriaDef>

What to do next

Add search support in ContactManager for Guidewire core applications

See also