So first off I am new with Connect but have years of experience with PP Design 7. I have a rush job so I am trying to learn java script on the fly. I have a file that is to produce 2 different letter based on 2 variable fields in a file. I discovered the Edit script but it only allows for 1 condition. Is it possible to open the Edit Script, click expand and edit the java script to and add the second condition? So what I want is if Column19 begins with “02” and Column67 is not equal to blank then… I wrote the following but it is erroring out. Any help would be appreciated.
var section = merge.template.contexts.PRINT.sections[‘Dependent_1’];
if (!section) {
throw “‘Dependent_1’ not found”;
}
if (record.fields[“COLUMN19”].indexOf(“02”) == 0) AND (record.fields[“COLUMN67”] != " ") {
section.enabled = true;
} else {
section.enabled = false;
}