DeleteMIEvent macro

The DeleteMIEvent macro deletes the MI Events and clears the data from a specified measure in a scenario or all MI measures.

The data for all dimensions or optionally for specific item, location, period or specified tag can also be cleared. This macro is executed at a scenario level.

This table describes the parameters used in the macro.
Parameter Name Description
Measure code The measure code for which the data is deleted.
Note: 
  • You must specify the value only for Measure Code or Tag.
  • If not specified, all MI measures are considered.
Item Hierarchy Node The items that are considered to clear the MI Events.
Note: 
  • All children entities of the passed node at the level is considered to store scenario values.
  • If not specified, all items are considered.
Location Hierarchy Node The locations that are considered to clear the MI Events
Note: 
  • All children entities of the passed node at the level is considered to store scenario values.
  • If not specified, all locations are considered.
Period Labe The cycle periods that are considered to clear the MI Events.
Note: 
  • All children entities of the passed node at the level is considered to store scenario values.
  • If not specified, the horizon for the cycle period including pconst is considered.
  • Rolling period nodes are also supported
Tag If specified, the MI Events of the MI Measure with this tag are deleted.
Note: 
  • You must specify the value only for Measure Code or Tag.
  • If not specified, this parameter is not considered.
Reference If specified, the MI Events with this reference are deleted.
Note: If not specified, this parameter is not considered.
Filter The filter criteria that is applicable for the selected item and location at the specified Item and Location hierarchy level.
Note: 
  • The item@location that pass the criteria, for the specified Period label, are used in the forecast generation.
  • If not specified, filter criteria is not applied.
For executing the macro, the value of the Command field must be specified in this format:DeleteMIEvent([Measure Code], [Item Hierarchy Node], [Location Hierarchy Node], [Period label], [Tag], [Reference])
Note: The optional Parameters are specified in [ ].

On macro execution, the MI Event is deleted for the specified measure in a scenario. The MI Events with status Pending or Pending Delete where the user is not a part of the share for the editable scenario, are excluded from the delete process.

This table describes the status of Events at the currently selected Scenario which can be deleted.
Status Editable Currently selected Scenario (user part of share) Editable Currently selected Scenario (user is not part of share) Read only Currently selected Scenario
Pending Deleted Not Deleted N/A
Approved Deleted Deleted Deleted
Pending Delete Deleted Not Deleted N/A
Rejected (Future Implementation) Deleted Deleted Deleted
Table 1. Example
Requirement Parameters
Deletes all MI Events (including the notes linked to the Events) and clears all MI measures for all items at all locations for all periods of the cycle period horizon. DeleteMIEvent("","","","","","","")
Deletes all MI Events created against the DPLS_MI measure, clears the DPLS_MI of data and deletes any notes created against the MI Events for all items at all locations for all periods of the cycle period horizon. DeleteMIEvent("DPLS_MI","","","","","","")
Deletes all MI Events (including the notes linked to the Events) and clears all MI measures for Events created at GOO items (and the events created at items below GOO) at all locations for the cycle period horizon. DeleteMIEvent("","GOO","","","","","")
Deletes all MI Events (including the notes linked to the Events) and clears all MI measures of the Events created for All Items at location "All DCs" (and the events created at locations below All DCs) for the cycle period horizon. DeleteMIEvent("","","All DCs","","","","")

Deletes all MI Events (including the notes linked to the Events) and clears all MI measures for all items at all locations and for the duration of the calendar period ‘FY 10’ (Events starting and Ending within the calendar period ‘FY 10’).

The Events that are beginning and ending within the calendar period ‘FY 10’ are removed.

DeleteMIEvent("","","","FY 10","","","")

Deletes all MI Events which have a Reference ‘Easter MI’ and created against the DPLS_MI measure, clears the DPLS_MI of data and deletes the notes created against the Events for GOO items (including the events created at items below GOO) at location ‘US’ (including the events created at locations below US) for the duration of the calendar period ‘Current Year’.

The Events that are starting and Ending within the calendar period ‘Current Year’).

DeleteMIEvent("DPLS_MI","GOO","US","Current Year","","Easter MI","")

Deletes all MI Events which have a Reference ‘Easter MI’ and created against the Measures that are tagged as DPLS_AdvanceForecasting, clears the measures of data and deletes the notes created against those Events for GOO items (including the events created at items below GOO) at location ‘US’ (including the events created at locations below US) for the duration of the calendar period ‘Current Year’.

Events that are starting and Ending within the calendar period ‘Current Year’.

DeleteMIEvent("","GOO","US","Current Year","DPLS_AdvanceForecasting","Easter MI","")
Deletes all MI Events which have a Reference ‘Easter MI’ created against any measures which are tagged as DPLS_AdvanceForecasting, clears the measures of data and deletes the notes created against the Events for all item/location combinations where DPLS_HUNITS > 0. DeleteMIEvent("","","","","DPLS_AdvanceForecasting","Easter MI", "[DPLS_HUNITS] > 0")

Validations are 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 describes 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 WIP Yes N/A
Paused Any No Cannot run macro {0} because Cycle Period is not running.
Aborted Stopped Yes Cannot run macro {0} because Cycle Period has status ‘Aborted’
Archived Any Yes, if no worksheet capture is included; else No Cannot run macro {0} because Cycle Period has status 'Archived'
Completed Any Yes Cannot run macro {0} because Cycle Period has status ‘Completed’
This table describes the error message displayed during the macro execution.
Validation Condition Error Message
Cannot pass values for the parameters such as Measure Code and Tag, in the same macro command. Only one parameter can be passed. Cannot specify both measure and tag
Check the Tag name exists and is enabled Tag {0} cannot be found.