Customizing Workplace Search Options

This is an administrator-level activity.

Workplace provides the capability to customize the search option checkboxes in the Simple Search page. The following graphic shows the default checkboxes.

default search options

Each checkbox represents one condition added to the "where" clause in the SQL statement. The checkboxes that appear in the UI are defined in <AE_install_path>/FileNet/Config/AE/SimpleSearch.xml file. As shown in the XML snippet, each checkbox is described in a searchOption object element.

<object key="searchOptionGroup">
  <label key="label" localizationKey="server.SimpleSearch_xml.useTheseSearchOptions">
    <resource>Use these search options:</resource>
  </label>
  <list key="searchOptions">
    <object key="searchOption">
      <label key="label" localizationKey="server.SimpleSearch.createdByMe">
        <resource>Created by me</resource>
      </label>
      <setting key="symname">Creator</setting>
      <setting key="value">{CURRENT_USER}</setting>
      <setting key="type">typestring</setting>
      <setting key="operator">eq</setting>
      <setting key="join">and</setting>
      <array key="objectTypes">
        <value>document</value>
        <value>folder</value>
        <value>customobject</value>
      </array>
      <array key="objectStores"></array>
      <array key="roles"></array>
    </object>

...

NOTES  

The following table describes the elements in SimpleSearch.xml. An element is identified by its key attribute. Unless otherwise specified, an element is required.

Setting Value
<object key="searchOptionGroup">
  <label key="label"
    localizationKey=
      "server.SimpleSearch_xml.useTheseSearchOptions">
    <resource>
      Use these search options:
    </resource>
    <resource locale="fr_FR">
      employez ces options pour faire une recherche:
    </resource>
  </label>
The searchOptionGroup object element is for organizing search options into logical groups. You can have one or multiple groups. Each searchOptionGroup object element in the XML appears as a set of checkboxes in the UI, where the first searchOptionGroup object element corresponds with the first set of checkboxes, the second searchOptionGroup object element corresponds with the second set of checkboxes and so on. In the above screenshot, two checkbox groups are shown.

Based on the client locales passed in requests, Workplace retrieves UI strings from resource bundles. The label element defines the introductory string to a set of checkboxes, and serves as an override to the UI strings set in the property resource bundles. The resource subelements specify the override values. If your Workplace application is supporting clients of various locales, you can have one or more resource subelements with a locale attribute. The value of this attribute should use the standard ISO language and country codes as supported by browsers.

The label element requires a localizationKey attribute. Workplace uses this attribute to look up the UI string in a resource bundle, should one not be specified in the XML.

If Workplace cannot find the localized string in the XML or resource bundle, it will fall back to the value of the resource element (that does not include a locale attribute). This element is required.

For a detailed description of the resource lookup logic, see Lookup Precedence for Locale Resources.

<object key="searchOption">
  <label key="label"
    localizationKey=
      "server.SimpleSearch.createdByMe">
    <resource>
      Created by me
    </resource>
  </label>
When used in a searchOption object element, the label element identifies a search option in the UI. As described for the previous element in this table, the label element supports localized strings. The "localizationKey" attribute is required.
<setting key="symname">
  Creator
</setting>
Symbolic name (programmatic identifier) of the property. You can get the symbolic names of properties with Enterprise Manager. See Concepts: Enterprise Manager for more information.
<setting key="value">
  {CURRENT_USER}
</setting>
Value of the property specified by the symbolic name. Where applicable, the following macros are supported:
  • {CURRENT_USER}Short version name of the currently logged in user.
  • {DATE}[ + | - ][days] – Current date +/- the number of days specified. For example, "{DATE}-7" means the current day minus 7 days. No spaces are allowed.
<setting key="type">
  typestring
</setting>
One of the following property types: "typestring", "typeboolean" and "typedate". You can get a property's required data type with Enterprise Manager. See Concepts: Enterprise Manager for more information.
<setting key="operator">
  eq
</setting>
SQL relational operator. The valid values are as follows: eq, lt, gt, lte, gte, neq, in, isnull, isnotnull, like.
<setting key="join">
  and
</setting>
The type of join operation with other search options. In the out-of-the-box configuration, shown in the above screenshot, this option is set to "or" for MimeTypes, and to "and" for all others. Therefore, the Word, Excel, PDF, and XML search options are "ORed", while all other search options are "ANDed." So a search with the Word and Excel checkboxes selected would return Word and Excel documents. A search with the "Created by me" checkbox selected would return more hits than if both "Created by me" and "Checked out" checkboxes were selected.

<array key="objectTypes">
  <value>document</value>
  <value>folder</value>
  <value>customobject</value>
</array>
List of object types for which this search option is valid. Supported values are "document", folder, "customobject".
<array key="objectStores"></array> List of object stores where this property is valid. The default value is an empty array, which means that the search option is valid for all object stores. Each object store is specified in a value element.
<array key="roles"></array> List of roles that have access to this search option. The default value is an empty array, which means everybody has access. Each role is specified in a value element.