Physical and temporary accounts

When it is necessary to define a very complex TGKML script, subdividing its definition in several steps is considered to be a best practice. This "Divide et Impera" approach is realized using the temporary accounts. The temporary account, unlike the physical account, present in the Tagetik accounts table, is available only in the script in which it is defined.

The syntax to use for defining a temporary account is the following:

.@ := ;

For instance, it is possible to write

  • [LO].@TEMP_ACCOUNT := [C00000](Entity.Filter([A00]));

After defining a temporary account , it can be used with the following syntax

@

for example:

....:=@TEMP_ACCOUNT;

When in a TGKML script it is necessary to refer several times the same physical account, it is recommended to create a temporary account. Indeed, in this way the script is more efficient.

Generally, a temporary account does not have to be used in a script applying a temporary shift such as

[LO].@TEMP_ACCOUNT := [C00000](Entity.Filter([A00]));

... := @TEMP_ACCOUNT(Time.Scenario.Prev);

since the account might not exist on the previous scenario.

In a TGKML script, wherever an integer parameter has to be inserted in a function, it is possible to use a temporary account. The system will read the amount of the "first record" of this account by rounding it to the closest integer value and it will use it as a parameter for the function. Which is the "first record" of a temporary account is not predictable, so the correct way to use this feature is to define a single record temporary account. Please note that, in this case, the system uploads only the information about the amount of the first record and not the information of the entire record. This is why the parameter should be considered non-dimensional, not with the same dimension as source data.