Creating a Rule
This topic describes how to create a new Rule and its specific properties.
To create a new Rule, click on "+ RULE" to access the Rule configuration panel.
Once the configuration panel is displayed, proceed as follows:
- Enter the Rule name in the "Title" field. This is how the Rule will be displayed across the application
- Select the Entity you wish to define a Rule for from the "Entity" dropdown menu. After selecting the Entity, its members will immediately appear in the formulas area below
- Assign the Rule to a group. This helps organize Rules for when you wish to assign them to Blocks in a Layout
- Set whether power users can edit the Rule. This option is selected by default when creating a Rule
- Enter the formulas you need next to each Entity member listed in the table
- Click on "SAVE CHANGES"
The Rule configuration panel allows you to manage a maximum of 65,000 rows.
If one or more formulas contain errors, when you save the Rule a notification message will indicate the rows that need correction.
Defining a basic Rule
To reference other members of the Entity within the formulas of the Rule, you must encapsulate the member codes in square brackets, like so: [01]. You can also place the mouse pointer in the formula field and then click on the member code to have it automatically entered in the field with the correct syntax.
In your formulas, you can use the standard arithmetic operators, (+, - , * , /) and parentheses.
Some functions using ranges are also supported, such as SUM(), AVG() , MIN(), MAX(), NPV(). For example, the formula =SUM([code1]:[code2]) adds values in the range code1 to code2.
The column offset
With this operator you can define formulas that refer to a previous column in Layout. Usually Rule formulas execute calculations in cells of the same column.
With the column offset operator, you can refer to any cell in a previous column. The column offset operator is marked by a point (".") ahead of the element code.
For example, the formula =[. C01] refers to the cell C01 and to the cell one column to the left. With this function, a recursive resolution of formulas that refer to other calculated cells will be avoided.
Importing a Rule
Rules can be imported from a tab-separated value text file.
The first column of the file must contain the Entity codes.
It is best practice for all members to be present in the file to ensure that the formulas are assigned to the correct members.
However, it is possible to import only a subset of members that you wish to populate with formula values. You will need to save the Rule after importing to see the result of the import.
The second column must be the formulas to be assigned to each Entity member.
To Export and Import a Rule via text file, click the appropriate buttons in the lower left corner of the configuration panel.