What are Scripts?

Designer Administrator
This manual is in pilot operation.

Scripts are tools that automate a series of form-based computational processes. Written in a simple language, scripts can sequentially execute processes across multiple forms and perform iterative executions on multiple members specified in a member list. Similarly to querying forms, parameters can be specified at the time of script execution and applied to the execution of each form.

  • Scripts must have a unique label within the application and can have an arbitrary name.

  • When accessing ledger data using scripts, Ledger Access Control is applied.

Example of Script Writing

Below is an example of a script. The text following // on each line is a comment.

  //
  // Declaration of parameters
  //

  // Select a parameter from the #ALL member list of the Fiscal Year dimension
  parameter #FY:#ALL

  // Select a parameter from the #POV_BOTTOMS member list of the Relative Period dimension, with "Year/Y" as the POV member
  parameter #PERIOD:#POV_BOTTOMS[Y]

  // Select a parameter from the #ALL member list of the custom dimension "Participant (BU)"
  parameter BU:#ALL

  //
  // Description of the process
  //
  // "Process Description"
  // Copy the actual data for the specified fiscal year and month to the forecast scenario.
  // However, only the participants under the specified participant are targeted.
  //

  // Repeat the process between for-end for the lowest descendant of the participant (BU:#POV_BOTTOMS[@pov]) given by the parameter.
  for (BU:#POV_BOTTOMS[@pov])
      // Execute the form "COPY_A_TO_F_BU / Actual -> Forecast Copy (By Participant)".
      // Since no parameters are specified for form execution, the "current member (@CUR)" here is applied. That is:
      // For the participant, each member targeted in the FOR loop,
      // For the fiscal year and relative period, the members given as script parameters are passed.
      forms!COPY_A_TO_F_BU.calculate
  end

  // Finally, execute the form "COPY_A_TO_F_COMMON / Actual -> Forecast Copy (Common Data)".
  // Fiscal year, relative period, and participant given as script parameters are applied as form execution parameters.
  forms!COPY_A_TO_F_COMMON.calculate