Creating a Balance Rule

To create a balance rule:

  1. From the Planning Links page, click Balances | Balance Rules to display the balance rule list page.
  2. Click New to open the new balance rule page.
  3. [Optional] Enter a unique name for the balance rule.
  4. [Optional] If needed, enter the labels of the categories by which you group data in the Level 1 Label to Level 7 Label fields. The report you want to get at the end of the setup is grouped into certain categories. The category can be just one. For example, a department when you get totals for each separate department. But more often, up to 7 categories are used in the report.

    Such as:

    • Department
    • Project
    • Team
    • Account
  5. [Optional] Specify a condition, if the amount sign is met for records that meet this condition will be inverted. For example, ff_bp__Tag2__r.ff_bp__Tag1__r.ff_bp__Tag1Name__c = 'Expense'. For example, it shows income data with a minus sign in a report while expenses data with a plus sign.
  6. Specify the Tag type that you can use as a source for calculating the reporting entities (Balances). For example, Entry value, Budget App Amount, Time Report amount, or any other type. The right choice depends on the architecture of the organization.
  7. [Optional] Specify the name of the CB Tag field from which the data is taken to group the report data in the Label 1 to Label 7 field, respectively. For example, enter ff_bp__Tag1__r.ff_bp__Tag2__c in Label 1 field.
  8. [Optional] Specify either the field where the ID of the parent record is located (in the case of a two-story structure of the source) or the ID of the record (in the case of a single-story structure of the source). For example, ff_bp__Tag1__c.
  9. [Optional] Select the folder to navigate through the balance rules.
  10. [Optional] Enter the field number of balance to store the total amount. For example, if you want to summarize actual data into the first Balance amount field (Decimal1__c) and the planned date stored in the second Balance amount field (Decimal2__c).

    To do this, specify the respective condition for source Tags. For example, ff_bp__Tag1__r.ff_bp__Tag4Name__c = 'Planned' in the Balance Amount 1 Filter field.

    Note:

    The fields are calculated in jobs from the first field to the fifth field. If a tag that satisfies the second condition also satisfies the first condition, its sum falls into the first field.

  11. [Optional] Specify which field of the original name is used for data calculation. Most often, data is stored in cb4__Decimal1__c.
  12. [Optional] Specify where the lookup for the “Period” dimension is located in the field of the selected source dimension. This is necessary for the data to be correctly aggregated according to the periods to which they correspond.
  13. [Optional] Select the checkbox to calculate in each balance the sum of sourced records for the corresponding period and the sum of sort records from the beginning of the fiscal year to the current period inclusive.
  14. [Optional] Specify the exact date range of the data source you want to get. For example, only actual entries for the first quarter of the current year. The filter is specified in the SOQL format. For example, ff_bp__Text1__c = 'main' AND ff_bp__Tag1__r.ff_bp__Tag1Name__c = '2021'.
  15. [Optional] Enter the description of the balance rule.
  16. Click Save.

Importing and Exporting JSON

The balance of the rule is copied by uploading to JSON and then uploading data to a new rule. Use the JSON string to quickly transfer configurations from a Sandbox to other Sandboxes or Production.

Note:

IDs for each organization are unique, but the purpose of copying is to transfer filters and text parameters that are common for all organizations.

To copy, open the needed balance rule and click Export/Import. Copy text from the main window to the clipboard of your operating system. Click Apply or Close to hide the window.

Create a new rule or open an existing rule that you want to replace and click Export/Import button. In the new balance rule window that appears, replace the text with the content of your clipboard and click Apply. The window disappears and the rule is filled with data from JSON. All that remains is to save the balance rule.

Note:

It is recommended that you do not change the JSON text manually. This can lead to unexpected behavior of the rule.

JSON Structure

Copy
{"CurrencyIsoCode":"USD","ff_bp__Amount1Filter__c":"ff_bp__Tag1__r.ff_bp__Tag4Name__c = 'Planned'","ff_bp__Amount2Filter__c":"ff_bp__Tag1__r.ff_bp__Tag4Name__c = <span class="linter-issue">'Actual'</span>","ff_bp__AmountField__c":"ff_bp__Decimal1__c","ff_bp__CalculateYTD__c":false,"ff_bp__ColumnField__c":"ff_bp__Tag3__c","ff_bp__DimensionTypeName__c":"Entry Amount","ff_bp__DimensionType__c":"a6w0R000000DIpPQAW","ff_bp__DrillDownField__c":"ff_bp__Tag1__c","ff_bp__Label__c":"Balance Rule","ff_bp__Lvl1Field__c":"ff_bp__Tag1__r.ff_bp__Tag2__c","ff_bp__Lvl1Label__c":"Department","ff_bp__Lvl2Field__c":"ff_bp__Tag2__r.ff_bp__Tag1__r.ff_bp__Tag1__c","ff_bp__Lvl2Label__c":"Type","ff_bp__Lvl3Field__c":"ff_bp__Tag2__c","ff_bp__Lvl3Label__c":"Account","ff_bp__Lvl4Field__c":"ff_bp__Tag7__c","ff_bp__Lvl4Label__c":"FF1","ff_bp__Lvl5Field__c":"ff_bp__Tag8__c","ff_bp__Lvl5Label__c":"FF2","ff_bp__Lvl6Field__c":"ff_bp__Tag9__c","ff_bp__Lvl6Label__c":"FF3","ff_bp__Lvl7Field__c":"ff_bp__Tag10__c","ff_bp__Lvl7Label__c":"FF4","ff_bp__MinusCondition__c":"ff_bp__Tag2__r.ff_bp__Tag1__r.ff_bp__Tag1Name__c = <span class="linter-issue">'Expense'</span>","ff_bp__TagFilter__c":"ff_bp__Text1__c = <span class="linter-issue">'main'</span> AND ff_bp__Tag1__r.ff_bp__Tag1Name__c = <span class="linter-issue">'2021'</span>"}