Creating Rules Files

You can create rules in a text editor such as Notepad ++. Rules files can be in an ASCII format that supports multibyte character sets (MBCS), or a file encoded with Unicode format, using Little Endian byte ordering. You use Visual Basic Script functions and Oracle Hyperion Financial Management functions in rules files. By default, rules files use the RLE file extension.

You can include all types of Financial Management rules in any order in the rules file. Table 10-3 lists the basic syntax to define each routine.

Table 10-3 Rules Routines

Rule Routine Syntax

Sub Calculate

Sub Calculate()

’Type your Calculation rule here.

End Sub

Sub Translate

Sub Translate()

’Type your Translation rule here.

End Sub

Sub Allocate

Sub Allocate()

’Type your Allocation rule here.

End Sub

Sub Input

Sub Input()

‘Type your Input rule here.

End Sub

Sub NoInput

Sub NoInput()

’Type your NoInput rule here.

End Sub

Sub Consolidate

Sub Consolidate()

’Type your Consolidation rule here.

End Sub

Sub Dynamic

Sub Dynamic()

’Type your Dynamic rule here.

End Sub

Sub Transactions

Sub Transactions()

’Type your Transactions rule here.

End Sub

Sub EquityPickup

Sub EquityPickUp()

’Type your Equity Pickup rule here.

End Sub

Sub OnDemand

Sub OnDemand_<ruleName>

’Type your OnDemand rule here.

End Sub

Equity Pickup Rules Example

The following section shows a sample Equity Pickup Rules section. To calculate Equity Pickup, the application administrator must create a new section in the Rules file named Sub EquityPickUp, where EPU calculations are defined. The default Point of View when the section is run is as follows:

  • Current Scenario, Year, and Period

  • Entity: Owner of the pair processed

  • Value: Entity currency

Sub EquityPickUp()
Owner = Hs.Entity.Member
Owned = Hs.Entity.Owned
OwnerDefaultCurrency = HS.Entity.DefCurrency("")
lPown = Hs.GetCell("E#" & Owned & ".I#" & Owner & ".V#[None].A#[Shares%Owned].C1#[None].C2#[None].C3#[None].C4#[None]")
Hs.Clear "A#IncomeFromSubsidiary.I#" & Owned
Hs.Exp "A#IncomeFromSubsidiary.I#" & Owned & " = E#" & Owned & ".V#" & OwnerDefaultCurrency & ".A#NetIncome.I#[ICP Top] *" & lPown
End Sub

OnDemand Rules Example

To run on-demand rules from data forms, the administrator must create a new section in the Rules file named Sub OnDemand, where OnDemand rules are defined.

Sub OnDemand_Calculation
HS.Exp "A#CogsTP=15424"
HS.Exp "A#Admex=32452"
End Sub

Note that all HS functions that can be used in Sub Calculate (but no others) can also be used in On Demand rules. Also note that unlike Sub Calculate, data previously written to an IsCalculated data-point is not cleared when an On-demand rule is run.