Design Considerations for Form Fields

This section describes some of the decisions you should make before configuring form fields. It lists the options available for different kinds of fields, and lists the parameters and settings to implement the various options.

For descriptions of the parameters and settings referenced in this section, see Parameters for Web Form Objects. For use case examples of the implementing features, see Form Fields.

The following topics are discussed:

Design Questions

How should field values be obtained?

When designing form fields ask yourself these questions when deciding how to obtain values:


  • Can the values be retrieved using a select expression applied to the current business object or relationship?

    If yes, this is the preferred mechanism. Use the Expression and Applies To parameters for the field.

  • Is the value an image file?

    If yes, then use the Field Type=image and Image=FILENAME settings.

  • Can the values be obtained using a JPO?

    If the values cannot be obtained using an expression or image file, then a JPO can be used. Use the Field Type=program or Field Type=programHTMLOutput setting and the program and function settings to specify the program and function names.

Who should have access to the field?

Define the users, groups, and roles who can access the field. Form fields have the same access checks as the other UI components.

Does the field need to be translated?

If so, the labels should be translated in the StringResource.properties file for the application as described in Internationalizing Dynamic UI Components. If the field's value is the name of an administrative object, policy state names, vault name, or ranges for an attribute, use the Admin Type setting.

When the Allow Manual Edit setting is true, the Admin Type is ignored.

How should the field be displayed on a View mode form?


  • Should it be hyperlinked?

    If yes, then enter the URL to call when the field value is clicked in the href parameter. By default, the system passes the object ID for the current object to the called page.


    • Should the hyperlink pass the object ID for an alternate object?

      If yes, use the Alternate OID expression setting to specify the expression that gets the object(s) to pass.

    • Where should the href page be displayed?

      Use the Target Location setting to specify whether the page displays in a popup window, a slide-in frame, or in a specific frame of the current window. Use Popup Modal to control the modality of the popup window.

  • Should it have a type icon next to it?

    If yes and the icon should reflect the current business object's type, use the Show Type Icon=true setting.

    If yes and the icon should reflect the type for an alternate business object, use the Show Alternate Icon=true and Alternate Type expression=EXPRESSION settings.

Should the field be editable?

If yes, add the Editable=true setting or do not specify the setting (it defaults to true). Then see the options listed below for editable fields.

If no, add the Editable=false setting.

If editable, what characteristics should the field have?


  • What type of control should be displayed so users can enter or choose a value?

    Use the Input Type setting to specify the type of control, such as textbox, combobox, radiobuttons, etc. The default is textbox.

  • If the control is a text box, should it have a Browse (...) button that calls a range helper window?

    If yes, use the RangeHref parameter to specify the page to appear in the window. This page can be a common chooser page included with the framework or a custom page. To define the height and width of the window, use the Popup Size setting.

  • Should the editable field be required?

    If yes, add the Required=true setting. The field's label will be red and italic.

  • Should the field values be validated?

    If yes and you want to use standard Javascript validation, use the format setting and specify the type of data, such as date, real, integer, text.

    If yes and you want to use a custom function to validate the data, use the OnChange setting.

  • Is the field value an attribute or basic?

    If yes, use the Field Type=attribute or Field Type=basic setting so the system updates the database according to the type of value.

Entering Field Values Using Type Ahead

The Type Ahead feature stores text values entered in form text fields, then displays the most recent entries the next time that the user enters that field. They can then select from the list rather than needing to type the complete value or use a chooser.

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.

When defining a field, you can:


  • Enable or disable type ahead
  • Override the number of values to save per context user, per field
  • Define a JPO and method to retrieve values from the database (not those previously typed by the user) based on what the user starts typing
  • If a JPO is used, override the number of characters a user must type before the JPO is triggered

