Reference: Dot Notation for Properties
Similar to object references in programming languages, you can use
dot notation
in formulas. Dot notation is particularly useful in formulas with IFF
statements because it allows the formula to vary based on current location. As an example, the following formula calculates a metric differently in an actuals version than in a plan version: Example: The formula calculates a metric one way in actuals and an other way in plan versions:
IFF(this.Version.IsActuals, ACCT.ActualsValue, ACCT.PlanValue)
Example: For browsers that use commas for decimals:
IFF(this.Version.IsActuals; ACCT.ActualsValue; ACCT.PlanValue)
Formulas using dot notation properties to reference dimension values, attribute values, and levels must refer to them using Code to avoid ambiguity when their names match. If you change the Code for a dimension value, attribute value, or level, update your formulas to match the Code.
Operands
Operand expression syntax makes use of the standardized this
term to indicate a cell's current location.
Property | Description |
|---|---|
this.Version | Returns a version object, which can be combined with additional dot ( . ) properties such asthis.Version.Name . Refer to Object Types below. |
this.Level | Returns a level object, which can be combined with additional dot ( . ) properties. |
this.Account | Returns an account object, when can be combined with additional dot ( . ) properties. |
this. dimension_name | Returns the dimension value of the current cell in the dimension specified. If the current cell has no value for the specified dimension, returns an empty (blank) object. This property is only accessible if the dimension has a name that is a legal identifier (starts with a non-digit and consists only of letters, numbers, and the underscore). Dimensions with non-identifier names (such as those with more than one word in their name) are not retrievable in a formula. |
this. attribute_name | Returns the attribute value of the current cell in the attribute specified. If the current cell has no value for the specified attribute, returns a empty object. This property is only accessible if the attribute has a name that is a legal identifier (starts with a non-digit and consists only of letters, numbers, and the underscore). Attributes with non-identifier names (such as those with more than one word in their name) are not retrievable in a formula. |
this.<stratum_code> | Returns the Timeperiod of the requested strata type which contains the current cell's time coordinate. If the requested strata is below (finer-grained than) the current cell's statum, this function returns the first Timeperiod of that stratum found in the scope of the current cell's stratum. |
Object Types
Data types represent objects, allowing the "dot notation" to access properties of those objects. The available object properties are:Version
Refers to various properties of the current version in an IF
statement.
Example:
IF (this.Version.Name = "Budget 2018", x, y)
Example: For browsers that use commas for decimals:
IF (this.Version.Name = "Budget 2018"; x; y)
Property | Description |
|---|---|
Version.Name | Returns the string representing the version's name. If an actuals cell is being overlaid on a plan version, the actuals version is considered to be the version of the cell. |
Version.ShortName | Returns the string representing the version's short name. |
Version.Description | Returns the string representing the version's description. |
Version.Type | Returns a string representing the version's type, as returned in the exportVersions API. Returns one of the following:PLANNING, ACTUALS, VERSION_FOLDER, JOURNAL_ENTRY . |
Version.StartDate | Returns a date value representing the first day of the time period which is the start of the version. |
Version.EndDate | Returns a date value representing the last day of the time period which is the end of the version. |
Version.PositionOf | Returns the relative order of the provided time period within the entire span of the version. The initial sequence starts with 0 (not 1) and the order number can be negative if the time period occurs before the start of the version. This function also works with a time period that is beyond the end of the version. |
Version.IsActuals | Returns a boolean value indicating whether this version is an actuals version or not (this includes types ACTUALS , SUBACTUALS , andJOURNAL_ENTRY ). |
Version.IsGroup | Returns a boolean value indicating whether this version is a Version Group (and not a version that contains data). |
Version.IsParent | Returns a boolean value indicating whether this version has child versions. |
Version.Parent | Returns the version which is the parent of this version. |
Level
Refers to various properties of the current level in an IF
statement.
Example:
IF (this.Level.Name = "Sales", x, y)
Example: For browsers that use commas for decimals:
IF (this.Level.Name = "Sales"; x; y)
Property | Description |
|---|---|
Level.Code | Returns the string representing the level's code. |
Level.Name | Returns the string representing the level's name. |
Level.ShortName | Returns the string representing the level's short name. |
Level.InWorkflow | Returns a boolean value indicating whether the level is included in Workflow. For instances with Workflow disabled, all levels return false. |
Level.IsElimination | Returns a boolean value indicating whether the level is an Elimination level. For instances without the Eliminations feature, all levels return false. |
Level.IsTradingPartner | Returns a boolean value indicating whether the level is an Elimination Trading Partner level. For instances without Eliminations feature, all levels return false. |
Level.Currency | Returns the string representing the level's ISO currency code (for example, EUR orUSD ). |
Level.Parent | Returns the level code which is the parent of this level, or the special "null" level object if this level has no parent (the root level). |
Level.IsLeaf | Returns a boolean value indicating whether the level is a leaf level or not (that is, this property returns true if the level has no children). |
Account
Refers to the various properties (not the value
) of the current account in an IF
statement.
Example:
IF (this.Account.IFRS_Category.Name = "Assets", 1, 0)
Example: For browsers that use commas as decimals:
IF (this.Account.IFRS_Category.Name = "Assets"; 1; 0)
Property | Description |
|---|---|
Account.Code | Returns the string representing the account's code. |
Account.Name | Returns the string representing the account's name. |
Account.ShortName | Returns the string representing the account's short name. |
Account.Description | Returns the string representing the account's description. |
Account.Parent | Returns an account which is the parent of this account, or the special "null" account object if this account has no parent (a root account). |
Account.< attribute_name > | Returns a dimension value object associated with the attribute specified. This property is accessible only if the attribute has a name that is a legal identifier (starts with a non-digit and consists only of letters, numbers, and the underscore). Attributes with non-identifier names (such as those with more than one word in their name) are not retrievable in a formula. |
Account.isCredit | Returns a boolean value if the account has aBalanceType ofCREDIT or not. Note that some accounts (e.g. Metric Accounts) will be neither Debit nor Credit. |
Account.isDebit | Returns a boolean value if the account has aBalanceType ofDEBIT or not. Note that some accounts (e.g. Metric Accounts) will be neither Debit nor Credit. |
Dimensions and Attributes
Property | Description |
|---|---|
DimensionValue .Code | Returns the string representing the dimension value's code in the dimension specified. Example: IF (this.Region.Code = "East01", 1, 0) |
DimensionValue .Name | Returns the string representing the dimension value's name in the dimension specified. Example: IF (this.Region.Name = "East", 1, 0) |
DimensionValue .ShortName | Returns the string representing the dimension value's short name. |
DimensionValue .Description | Returns the string representing the dimension value's description. |
DimensionValue .Parent | Returns the dimension value which is the parent of this value, or the special empty object if this value has no parent within the dimension (for example, the "parent" is the root of the dimension itself). Example: this.DimensionValue.Parent.Name would return the name of the parent for this dimension value. |
DimensionValue .IsLeaf | Returns a boolean value indicating if the dimension value in the dimension specified is a leaf value in that dimension. |
DimensionValue .<attribute_code > | Returns the value code of the attribute specified (that corresponds to the dimension value). |
DimensionValue .<attribute_name > | Returns the value of the attribute specified (that corresponds to the dimension value). |
AttributeValue .Code | Returns the string representing the attribute value code. |
AttributeValue .Name | Returns the string representing the attribute value name. |
AttributeValue .ShortName | Returns the string representing the attribute value's short name. |
AttributeValue .Description | Returns the string representing the attribute value's description. |
AttributeValue .Parent | Returns the attribute value code which is the parent of this value, or the special empty object if this value has no parent within the dimension (for example, the "parent" is the root of the dimension itself). |
AttributeValue .IsLeaf | Returns a boolean value to indicate if the attribute value in the attribute specified is a leaf value in that attribute. |
Time period
A time period represents a particular time period of any configured calendar stratum. Time period data types cannot be compared to any other data types.
Examples:
IF (this.Month.NumberOfDays > 30, 1, 0) IF (this.Year.PositionOf (this.Month) > 6, "Past sixth month", "Not") IF (this.Quarter.PositionOf (this.Week) = 1, "First week of qtr", "Not")
Property | Description |
|---|---|
Timeper .Code | Returns the code of the time period. This will match how the time period is referred to in time discriminants. |
Timeper .NumberOfDays | Returns the total number of days in the time period, inclusive. Example: IF (this.Month.NumberOfDays > 30, 1, 0) |
Timeper .Parent | Returns the time period which contains the current time period and is one stratum higher (coarser) on the strata continuum. If there is no higher stratum, returns the current time period. |
Timeper .StartDate | Returns a date the represents the first day of the time period (same as Version.StartDate). |
Timeper .EndDate | Returns a date that represents the last day of the time period (same as Version.EndDate). |
Timeper .PositionOf(tp) | Returns an integer that represents the position of time period ( tp ) within the source time period (relative to the other members of its stratum). Returns 0 if the time period specified (tp ) is not a smaller stratum than theTimeper tp does not lie within theTimeper |