Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
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

Groovy Support

edited May 15, 2020 1:52PM in Planning 15 comments

Summary

I am building a rule in groovy. below is the script which is failing to give me output. Waiting for an supporting hand

Content

 
The script logic is to pick one combination of all dimension and build a scriptbuilder. The logic is not executing as it gives me an error.
 
 

Version

EPBCS 20.05.63

Code Snippet

/*RTPS:*/
StringBuilder scriptBldr = StringBuilder.newInstance()
DataGrid Curgrid = operation.getGrid();

Cube cube = operation.application.getCube("OEP_FS")
Dimension EntityDim = operation.application.getDimension("Entity", cube)
Dimension FunctionDim = operation.application.getDimension("Function", cube)
Dimension FundDim = operation.application.getDimension("Fund", cube)
Dimension ProjectsDim = operation.application.getDimension("Projects", cube)
Dimension UsercodeDim = operation.application.getDimension("Usercode", cube)

def Entity = EntityDim.getEvaluatedMembers("ILvl0Descendants(All_Department)", cube) as String[]
def Function = FunctionDim.getEvaluatedMembers("ILvl0Descendants(All_Function)", cube) as String[]
def Fund = FundDim.getEvaluatedMembers("ILvl0Descendants(All_Fund)", cube) as String[]
def Projects = ProjectsDim.getEvaluatedMembers("ILvl0Descendants(All_Projects)", cube) as String[]
def Usercode = UsercodeDim.getEvaluatedMembers("ILvl0Descendants(All_Usercode)", cube) as String[]

def F_AccountList = []
String fAccounts

GridIterator itr = Curgrid.getDataCellIterator(PredicateUtils.invokerPredicate("isReadOnly"))
itr.each{ DataCell cell ->
  fAccounts = cell.getAccountName()
    if(F_AccountList.indexOf(fAccounts) < 0){
    F_AccountList <<"""
    "$fAccounts"
    """
}
}
String Fud,Fun,Ent,Usc,Pro;

for (int i = 0; i <=
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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