Static filters not working


#1

Hey guy i have a probblem with static filters, it seems like they are not working or the toolkit is not taking all only the last one, i’m doing something like this:

const customerFilter = cf.Filter('customer_id').value('120405753');
const statusFilter = cf.Filter('verification_status').value(true);
const ageFilter = cf.Filter('age').operation('between').value([19, 24]);

const visualization = cf
                .provider(provider)
                .source(APP_SOURCE)
                .fields(fields)
                .staticFilters(customerFilter)
                .staticFilters(statusFilter)
                .staticFilters(ageFilter)

#2

Hey @ralf, actually the right syntax is putting up all the filters in a single array, let me fix your code a little bit:

const customerFilter = cf.Filter('customer_id').value('120405753');
const statusFilter = cf.Filter('verification_status').value(true);
const ageFilter = cf.Filter('age').operation('between').value([19, 24]);

const visualization = cf
                .provider(provider)
                .source(APP_SOURCE)
                .fields(fields)
                .staticFilters([customerFilter, statusFilter, ageFilter])

So that should be the correct configuration.


#3

Great!, catually it works good, so thank you so much