forms!'parameter'.calculate
Script Language
This manual is in pilot operation.
|
The script language is a simple language used for writing scripts.
Features of the Script Language
The script language includes functions such as:
- Continuous execution of calculation processes by forms
-
It is possible to continuously execute calculation processes by forms. You can execute multiple forms continuously or execute a single form continuously with different parameters specified.
- Repetitive execution of calculation processes by forms
-
You can repeatedly execute calculation processes by forms, using members included in the member list as parameters.
- Acceptance of parameter values
-
It is possible to accept parameter values for the entire script. You can specify the dimensions to accept parameter values for and the range of members that can be accepted in the member list.
Syntax of the Script Language
Basic Syntax
Comments
Writing //
at the beginning of a line or after a sentence will treat the following as a comment.
Labels
When using reserved words as the value of a label, it must be enclosed in single quotes as follows:
Members and Member Variables
For statements that require a member, references to member variables (POV member @pov
and current member @cur
) or any label can be used. For example, to specify a reference to a member variable, it would be as follows:
forms!EXAMPLE_FORM.calculate(#FY!@cur)
for (#PERIOD:#POV_CHILDREN[@pov])
// ...
end
Member variables @pov
and @cur
are references to members determined at runtime. @pov
is declared by the parameter
statement and holds the member specified at script execution. @cur
holds the current member of the member list created by the for
loop (if not overwritten by the loop, @cur
will hold the same member as @pov
).
Parameter Declaration
The parameter
statement allows specifying members of the specified member list to be specified at script execution time. The syntax when the target member list does not take a POV member is as follows:
parameter Dimension Label : Member List Label
The syntax when the member list takes a POV member is as follows:
parameter Dimension Label : Member List Label[Member Label]
The member specified in the parameter
statement can then be referenced with @pov
.
|
Forms
The forms
statement executes the process of the specified form. The syntax when the form does not take parameters is as follows:
forms!Form Label.Method
// or
forms!Form Label.Method()
The syntax for specifying members to apply to the form parameters is as follows:
forms!Form Label.Method(Dimension Label!Member, Dimension Label!Member, ...)
Instead of dimension member labels, @pov
or @cur
can be specified to apply the POV member or the current member, respectively.
Also, specifying members to apply to the form parameters can be omitted. If omitted, the current member (@cur
) related to the required parameter’s dimension will be applied.
Pipelines
(fusion_place >= 11.0)
forms
statements can be connected with ->
, exporting data from the form on the left of ->
and importing it into the form on the right. The syntax for forms that do not take parameters is as follows:
forms!FormLabel1 -> forms!FormLabel2
Members to apply to the form parameters can also be specified, similar to the calculate()
method.
forms!FormLabel1(DimensionLabel!Member, DimensionLabel!Member, ...) -> forms!FormLabel2
forms!FormLabel1 -> forms!FormLabel2(DimensionLabel!Member, DimensionLabel!Member, ...)
forms!FormLabel1(DimensionLabel!Member, DimensionLabel!Member, ...) -> forms!FormLabel2(DimensionLabel!Member, DimensionLabel!Member, ...)
It’s also possible to execute the calculate()
method for any form within the pipeline.
forms!FormLabel1.calculate -> forms!FormLabel2
forms!FormLabel1 -> forms!FormLabel2.calculate
forms!FormLabel1.calculate -> forms!FormLabel2.calculate
Connecting more than 3
forms in a sequence is also possible.
forms!FormLabel1 -> forms!FormLabel2 -> forms!FormLabel3 -> ...
Control Structures
for
The for
loop is a syntax for iterating over a member list. The syntax for a member list that does not take a point of view member is as follows:
for (DimensionLabel:MemberListLabel)
// ...
end
The syntax for when the member list takes a point of view member is as follows:
for (DimensionLabel:MemberListLabel[Member])
// ...
end
The current member of the member list created by the for
loop can be referenced with @cur
.
for (#FY:#ALL)
forms!EXAMPLE_FORM.calculate(#FY!@cur)
end
Nested loop structures, where one for
loop is written inside another, are also possible.
for (#FY:#ALL)
for (#PERIOD:#POV_CHILDREN[@pov])
// ...
forms!EXAMPLE_FORM1.calculate
end
forms!EXAMPLE_FORM2.calculate
end
In the above example, EXAMPLE_FORM1
is executed for each fiscal year and each relative period. After processing all relative periods for EXAMPLE_FORM1
, EXAMPLE_FORM2
is executed for each fiscal year.