Variables

You can define variables and also call them in scripts. Characteristics of variables include:

  • Variables have a name and a single value type

  • The value of a variable can be any data type

  • You can define a variable once and use it in multiple places

  • You can change the value of a variable between commands

  • Variable names are case sensitive

  • You can use the keyword, var to define a variable, and refer to the variable using $

The following excerpt shows an example of using variables to create a shared dimension.

// Create Shared Dimension Script
set bpmaserverurl=http://localhost/hyperion-bpma-server;
set workspaceurl=http://localhost:19000/workspace;

login admin,password;
var DimType='Scenario';
// Create a shared dimension
create Dimension
        Properties(DimensionName, DimensionDescription, DimensionType)
        Values('S1','New Scenario','$DimType'); 

There are three types of variables:

  • User

    User variables are assigned using the keyword, var. For example:

    var variable1 = 'abc';
  • System

    System variables are assigned using the set command. For example:

    set bpmaserverurl='http://localhost/hyperion-bpma-server';
    set workspaceurl='http://localhost:19000/workspace';
    
  • Object

    Object variables are assigned using the set command. For example:

    set ApplicationName = 'Comma';
    
    set dimension=Account;