AddScenarioNote macro

The AddScenarioNote macro command is executed at scenario. This command is used to determine the Note to be created.

For executing the macro, the value in the Command field must be specified in this format:

AddScenarioNote(Note Type, Priority, Summary, [Detail], [Worksheet Name], [Item Passed], [Location Passed], [Period Passed], [Not Used], [Not Used])
Note: The optional parameters are specified in [ ].

This table lists the parameters used for the AddScenarioNote macro:

Parameter Name Description
Note Type The type of the Note to be created from the enabled note type format = Log.
Priority The priority to be set for the Note. Possible values: High, Medium or Low
Summary The summary text for the Note.
Details The detail text about the Note. If not specified, Note is created without detailed text.
Worksheet Name The name of the Worksheet to be executed which is attached to the Note. If not specified, worksheet is not included in the Note.
Item Passed The item selection passed to the Worksheet. This can be a single element [element1] or a set of elements {[element1][element2]}. The element set supports MDX definition. If not specified, the default worksheet definition is used.
Note: This parameter is not required when Worksheet Name is specified.
Location Passed The location selection passed to the Worksheet. This can be a single element [element1] or a set of elements {[element1][element2]}. The element set supports MDX definition.
Note: This parameter is not required when Worksheet Name is specified.
Period Passed The period selection passed to the Worksheet. This can be a single element [element1] or a set of elements {[element1][element2]}. The element set supports MDX definition.
Note: This parameter is not required when Worksheet Name is specified.

This table lists examples of AddScenarioNote macro:

Requirement Syntax
Add an Overview log note type with priority = Low AddScenarioNote("Overview","Low","Finished Sales Consensus","Spoke to John, He’s finished consensus with the sales team".

AddScenarioNote("Overview","Medium","Finished Supply Consensus","Spoke to Jill, She’s finished consensus with the production team","","","","","","").

Execute Forecast Accuracy Analysis worksheet with default item, location and period selection from worksheet definition to a log note of priority = Low. AddScenarioNote("Playbook","Low","The months accuracy report","","Forecast Accuracy Analysis","","","","","").

On successful validation and execution of the macro, the specified note is added to the Cycle Period-Scenario from where the macro is executed.

Validation is performed when you execute the macro. If any of the validation fails, the macro is aborted, and the related error message is displayed.

This table lists the Scenario Macro commands as compared to the Cycle Period/Scenario Status and validation messages.
Cycle Period Status Scenario Status Can Execute? Validation Message
Pending N/A No Cannot run macro {0} because Cycle Period has status "Pending"
Running, Aborted, Completed N/A Yes N/A
Paused, Archived N/A Yes, if no worksheet capture included, else No Cannot run macro {0} because Cycle Period has status {1}

This table describes the error message displayed during the macro execution:

Validation Condition Error Message
Ensure the note type corresponds to one of the enabled log note types.

Note Type {0} cannot be found.

Note Type {0} is not enabled.

Note Type {0} is not of the correct format. Only Notes of Format=log are supported.

Ensure the priority corresponds to an expected value. invalid parameter value {0}. Priority must be "High", "Medium" or "Low".
If specified, ensure the worksheet can be executed based on the macro context.

worksheet {0} cannot be found.

worksheet {0} is not enabled for module {1}.

worksheet {0} is not authorized for user {1}.

A worksheet screen capture is included only for Standard worksheets. Worksheet must be of Type = Standard and Report Source = Embedded.
If specified, ensure the item, location and period nodes are valid.

item {0} cannot be found.

location {0} cannot be found.

period {0} cannot be found.