These macros are used to define a local variable of object (local object) or value type.
.set_object ( [scope.] name [,object-ref [,mode]])
The variable is a reference to the object specified using the second argument.
.set_value ( [scope.] name, value [,mode])
The variable value is set to be the translated template value specified as the second argument.
The following parameters are available:
Parameter |
Description |
---|---|
scope |
[optional] Qualifying scope. Type: Simple-template returning an object or a collection scope |
name |
Variable name Type: Simple-template |
object-ref [.set_object only] |
[optional] Describes an object reference. If it is not specified or is an empty string, the variable is a reference to the active object in the current translation scope Type: [scope.]object-scope] |
value [.set_value only] |
Value. Type: Simple template (escape sequences ignored) |
mode |
[optional] Specifies the mode of creation. You can choose between: |
Example:
.set_object(Attribute1, Attributes.First)
Example:
.set_value(FirstAttributeCode, %Attributes.First.Code%)
When specifying a new variable, it is recommended to specify 'new' as third argument to ensure that a new variable is created in the current scope.