Customer Portal

creating a new record (row) transformation help

Comments 1

  • Avatar
    David Pavlis
    Comment actions Permalink

    Hi Mahmood.

    If, basically, you need to create 1 or more records out of 1 input, then the component which can help with this is Normalizer.

    It requires two CTL functions to be defined:

    • count() - supposed to return a number which denotes how many (X) times will the second function be called for the current input record
    • transform(integer idx) - function called X times for each input record (idx starts with 0, then up to X-1)


    function integer count(){
    if ($in.0.IDT-TYPE == '001') {
    return 2; // transform called 2x
    return 1; // transform called 1x

    function integer transform(integer idx){
    case 1:
    case 2:
    return OK;

    Your logic in count() can be quite complex. If you need to, aside calculating how many output records should be created, some other logic, then you can use global variable which you populate in the count() function or just calculate it inside tranform(integer idx) function.

Please sign in to leave a comment.