This chapter describes the syntax and the use of CTL2. For detailed information on language reference or built-in functions see:
Example 62.1. Example of CTL2 syntax (Rollup)
//#CTL2
string[] customers;
integer Length;
function void initGroup(VoidMetadata groupAccumulator) {
}
function boolean updateGroup(VoidMetadata groupAccumulator) {
customers = split($0.customers," - ");
Length = length(customers);
return true;
}
function boolean finishGroup(VoidMetadata groupAccumulator) {
return true;
}
function integer updateTransform(integer counter, VoidMetadata groupAccumulator) {
if (counter >= Length) {
clear(customers);
return SKIP;
}
$0.customers = customers[counter];
$0.EmployeeID = $0.EmployeeID;
return ALL;
}
function integer transform(integer counter, VoidMetadata groupAccumulator) {
return ALL;
}