Special VB Script Functions for Financial Management

These special functions were implemented for Oracle Hyperion Financial Management to address array and loop in the Oracle Hyperion Calculation Manager UI.

Range

Value Loop Variable VBScript Generation

@Range(1-50)

i

Dim i(50)

I(1)=1

I(2)=2

I(3)=3

..

I(50)=50

@Range(5-10)

i

Dim i(6)

I(1)=5

I(2)=6

I(3)=7

I(4)=8

I(5)=9

I(6)=10

@Range(1,3-5,7-9)

i

Dim i(8)

I(1)=1

I(2)=3

I(3)=4

I(4)=5

I(5)=7

I(6)=8

I(7)=9

For / ForStep

Value Loop Variable VBScript Generation Comments

@For(2,10)

Item

For Item=2 to 10

New @ForLoop @For(from, to)

@ForStep(2,10,2)

Item

For Item =2 to 10 step 2

New @ForStep loop function

@ForStep(from, to, step)

If you need a reverse step, add a negative sign (-) in front of the step, for example:

@ForStep(2,10,-2)

ExitFor

@ExitFor - exiting the loop

The system generates these VB script statements:

For each element in group

[statements]

Exit For

statements]

Next [element]

Or

For counter=start To end [Step step]

[statements]

Exit For

[statements]

Next [counter]

ExitSub

@ExitSub - exiting the rule

The system generates these VB script statements:

Sub name [(x,y)]

statements]

ExitSub

[statements]

EndSub

ReDim

Redimensions one or more dynamic array variables and reallocates their storage space. The optional Preserve keyword can be used to keep the contents of the array intact when it is being redimensioned.

{VarArrayX(5)} = @Redim

{VarArrayXY(5,9)} = @Redim

The system generates these VB statements:

Redim VarArrayX(5)

Redim VarArrayXY(5,9))

RedimPreserve

{VarArrayXY(5)} = @RedimPreserve

Or

{VarArrayXY(5,9)} = @RedimPreserve

Or

{VarArrayXY(5,{i})} = @RedimPreserve

The system generates this VB statement:

RedimPreserve VarArrayX(5)

Or

RedimPreserve VarArrayXY(5,9)

Or

RedimPreserve VarArrayXY(5,i)