Using Automatic ID Lookup for Translatable Fields

You may want to display localized fields, such as Program Type, Project Type and Activity Type, in all forms and reports.

Without automatic ID lookup, when Web Central loads a view where the data source contains a translatable field, such as projecttype.project_type or programtype.program_type , the view displays the proper language field for project_type or program_type , based on the current user locale. However, when the data source contains a foreign key to a translatable primary key field (e.g. project.project_type or program.program_type ), the view does not display the proper language field from the foreign table; it displays the exact value in project.project_type or program.program_type . For example, when you look at a report of the program table, you want to see a localized value in the program.program_type field, the same as if you were looking at a report of the programtype table.

You can solve this problem and display localized foreign key fields using the Automatic ID Lookup feature. While this is an optional feature that is by default turned off, localized foreign key values can be displayed by default. To do so:

  1. Enable Automatic ID Lookup globally.
  2. Enable lookup for foreign key fields that reference most common lookup tables (bl, em, bu, dv, dp, rmcat, etc.). For each field, set displayType="translate" .
  3. Add and enable translatable fields for primary keys in these tables, if they are not yet enabled (e.g. projecttype.project_type ).

For reporting panels (grids, charts, cross-tables, column reports, export, paginated reports), if the panel contains a foreign key field to a table that has a primary key lookup field, and that primary key field is not visible, the panel:

  • Makes the foreign key field hidden.
  • Adds the primary key lookup field to the list of visible fields in the same position as the foreign key field.
  • Sets the title of the primary key lookup field to be the same as the title of the foreign key field.
  • Allows users to filter and sort records by localized values, not by ID values.

Cross-table panels:

  • Group records by primary key field because values are guaranteed to be unique.
  • Add the primary key lookup field to the list of groupBy fields.

Chart panels:

  • Group records by primary key field because values are guaranteed to be unique.
  • Change grouping axes from foreign key field to the primary key lookup field.