Creating macros
To create a macro:
- Select Configuration > Cycles > Macros to display a list of macros.
- Click New.
-
Specify this information:
- Name
- The unique identifier of the macro in .Note: You cannot modify the name after the macro is created.
- Display Name
- The name to be displayed in the application.
- Users
-
The name of the users who can access the macro.
- Roles
-
The defined role of the user(s) who can access the macro.Note: At least one user or role must be assigned to a macro. For a new macro, the current user id ID is defaulted.
- System
- Indicates, if the macro is system defined or user
defined.Note: If this option is set to On, the macro is system defined and cannot be edited by the user.
- Tags
- The tag linked to a macro. Select from a list of pre-defined tags displayed in the Tags window. You can link one or more tags to a macro. This option is used to group common elements, which can be linked to entities such as measures or worksheets.
- Type
- The type of the macro. Possible values:
-
Cycle Period: A macro that can be used at cycle period level,
which interprets the data for the current cycle and cycle period.
Note: You can execute this macro using the Execute Macro option on the worksheet toolbar or the Scenario Details option in the module. This allows you to call the macro commands (
AddCyclePeriodNote
,CreateScenario
,CopyScenario
, andRunScenarioMacro
) for the cycle period. - Scenario: A macro that can be used within the context of the current scenario.
-
System: A macro that can be executed without defining a cycle period or
scenario context. However, if the cycle period or scenario is
required, the same is specified in the commands for the steps of the
macro. For example, Complete Cycle Period (W). Note:
- Cycle Period and System macros can be executed from the Worksheet toolbar, Scenario details and the Cycle Period page.
- Scenario macros can be executed from the Worksheet toolbar and the Scenario details page.
- The steps for macro are executed based on the availability of the associated cycle period, scenario, or background processes (such as the setup checker), and the time out parameter defined in the related commands.
- Each macro step is linked to a unique transaction, so the completed steps are always committed.
-
Cycle Period: A macro that can be used at cycle period level,
which interprets the data for the current cycle and cycle period.
- Module
- The module for which the macro is defined.
Note: This option is enabled only for macros of the type Scenario.
- Click '+' in the Steps section to create a new command for the macro. The Steps section contains a list of commands defined for the macro.
-
Specify the information in the Step
window:
- Command Type
- The type of the command. The available command list is based on the macro Type specified.
- Command Parameter
- The value of this field is based on the specified Command Type and is a visual representation of the required parameters.
- Command
- The command syntax executed by this step. Each command consists of
a function and multiple parameters which indicates the correct syntax for
the specified Command
Type.Note: The optional parameters are indicated by [] and all other parameters must be populated accordingly in the Command field.
- Description
- An optional description for the step.
- Condition
- A condition that controls the execution of macro steps. The
condition can contain application variables that are evaluated based on the
level (System/Cycle) at which the macro is executed.Note:
- If this value is not specified, the macro step is executed.
- The macro command must support the basic logic operators such as ‘=’, ‘AND’, ‘OR’, ‘(‘, ‘)’.
- Click Add. A new command is added to the list in the Steps section.
-
Click Move
Up and Move
Down arrow to change the order of the commands.
Note: For a system defined macro, the step list cannot be modified.
- Click Save. A new macro is created.