Category and account code expressions
Category and account code expressions retrieve financial data based on category or account codes, with options for rounding, period selection, and sign reversal.
note
The following lists common expressions to help you automate data in ONESOURCE Statutory Reporting for an entity or template. This is a reference guide, and doesn't include all expressions. Contact Thomson Reuters Support if you need more help with expressions.
Expression | Description |
|---|---|
reporting.Queries.CategoryValueOrZero('P 1', 1m, 'CurrentPeriod', null, null, true, null) | Fetches the value of a category code balance. Returns zero if the category code lacks GL assignments or has no balance. Filters within parentheses refine the returned value:
|
reporting.Queries.CategoryValueOrZero('P 1', 1m, 'CurrentPeriod', null, 'Company', true, null) | Fetches company-only data by changing the entity filter to the company identifier. The company/group identifier varies in our content, potentially appearing as 'E1' or 'Parent Entity'. |
reporting.Queries.CategoryValueOrZero('P 1', 1000m, 'CurrentPeriod', null, 'Company', true, null) | Fetches company-only data, rounded to the nearest 1000. |
reporting.Queries.CategoryValueOrZero('P 1', 1000m, 'CurrentPeriod', null, 'Company', false, null) | Fetches company-only data without reversing the sign. Shows revenue as a negative/credit value. |
reporting.Queries.CategoryValueOrZero('P 1', 1000m, 'CurrentPeriod', null, 'Company', false, 'Original Trial Balance') | Brings the value of the category based on journal data classified as 'Original Trial Balance'. |
reporting.Queries.AccountValueOrZero('10001', 0.01m, 'CurrentPeriod', null, null, false, null) | Fetches the value of an account code balance. Returns zero if the account code has no balance. Uses the same filters within parentheses as explained in the previous expressions. |
Filter selections for category and account code expressions
Details on how to apply filters to expressions, including category codes, account codes, and entity filters.
Category code
The example expression uses the category code 'P 1', which represents revenue in UK and Ireland content. Other country content uses 'PL.REV' for revenue. You can modify any category code expression by updating the category code within the expression.
Account code
The example expression uses the account code '10001', which represents a specific GL code in our Chart of Accounts. You can modify any account code expression by updating the account code within the expression.
Entity filters
The entity identifier varies across our country content.
Country | Company Filter | Group Filter |
|---|---|---|
UK and Ireland | Company | Group |
Australia and New Zealand | Parent Entity | Consolidated Entity |
Other Countries | E1 | E2 |
Rounding filters
Rounding filter | Description |
|---|---|
0.01m | Rounds to 2 decimal places |
1m | Rounds to whole number |
1000m | Rounds to thousands |
10000m | Rounds to tens of thousands |
100000m | Rounds to hundreds of thousands |
1000000m | Rounds to millions |
Period filters
Period filter | Description |
|---|---|
CurrentPeriod | As described |
PriorPeriod | As described |
PriorPriorPeriod | As described |
Reverse sign filters
Reverse sign filter | Description |
|---|---|
true | Reverses the sign of the value |
false | Doesn't reverse the sign of the value |
Journal classification filters
We used the journal classification 'Original Trial Balance' in the example expression. This represents a defined journal classification. Your entity's available classifications determine the defined classifications. We can't define the possible options here if customers can create or edit existing classifications.