These macros convert the object name to its code (or vice versa).
Use the following syntax to convert a name to a code:
.convert_name (expression[,"separator"[,"separator_pattern"],case])
Use the following syntax to convert a code to a name:
.convert_code (expression[,"separator"[,"separator_pattern"]])
The following parameters are available:
Parameter |
Description |
---|---|
expression |
Specifies the text to be converted. For .convert_name, this is generally the %Name% variable and may include a suffix or prefix. Type: Simple template |
separator |
[optional] Character generated each time a separator declared in pattern-separator is found in the code. For example, "_" (underscore). Type: Text |
pattern-separator |
[optional] Declaration of the different separators likely to exist in a code, and which will be replaced by separator. You can declare several separators, for example "_ " and "-" Type: Text |
case |
[optional for .convert_name only] Specifies the case into which to convert the code. You can choose between:
|
In the following example, the .convert_name macro is added from the Profile\Column folder in a new Generated Files entry:
.foreach_item(Columns) %Name%, .foreach_part(%Name%) .convert_name(%CurrentPart%) .next("_") .next(\n)