Multiple masonry filters

I have 3 search querys I would like to link to a masonry repeat.


I have it working on one with no issues at all.

div class=“row” is=“dmx-masonry” id=“masonry1” columns-sm=“1” columns-md=“2” columns-lg=“4” columns-xl=“4” dmx-bind:repeat=“view_orders.data.repeat.where((query1[0].firstName.lowercase() || query1[0].surName.lowercase()), inp_filterName.value.lowercase(), ‘fuzzySearch’)”

What I need to be able to do if filter the above by either Customer Name or Product SSC or Manufacture as in the above picture.

I have tries multiple things like

div class=“row” is=“dmx-masonry” id=“masonry1” columns-sm=“1” columns-md=“2” columns-lg=“4” columns-xl=“4” dmx-bind:repeat=“view_orders.data.repeat.where((query1[0].firstName.lowercase() || query1[0].surName.lowercase()), inp_filterName.value.lowercase(), ‘fuzzySearch’) || view_orders.data.repeat.where((query1[0].firstName.lowercase() || query1[0].surName.lowercase()), inp_filterName.value.lowercase(), ‘fuzzySearch’)”

But it will not work, does anyone have any ideas about this, I’m pretty sure it can be done but for the life of me I cannot remember how.

To filter records from multiple search criteria, I perform search on the server side.

I create variables for each search criteria, then add an on-updated event with a debounce (for the API query to wait for user input before running) for the search input field dmx-on:updated.debounce:600="var_search1.setValue(value)". In the DB query conditions, add fields that you want to search for these search variables.

One of the benefits with this setup is that multiple fields can be added for each search input variable in a conditional group. E.g. if you want Customer Name input field to search for Name, address, code etc. then you can add them all in the conditional group.

So I worked it out

dmx-bind:repeat=“view_orders.data.repeat.where(query1[0].surName.lowercase(), inp_filtername.value.lowercase(), ‘fuzzySearch’).where(supplier.lowercase(), inp_selSupplier.selectedValue.lowercase(), ‘fuzzySearch’)”

1 Like