Welcome Guest. Sign in or Signup

1 Answers

MIP Troubleshooting problems with variants and iteration loops.

Asked by: 545 views Programming

Why is my transform() function skipping the children variations? For example after the parent GROUP[0] , GROUP[3] is being processed instead of GROUP[1] and GROUP[2]. What’s wrong with my tranform() function below?

function transform() {
    LOGGER . log(“   ”);
    LOGGER . log(“    >>>> PRODUCT <<<<“);
    LOGGER . log(“Group ID = ” + getGroupColumnKey() + “, Group size = ” + GROUP . length);

    for(i=0;
    i < GROUP . length;
    i++) {
        LOGGER . log(“    ”);
        LOGGER . log(“transformimg Group [” + i + “]”);

        PRODUCT_INRECORD = GROUP[i];
        if (i == 0) {
            LOGGER . log(“–> transform parent: Group [” + i + “]”);
            transformParent();
        }
        LOGGER . log(” –> transforming child: Group [” + i + “]”);
        transformChild();
    }
}