Hi, I'm trying to use a filters array in a postMessage call, but it's not working when I include multiple filters.
However, if I use an array with only a single filter (any of them), it works fine.
const filters = [
{
absoluteDateFilter: {
dataset: {
identifier: {
id: "Date1",
type: "dataset"
}
},
from: this.formatDate(dateRange[0]),
to: this.formatDate(dateRange[1])
}
},
{
absoluteDateFilter: {
dataset: {
identifier: {
id: "Date2",
type: "dataset"
}
},
from: this.formatDate(dateRange[0]),
to: this.formatDate(dateRange[1])
}
},
{
negativeAttributeFilter: {
displayForm: {
identifier: "TypeId",
type: "displayForm"
},
notIn: [],
textFilter: true
}
}
];
const gdcMessage = {
gdc: {
product: "dashboard",
event: {
name: "setFilterContext",
data: {
filters: filters
}
}
}
};
// Sending the postMessage
window.postMessage(gdcMessage, '*');