Help needed on a paged query

Hi all,
I would like to set up a page of products (over 8000 in total)
I would like to show it as a paged query of lets say 30 at a time.
However I would also like to put in a filter for main_cat & sub_cat so people can filter them down.

I have kind of got it working, however it only filters the 30 that are shown so not all records show.
Does anyone know the best way to filter it on a paged query ??

Hello @gunnery
When you filter your query, in the query builder hen the whole data will be filtered, not just the records on the page.

ok, so I may have to look at a different way than what I am doing, because it the moment I’m using a fuzzy search so that products show up when nothing is selected in the drop down.

Not sure I understand what exactly are you trying to achieve?
If you are using a paged query you should filter the query itself, in the query builder and not apply filters on the page (using a data view for example).

You can disable a filter condition within the query builder by making it conditional using this setting. Great for when parameters are not sent as the condition can be ignored

3 Likes

In my case the table wasn’t showing any records when I filtered it. Adding 0 to the server connect load for my select fixed the issue

<select id="select_category" class="form-control" dmx-bind:options="sc_categories.data.query1" optiontext="category" optionvalue="category_id"
dmx-on:changed="sc_paged_tripbits.load({category_id: value, offset: 0})">
<option selected="" value="">Category</option>

Great tip, Brian. I didn’t know that was there. Thanks.