// Capture the edited periods and products Set editedMembers = [] operation.grid.dataCellIterator({DataCell cell -> cell.edited}, MemberNameType.ESSBASE_NAME).each { DataCell cell -> editedMembers << cell.periodName << cell.getMemberName("Product") } if(editedMembers.size() == 0){ println("No edited cells found!") return; } // Generate the calc script to calculate revenue for the products whose volume was edited String calcScript = """ Fix(${cscParams(operation.grid.pov, editedMembers)}) "OFS_Calculated" ( "OFS_Product Revenue" = "OFS_Volume" * "OFS_Avg Selling Price"; ) EndFix;""" println("The following calc script was executed by $operation.user.fullName: \n $calcScript") return calcScript.toString()