Asset Name Templates
Posted by Diane Hancock on 30 December 2015 12:51 PM
Asset Name Template
Starting with version 5.2, Adams supports the use of a template to define how an asset name is constructed. In addition, a new asset property call "ShortName" is introduced. The ShortName is also defined by a template.
What Is An Asset Name
An asset name is the label shown for an asset in many places. It is shown above the asset info, in the General Info, and in the File Info. In Digital Workplace, it is also shown under the thumbnail. In Adams Web, the short name is shown under the thumbnail and the asset name is shown in the tooltip (i.e. hold the mouse pointer over the thumbnail to see the tooltip). This is because any name that is too long is truncated and asset names are typically long.
The asset name optionally can be used for the file name when exporting the asset from AdamsWeb.
In Field Paths containing the Asset object, the asset name is the "Name" property and the short name is the "ShortName" property.
Configuring Asset Name and Short Name Templates
To define an asset name and short name template, follow these steps.
A name template is composed of any combination of literal text, tokens and property paths. A sample based on the template entered is shown below the template box. The sample changes as the user types the template and indicates if there are problems with the template such as an unrecognized property path or token. Characters not supported in Windows file names may not be entered for the Full Name template.
Literal text is text that is not interpreted. It is included in the asset name verbatim. Any text not enclosed in angled brackets (i.e. <> ) is considered "literal text". Examples of literal text are:
A token is enclosed in angled brackets (i.e. <>). Tokens are documented in the Report Templates 3.0 KB Article. The following tokens are applicable to asset names:
Property paths or field paths are a way of including properties from the asset. Property Paths are enclosed in angled brackets just as tokens are. Property Paths are documented in the Report Templates 3.0 KB Article and in the Field Paths KB Article. The starting object is an Asset.
Note, for numbers and dates, Microsoft's .NET Framework formatting is supported following the property name (e.g. <AssetNumber:D4> to pad a number with leading zeroes to make it 4 characters long) and for dates (e.g. <DateAcquired:d> to include only the date in 6/9/2015 format).
When a property path resolves to a value that has unsupported characters, those characters are displayed in the asset name but are replaced by underscores when the asset is exported from AdamsWeb and the file is named using the template.
Adams 5.2 introduced the following Asset properties:
A template composed of an incident's unique identifier, the asset's unique number, the submitting agency and personnel who captured it would look as follows:
and would resolve to something such as:
The :D4 following the AssetNumber property name tells Adams to prefix the asset number with zeroes to make it 4 digits long.
The full name template is saved in the configuration table under the key "asset_name_template".
The short name template is saved in the configuration table under the key "asset_short_name_template".
During an upgrade to 5.2, the full name template is initialized based on the current asset name source option as shown in the following table.
The "asset_name_source" configuration database table key is deprecated. Therefore, the entry is deleted during an upgrade to 5.2.