CreateCyclePeriod macro

The CreatCyclePeriod macro is used to create a new Cycle Period for the selected Cycle and for the next Period based on the Cycle Periodicity settings or as specified by the macro. This macro command is executed at the System level.

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

CreateCyclePeriod(Cycle, [Cycle Period], [Cycle Period Label], [Previous Period], [Time out])
Note: The optional parameters are specified in [ ].

This table lists the parameters that are used in the macro to determine the Cycle Period to be created:

Parameter Name Description
Cycle The name of the cycle in which the new cycle period is to be created.
Cycle Period The calendar period (bucket) in which the new cycle period is to be created.
Note: 
  • If this value is not specified, the period specified for Cycle.Next Period is considered. This allows defining the macro command without updating the details for each period.
    • The value for Cycle.Next Period is updated to Cycle.Next Period + 1 based on the cycle calendar at the level defined in Cycle.Periodicity.
    • If the Next Period +1 cannot be determined, the Cycle.Next Period is cleared. This prevents the creation of the same period multiple times.
  • If a cycle period is passed to the command, the Next Period is not updated. This prevents conflicts with other automatic processes using Next Period that are in place.
Cycle Period Label The label of the cycle period to be created.
Note: 
  • If this value is not specified, the name of the calendar period is considered.
  • If the name based on the calendar period already exists, an underscore and sequential integer must be added. For example, Mar 10_2, Mar 10_3.
Previous Period The name of the previous cycle period. This is used when mapping data using CopyLastPeriodMeasure and also in multiple cycle period worksheets.
Note: 
  • If this value is not specified, a running or completed cycle period corresponding to the previous period (bucket) based on the cycle calendar at the level defined in Cycle.Periodicity is considered.
  • If the previous period cannot be determined and this value is not defined, the macro execution continues.
Time out The time, in seconds, to wait for the setup check or other blocking processes to complete (if processing currently).
Note: If this value is not specified, the waiting period is indefinite.

This table lists the examples of the CreateCyclePeriod macro:

Requirement Syntax
Create the cycle period currently indicated by Normal.Next Period using the corresponding calendar period name as the cycle period name. The previous Period is determined automatically with an indefinite timeout. CreateCyclePeriod("Normal","","","","")
Create the cycle period Normal-Nov 12 (with label ‘Nov 12’) linking to the Previous Period ‘Oct 12’ if defined (and the status Running or Completed) with an indefinite time out. CreateCyclePeriod("Normal","Nov 12","","","")
Create the cycle period ‘Normal-Mar 13 (with label ‘Mar 13’) linking to Previous Period Feb 13 with an indefinite time out. CreateCyclePeriod("Normal","Mar 13","","Feb 13","")
Create the cycle period Normal-Feb 13 (with the label ‘FY13' Feb) linking to Previous Period FY 13 Jan, with a time out of 600 seconds if the setup checker of other blocking processes are running. CreateCyclePeriod("Normal","Feb 13","FY13 Feb","FY13 Jan","600")