I’m looping over some records and want to increment ‘i’ ONLY if both conditions below are met:
let i = 0;
for (let record of taskRecords.records) {
if(id.includes(record.getCellValue('ID Lookup')) && record.getCellValue('Stage').includes(stage)) {
i++;
}
}
console.log(i);
My problem is the second condition. The cell value of the field ‘Stage’ is “This is just some dummy text | this is a string” and it’s searching for “this is a string” (this is called ‘stage’ and is a string from a previous step in an automation).
i remains 0 in this case. Can anyone explain why includes doesn’t work on the second condition? Thanks!