Performing Different Actions for Different Members

You can have a rule perform different actions for different members of a dimension. For example, you might want one calculation to occur if the current scenario is Budget and a different calculation to occur if the current scenario is Actual.

To conditionally perform different actions, include one or more ElseIf statements in an If structure. Have each ElseIf statement test for a different member; place the actions to be performed for a member beneath its ElseIf statement.

In this example, different accounts will be updated depending upon whether the current scenario is Budget or Actual:

  • If the current scenario is Budget,Oracle Hyperion Financial Management multiplies the amounts in the UnitsSold and Price accounts and inserts the product in the Sales account.

  • If the current scenario is Actual,Financial Management divides the Sales account’s amount by the UnitsSold account’s amount and inserts the quotient in the Price account.

    If HS.Scenario.Member = "Budget" Then
         HS.EXP "A#Sales = A#UnitsSold * A#Price"
          ElseIf HS.Scenario.Member = "Actual" Then
         HS.EXP "A#Price = A#Sales / A#UnitsSold"
    End If

    Tip:

    To have an action occur if none of the specified conditions in the If...Then and ElseIf statements are met, VBScript enables you to add an Else statement to an If structure. See Microsoft’s VBScript documentation for details.