Hi,
I'm doing a query search with the EsmFilterGroup. However, the correct results is not returning, I'm only getting the first filter, the logic "AND" is not being applied. Could someone kindly assist me with the flow.
{ "type": "EsmFilterGroup", "filters": [{ "type": "EsmFieldFilter", "field": { "name": "From"}, "operator": "EQUALS", "values": [{ "type": "EsmBasicValue", "value": emailFrom }] }], "logic": "AND", "filters": [{ "type": "EsmFieldFilter", "field": { "name": "To"}, "operator": "EQUALS", "values": [{ "type": "EsmBasicValue", "value": emailTo }] }], }
Thank you.
Hi, I had to do a similar query through ESM API recently and found this message while looking for help.
I know I'm 2 years late, but just as a reference for anyone else looking for the same thing, the way of doing it is similar to the original code except that both filters should be in the same filters array.
It should look similar to this:
{
"type": "EsmFilterGroup",
"filters": [{
"type": "EsmFieldFilter",
"field": {
"name": "From"},
"operator": "EQUALS",
"values": [{
"type": "EsmBasicValue",
"value": "emailFrom"
}]
},
{
"type": "EsmFieldFilter",
"field": {
"name": "To"},
"operator": "EQUALS",
"values": [{
"type": "EsmBasicValue",
"value": "emailTo"
}]
}
],
"logic": "AND"
}
Corporate Headquarters
6220 America Center Drive
San Jose, CA 95002 USA