Process to format search results

You can format the Search Result tab by modifying the search view lookup. Formatting options include:
  • Associate a DB column with an enumeration code or enumeration query so that enumeration labels (not values) are displayed. If color coding is defined for the list value, the search column displays the same color format.
  • Provide a format code to enable formatting numeric columns.
  • Assign a DB column type of Boolean. A check box is displayed instead of numeric values such as zero (0) or one (1) values.

A drilldown button is displayed on the Lookup grid for all view search lookups (V\SEARCH<symbol>). To add formatting, click the drilldown button corresponding to the Lookup Code and use the grid to add formatting rows. The DB Name column must match the column name for the lookup query. If an alias is used for the column name, the specified alias must be used as the DB Name.

Example:

Example

Query:

SELECT IT.ITEM_CODE, [%%DBO]FSDESC('FSITEM', IT.ITEM_CODE, [%LANGUAGE], IT.DESCRIPTION) AS DESCRIPTION, IT.GROUP_CODE, IT.CLASS, IT.ALIAS_CODE1, IT.STATUS_IND AS STATUS, IT.THRESHOLD FROM FSITEM IT JOIN [%%SEARCHTABLE] T ON (IT.ITEM_CODE = T.ITEM_CODE) ORDER BY IT.ITEM_CODE

Lookup Format Values

Table 1.
DB Name Data Type Enum Ind Enum code Enum Query Format Code
CLASS String enum val list C_ITEMCLASS
THRESHOLD Double 0.0##
STATUS STATUS enum query STATUSITEM

Adding the format rows can affect these search results:

  • The class column uses the (translated) enumeration label without the need to join to the FSVALIDENUMLABELCF table. Also, if colors are defined for the enum item class, these colors are displayed in the class column.
  • The threshold column results can be formatted using 0.0##.
  • The status column uses the (translated) status label without the need to join to the FSSTATUSLANG table. Also, if colors are defined for the statuses, these colors are displayed in the status column.
    Note: The DB Name for status is specified as STATUS instead of STATUS_IND as STATUS is used as an alias for STATUS_IND in the query.