Forum Discussion

KH1's avatar
KH1
Contributor
13 days ago
Solved

Run "Business Rule" via "Member Formula"

Pls share how to run 1. a traditional BR via a member formula 2. an assembly BR via a member formula Thank you - OS SME.
  • rhankey's avatar
    rhankey
    4 days ago

    All I believe you can call directly from a Member Formula, or Formula for Calculation Drill Down are Finance type Business Rules, which is what the code sample I provided was calling.  The reason for this is that there is no way in a dimension member of defining Referenced Assemblies, as you can with all types of Business Rules files.  Being unable to define Referenced Assemblies, the following sample Dim statement to hook in an Assembly file will fail:

    Dim XX As New Workspace.RHWorkspace.RHAssembly.RHStandardClassFile

    To overcome this, you would need to have the Member Formula or Formula for Calculation Drill Down to call a Finance type Business Rule, where you have defined any Referenced Assemblies you desire to non-Finance type rules files, at which point you can call any type of Business Rule file or Assembly file you desire.

    I use the above strategy with all stored Member Formulas, Formula for Calculation Drill Down and many Dynamic Calcs.  They all call functions in Finance type Business Rules files.  That allows me to centrally see/maintain all Member Formulas.  But as importantly, it allows these Member Formulas to make use of common (shared) functions and structures that I use throughout my logic.  The common functions & structures are mostly stored in Extender Rules files.  I can similarly call Workspace assembly files too.  And it also provides the option to write in VB or C# and to encrypt code that is sensitive.