Configuring Automatic ID Lookup
Configuring Automatic ID Lookup
Activating Automatic ID Lookup
The lookup ID feature is disabled by default. You activate it with these methods:
Application Parameter
To use numeric ID fields, enable ID lookup by setting the activity parameter for the project:
AbSystemAdministration-EnableIdLookup
.
Activity ID |
Parameter Name |
Values |
AbSystemAdministration |
EnableIdLookup |
0
|
If this parameter is not defined in the database, automatic ID lookup is disabled.
System administrators can change this parameter value and use the "Reload All Parameters" action in the System / Archibus Administrator - Application Configuration / Configure Application Parameters view to apply the change. There is no need to restart the application server. Users who are signed in will see the change after reloading their views.
Manage Automatic Lookups view
System administrators can also use the System / Add-In Manager / Manage Automatic Lookups view to enable ID lookup.
Note: The Manage Automatic Lookups view does not reload cached schema. You must restart the application server after adding lookup properties to additional fields.
ID lookup field metadata
To automatically add lookup fields and tables to data sources and panels, designate the field in a table that contains lookup values for the ID field.
- If the ID field is a primary key, the lookup table is the main table.
- If the ID field is a foreign key, the lookup table is the validating table of the foreign key.
- The lookup table may only have one lookup field.
For each lookup field, you can specify these preferences:
How to display ID and/or lookup values
displayType=id|lookup|both|concatenate|translate |
Value |
Description |
concatenate |
Display concatenated ID and Lookup values |
id |
Display only the ID field |
lookup |
Display only the lookup field. This is the default value. |
both |
Display the ID and Lookup fields |
translate |
Display the translated lookup field value in reports. Do not display read-only lookup value below the ID field in forms.
|
How to concatenate ID and lookup values when displayType=concatenate
// displays "02300 - Snow Removal Costs" - this is the default format
|
Placeholder {0} refers to the ID value, {1} refers to the Lookup value.
How to sort records in reports and grids when displayType=concatenate
orderBy=idFirst|lookupFirst
Value |
Description |
idFirst (or not specified) |
Sort by ID values, then by Lookup values. |
lookupFirst |
Sort by Lookup values, then by ID values. |
These preferences are stored in the
afm_flds.attributes
field for all lookup fields in most common lookup tables (bl, em, bu, dv, dp, rmcat, etc.). All XML attributes are optional.
To mark another field as a lookup field, enter the code below in the
afm_flds.attributes
field:
<root>
|
To mark a field as a lookup field, and specify optional lookup preferences:
<root>
|
The database defines lookup preferences for following fields:
Tables |
Field |
dp, dv, bu |
name |
property, bl, site, city, county, state, ctry, regn |
name |
rmtype, rmcat, rmstd, emstd, ac, projecttype |
description |
org |
org_name |
The V.23 database adds these new fields:
Table |
Field |
Heading |
Size |
em |
name |
Employee Name |
96 |
cost_cat |
description |
Cost Category Description |
96 |
cost_class |
description |
Cost Class Description |
96 |
Upgrading the database
If a you changes lookup preferences in
afm_flds.attributes
, and then use the Database Change Wizard to upgrade the database, the Wizard will notify you about new and old value of the attribute. You will have two options:
- Apply Change -- overwrites the old value with the new one,
- Keep Changes-- leaves it untouched.