Does anyone know a way how to loop a filter? Is it even possible?
I’ve been tasked with building an internal dashboard for my employer to show a variety of data from 30+ locations.
Each filter is complex, but essentially only has a couple of items changed (basic example below). Instead of hardcoding each filter, is it possible to loop it within the module so new filters can be added or removed within the page editor?
{% set filter_london = table | selectattr ("city.name","equalto","London") | rejectattr ("plot_status.name","equalto","Reserved") %}
{% set filter_manchester = table | selectattr ("site.name","equalto","Manchester") | rejectattr ("plot_status.name","equalto","Reserved") %}
{% set filter_glasgow = table | selectattr ("city.name","equalto","Glasgow") | rejectattr ("plot_status.name","equalto","Reserved") %}