You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

what is the syntax to update alias with groovy script

Summary:

Is there a syntax to update alias using a groovy script? We would like to update the alias of a period member based on the start period of the actual scenario.

Content (please ensure you mask any confidential information):

// Define variables based on current system values
Member theActMbr = null
Member theCYTM1 = null

// Set variables equal to current system values
try {
theActMbr = operation.application.getDimension('Scenario').getMember("Actual")
theCYTM1 = operation.application.getDimension("Period").getMember("CYM1")
}
catch (Exception e) {
// Silent fail
}
String thesetalias = 'CYTTM-Jan'

if (theActMbr == "Jan") {
theCYTM1.setAlias("Default", thesetalias) // "Default" is the alias table name
}

Script compilation error. - for the if statement section

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!