The number of values stored for each user per field depends on the value for the emxFramework.TypeAhead.SavedValuesLimit property in the emxSystem.properties file. The default is 10 unique values and can be overridden at the field level using the TypeAhead Saved Values Limit setting. Duplicate values are discarded so that each of the values is unique. The values are stored in the order they are submitted so that the oldest item is removed when the list is full. Although stored in submitted order, the values are displayed in alphabetic order.

Set the emxFrameworkTypeAhead property in the emxSystem.properties file to true to enable Type Ahead for all fields on all forms. You can explicitly disable field settings by using the TypeAhead=false setting. List box, date, and multiline fields are not supported. If the system property is set to false, Type Ahead is disabled even if the field setting enables it.

To avoid conflicts with the browser's built-in auto-complete capability, the JPO must set the HTML autocomplete attribute to false.

Field values are stored in the Revision field of a workspace Cue object in an XML document. The naming format used for the Cue object is emx_form_formname. One cue object stores all values for the relevant fields on the specified form for the context user.

Cues apply to the current context, so a user only sees the values they enter. The cues are created in the inactive state.

Note: Cues are used by the ENOVIA Matrix Navigator and PowerWeb to provide visual signals for specific objects. If a type ahead cue is made active, it will have no affect. See the MQL Guide for complete details about cues.

When the user starts typing or double-clicks in the field, the page pops up the list of stored values. The user can:


  • Continue to type to shorten the list until 1 remains.
  • Use the cursor to click on the needed value.
  • Use the up/down arrow keys to highlight a value, then press Tab or Enter, or click on the value.
  • Press the Escape key to close the popup.

If the user types a value that does not match anything in the list, the popup closes.

If the field uses a JPO:method, the functionality is slightly different. The field pops up the list of recently-entered values as described above. When the user types something that does not match any of those values and exceeds the character count setting, the JPO is triggered to return the list of matching values. This process results in the list first showing several values, the number of values gets shorter as the user types, and then the list may get longer when the JPO method returns matching values.

To implement type ahead functionality, you need to define these settings on the field:


  • TypeAhead=true|false. Enables type ahead. If not provided, automatically set to true. Typically used to disable type ahead for a field.
  • TypeAhead Program. Name of the JPO called to retrieve a list of possible values. This JPO is called after the user types the specified number of characters. A JPO is typically used by fields that are normally populated using choosers.
  • TypeAhead Function. The name of the JPO method used in conjunction with the TypeAhead Program setting.
  • TypeAhead Character Count. Overrides the emxFramework.TypeAhead.RunProgram.CharacterCount system property. This setting may be useful for fields whose values may all contain the same prefix.
  • TypeAhead Saved Values Limit. Overrides the emxFramework.TypeAhead.SavedValuesLimit system property.

You must also create the JPO and method called by the TypeAhead Program and TypeAhead Function settings.

Using Type Ahead in Custom Forms

If you want to implement the Type Ahead feature in a custom form, you can use the framework's tag library.

Use the typeahead:saveFieldValues tag in a processing page to save the field values. Use the typeahead:displayFieldValues tag to show the auto-complete behavior as described in Entering Field Values Using Type Ahead. You must also create the JPO and method that the tag calls. The format for the save tag is:

<emxUtil:saveTypeAheadValues
    context="<%= context %>"
    form="form1"
    field="field1"
    displayFieldValue="<%= tagDisplayValue %>"
    hiddenFieldValue="<%= tagHiddenValue %>"
    count="50"/>
<emxUtil:commitTypeAheadValues context="<%= context %>" />

Replace the italic text with the values for your custom form.The result of the display tag is a javascript array of the field values. It will also generate the javascript code that calls back to the server to execute the JPO if there is one. The format for the display tag is:

<emxUtil:displayTypeAheadValues
    context="<%= context %>"
    form="form1"
    field="field1"
    displayField="field1Display"
    hiddenField="field1"
    program="emxTypeField"
    function="genValues"/>

Units of Measure in Custom Forms

If you want to implement the units of measure (dimension) in a custom form, you can use the framework's tag library. See Units of Measure for Columns for details on using the UOMAttribute tag.