CopyScenarioNote macro
For executing the macro, the value for the Command field must be specified in this format:
CopyScenarioNote([Source Cycle Period],[Source Scenario],[Note Type])
- Source Cycle Period
- If Source Cycle Period is not defined, use the last published cycle period.
- Source Scenario
- If Source Scenario is not defined, use the published scenario for this module.
- Note Type
- If Note Type is defined, copy all the notes (Format=Log) for this cycle period-scenario.
On macro execution, the specified note(s) from the source Cycle Period-Scenario are copied to the destination Cycle Period-Scenario. The destination is the Cycle Period-Scenario from where the macro is executed. The Note is copied as follows:
- The values for Cycle Period and Scenario are updated with the new destination information. The values for Cycle and Module are same as the source.
- The fields such as Summary, Note Type, Date, Priority, Format, Item, Period, Location, Include in playback and Details retain the source note information. These fields are updated with the string value and no validation is performed.
- The user is updated with the string value and no validation is performed for the user.
- The Note is copied only if:
- The Note Type exists in the destination cycle period.
- The period exists on the destination cycle period horizon.
- The source cycle and module must match the destination cycle and module. Else, a validation message is displayed to indicate the end user that the Cycle or the Module cannot be found.
- The Notes with Format ‘Log’ are only supported.
This table lists examples of the CopyScenarioNote macro:
Requirement | Syntax |
---|---|
Copy all scenario notes (where Note Type=Log) from Demand-Plus Baseline scenario for cycle period FY19 M08. | CopyScenarioNote("FY19 M08","Demand-Plus Baseline","") |
Copy Action Plan notes from the published scenario for cycle period FY19 M08. | CopyScenarioNote("FY19 M08","","Action Plan") |
Copy Action Plan notes from the published scenario for previous published cycle period | CopyScenarioNote("","","Action Plan”) |
Validations are performed when you execute the macro. If any of the validation fails, the macro execution is aborted and the related error message is displayed.
This table lists the Scenario Macro commands as compared to Cycle Period/Scenario Status and validation messages:
Cycle Period Status | Scenario Status | Can Execute? | Validation Message |
---|---|---|---|
Pending | N/A | No | N/A. The option is disabled |
Running | WIP | Yes | N/A |
Paused | Any | No | N/A. The option is disabled |
Aborted | Stopped | Yes | N/A |
Archived | Any | No | N/A. The option is disabled. |
This table lists the error message displayed during the macro execution:
Validation | Error Message |
---|---|
Note | Note {0} cannot be found. |
Period | Period {1} cannot be found. |
Note Format | Note {0} is not of the correct format. Only Notes of Format=log are supported. |