I have been trying to filter a data extension with two values. Every time I try, the values are not returned. Any guidance would be greatly appreciated. This is what I tried:
Fetching the values from first DE:
var ExclusionDE = DataExtension.Init('ExternalKeyOfDE');
var filter1 = {Property:"ExcludeFrom", SimpleOperator:"equals", Value:"IN"};
var rows = ExclusionDE.Rows.Retrieve(filter1);
for (var i = 0; i < rows.length; i++) {
var value1 = rows[i].value1;
var value2 = rows[i].value2;
Write(Stringify(value1));
Write(Stringify(value2));
};
This returns the values correctly.
I am trying to use the values returned in the above For Loop to filter another DE:
var birthdayDE = DataExtension.Init("DEToBeFiltered");
var complexfilter = {
LeftOperand:{
Property:"value1",
SimpleOperator:"notEquals",
Value:value1
},
LogicalOperator:"AND",
RightOperand:{
Property:"value2",
SimpleOperator:"notEquals",
Value:value2
}};
var moredata = birthdayDE.Rows.Retrieve(complexfilter);
Write(Stringify(moredata));
Second part of filtering the DE is not returning anything. Any help or guidance?
Thank you!
value1andvalue2.... 2) Can you try withORoperator, the AND operator seems to cause mutual exclusion and hence not giving any results.