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
- In Guidewire Studio for ContactManager, in the Project window, navigate to , and then double-click ABContactSearchCriteria.etx.
- In the editor, at the top of the Element hierarchy, click nonPersistentEntity (extension).
-
Click the drop-down list next to
and choose column.
You use the column element rather than typekey because the data type is
varcharand is not a typekey. -
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 -
Click the drop-down list next to
and choose params.
-
Enter the following values to specify
the size of this
varcharcolumn:Name Value name size value 30 - In the Project window, navigate to and double-click search-config.xml to edit the file.
-
Increment the
versionattribute in theSearchConfigelement at the top of the file.In the following example, the original version number was1and has been changed to2.<SearchConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="search-config.xsd" version="2"> -
Find the following comment:
<!-- Specific fields in ABContact subtypes --> -
After the last
CriteriaDefelement in this group, add a newCriteriaDefelement 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
- For a complete description of search-config.xml, see Configuring database search criteria in XML.
