About Automatic Type Ahead

This feature provides type-ahead functionality for by setting the Range Href setting for the field to emxFullSearch.jsp. In addition, a pre-defined type-ahead feature is provided for Type, Person, and Organization fields. The functionality is similar to the Type Ahead options that require a custom JPO, but without requiring developers to write a custom JPO.

The following topics are discussed:

Types of Type Ahead Configurations

Type ahead can be achieved using any of these methods:


If a field is defined with both a custom JPO and advanced search for Type Ahead, then the custom JPO is used.

Advanced Search Used for Type Ahead

Developers can use the advanced search function, emxFullSearch.jsp, to quickly configure a form field or table column for type ahead.

This method of implementing relies on the indexed searching provided by the Advanced Search feature. Only those fields defined in config.xml for indexing can be used for automatic type ahead. When the user starts typing in the field, they get the same initial suggestion list that they would get if they clicked the button and opened the advanced search page. This feature does not work with choosers that do not use Advanced Search.

To implement type ahead using advanced search, you need to provide values as follows:


  • Type Ahead Mapping setting on the field (default = NAME). Can be any field defined in config.xml. If you want the type ahead vaules to map to multiple fields, then include a comma-separated list of fields as the value for the Type Ahead Mapping setting, such as:
    LASTNAME,FIRSTNAME,USERNAME
  • Type Ahead Validate setting on the field (default = false). When the user enters a value, they can type something other than one of the values returned by the type ahead suggestion list. This could result in invalid data being entered. If you change this setting's value to true, then the user must select a value from the suggestion list.
  • emxFramework.FullTextSearch.TypeAhead.Suggestion.Limit property in emxSystem.properties (default = 50). The value for this property limits how many objects will be shown in the suggestion list. If the suggestion list exceeds this value, More... is shown in the table. The user can continue to type characters to narrow down the suggestion list.

If a field has a value defined for Type Ahead Mapping and the TypeAhead Program and Type Ahead Function settings, then the JPO method overrides the mapping to the config.xml file.

If you need to restrict the suggestion list based on the current context, such as restricting task owners to those users who have access to the project the task belongs to, you can pass macros. For example:

emxFullSearch.jsp?field=TYPES=Person:PROJECT_ID=${<setting_name>}&table...

where setting_name is the name of the setting on the form or column. This setting value is a select expression to retrieve the runtime value for the query based on the object Id. See Appendix: Selectables and Appendix: Macros for more details.

If the user could be expected to enter a value that may be in more than one field, you can provide an OR list of fields. For example, when selecting a Person, the user could start typing that Persons' first name, their last name, or perhaps their user name. To configure the field for this type of entry, you can use this format (OR is indicated by the double-pipe symbols):

emxFullSearch.jsp?field=TYPES=Person:LASTNAME=*<enteredtext>*||FIRSTNAME=*<enteredtext>*||USERNAME=*<enteredtext>*

where <enteredtext> is the text the user typed into the field.

These properties in emxSystem.properties file used by the Type Ahead using JPO feature are also used by the automatic Type Ahead feature:


  • emxFramework.TypeAhead
  • emxFramework.TypeAhead.TunProgramCharacterCount
  • emxFramework.TypeAhead.SavedValues.Limit

If you change the values for these properties, both the advanced search and custom JPO type ahead features are affected.

Pre-Defined Type Ahead Choosers

The most commonly searched-for values when filling in dialogs are Person, Organization, and Type. Business Process Services allows a developer to configure type ahead by setting the value for the Range Href setting for the field to one of these values:


  • PERSON_CHOOSER
  • ORGANIZATION_CHOOSER
  • emxTypeChooser.jsp

See Configurable Type Chooser for details on configuring the field to use this chooser. When the user starts typing in the field, they get the same initial suggestion list that they would get if they clicked the button and opened the type chooser dialog. The suggestion list is internationalized based on the user's browser language setting.

The PERSON_CHOOSER href maps to this:

${COMMON_DIR}/emxFullSearch.jsp?field=TYPES=type_Person:STATE=Active&
table=AEFPersonChooserDetails&selecton=single&
submitURL=${COMMON_DIR}/emxPersonChooserSelectProcess.jsp

In addition, the Type Ahead Mapping setting on the field should be set to FIRST_NAME,LAST_NAME,NAME.

The ORGANIZATION_CHOOSER href maps to this:

${COMMON_DIR}/emxFullSearch.jsp?
field=TYPES=type_Organization:STATE=Active&table=AEFOrganizationChooserDetails&
selection=single&submitURL=${COMMON_DIR}/emxOrganizationChooserSelectProcess.jsp

In addition, you must set the value for the Type Ahead Mapping setting on the field to Name.

If the application requires restricting the value for the field more than that defined by the above hrefs, you can also define a value for the Additional Query setting on the field or column using this syntax:

"Additional Query" = <FieldName1>=<select expression1>:<FieldName1>=<select expression2>:

The Field Names used in the expression must be the names of fields configured for indexing in config.xml. See Appendix: Selectables for details on select expressions for the current object.