Ledger account combinations – Part 4 (Advanced rules)


Introduction

Continuing this series of blog posts, we will cover the Advanced Rules region highlighted in pale yellow in the model below in figure 1.

While account structures and constraints allow the user to build very simple to very complex trees of valid combinations, sometimes the business requirements are to only show a dimension as a segment in an ledger account combination only at certain times rather than just constrain the valid values allowed showing it all the time. The use of advanced rules supports this requirement. 

 

Figure 1: Advanced rules in framework

Advanced rules

Advanced rules can be added to an account structure and its constraints. While versatile, there are guidelines when they should and should not be used for best usability, performance and understanding:

  • Rules cannot replace the account structure.  A structure must always exist with at least a main account segment.
  • Rules cannot add dimensions before other segments already in the account structure.
  • Rules should not be used to replace the use of constraints in the account structure for additional dimensions that are always required regardless of the main account.
  • Rules should not be used to replicate segments that already exist in the account structure or other rules
  • Any duplication will automatically join and use the most restrictive constraint.
  • The location of the duplicated segment will only appear in the first occurrence of it.

Setting up an advanced rule involves defining a filter that controls when additional segments are added to a ledger account combination, and then linking rule structures (similar to account structures) that specify the additional segments, their hierarchy order and any constraints between them to be added.

Assuming the following account structure is set up:

 

Figure 2: Basic structure and constraints

Let’s assume that a new advanced rule is needed to optionally add a segment (or segments) only if the user has entered main account 145 and customers G thru Q:

 

Figure 3: Advanced rule form

Once the rule is configured, a structure and constraint definition needs to be created to define what segments to add to the ledger account combination. This is done by creating a new rule structure, similar to how an account structure is created. These structures are not immediately bound to the rule, and as such can be shared across multiple rules if necessary.

Figure 4: Advanced rule structure form

After the structure is created, it is added onto the dimension rule, and the account structure along with the rule is then activated:

 

Figure 5: Added advanced rule structure to rule

The storage of this data uses some of the same tables as the storage of the account structures discussed in the previous post.  The DimensionRule, DimensionRuleAppliedHierarchy and DimensionRuleCriteria tables hold the data specific to the definition of the rule and the link to the definition of the rule structures.  The rest of the tables are shared with the account structure definition:

 

 Figure 6: Combined structure, rule and all constraints query results

Examples of the effects of these rules, rule structures, segments and constraints on the entry of a ledger dimension account will be explained in the next blog post when we begin discussing entry of ledger account combinations and their storage.


Comments (1)

  1. Valery Plotnik says:

    Hello, it seems that you've missed AS1 tag on Figure 6 at DIMENSIONRULE table output.

    Thanks for your pretty cool articles!

Skip to main content