Rookie Compound Condition

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;
}

Yes, the purpose of Expand is to open the default script so you can modify it to your needs. Add as many conditions or as much logic as you want.

As for the blank check, try “” instead of " "

The second is not technically blank, it contains a space character.

Note, once you’ve expanded a script and hit OK, it can not be returned back to the default.

if (record.fields[“COLUMN19”].substr(0,2) === ‘02’) && (record.fields[“COLUMN67”].trim() != “”))

Thank you so much. That helped

ok…thanks. that helped explain things.