Object: Title Generator
The title of objects is used to provide a short description of the functionality of objects. In newer versions of the Automation Engine the title of objects becomes more important as it is used in several situations in the AWI instead of the object name. To provide an automatically generated title for objects thsi module can be used. It can generate titles based on several object attributes.
Designation
- Name
- mc.TitleGenerate
- Aliases
- ObjectTitleGenerate
Configuration
- Optionen
- Test mode (
test-mode
) - Activates a simulation mode
- Title pattern (
title-pattern
) - Defines a pattern used to generate the new title
Description
The generator is configured via b4A Expressions (Details). Such a sequence can look like this, for example:
%(object_name)
%(object_name/[^.]+\.(.*)/$1/;/_/ /;/\./ /)
The following attributes can be integrated into the title:
- object_name: Name of the object
- object_type: Type of the object
- folder: Folder of the object
- object_title: old title of the object
The examples above show the simplest variant, in which only the value of the attribute is inserted into the title. The second example shows the replacement of the following regular expressions, which are applied to the value of the attribute before the replacement. A replacement rule has the following format:
/<string to be searched for>/\<replacement string>/
If several regular expressions are to be applied to the value, a list of replacement rules can be specified with the separator semicolon (;). In the example, three replacement rules are applied:
/[^.]+\.(.*)/$1/
- removes the text before the first dot
/_/ /
- replaces underscores with spaces
/\./ /
- replaces periods with spaces
Example:
The object name PCK.BEST4AUTOMIC_BASE.JOBI.SETTINGS
becomes BEST4AUTOMIC BASE JOBI SETTINGS
.