How do I add more options to a Search facility?

I have a search facility that finds all files in a folder. This works really well, as does the sorting and paging.

I now need to add some options to the Search (as shown below) but I am stuck as to how to integrate these options, can someone throw me a lifeline please :smile:

image

Here is the INPUT field

<input id="filter_reports_msword" name="filter_reports_msword" type="text" class="form-control form-control-sm" placeholder="Search in filename">

And the Dataview Properties

<dmx-data-view id="view_msword_files" dmx-bind:data="sc_reports_msword_pq.data.msword_reports_list" dmx-bind:sorton="query1.data.sort" dmx-bind:sortdir="query1.data.dir" dmx-bind:page="query1.data.page" dmx-bind:pagesize="15" filter="name.lowercase().replace(' ', '').contains(filter_reports_msword.value.lowercase().replace(' ', ''))"></dmx-data-view>
1 Like

Quick answer to hopefully point you in the right direction as I’m not able to provide screenshots or detail at the moment.

Set the checkboxes to names you can then have in globals in your server connect script. Add those in the conditions of the query and use the default option so if they are not ticked, the search can do something else. Hope that makes sense!

I just recently put together a fairly comprehensive set of search filters and I'm really happy with the result.

This post might point you in right direction. One note though, I'm not using a data view, just a paged query being displayed in a table.

The essence though is I use input fields and checkboxes, that on input or save, set the value of a number of variables that are connected to the server connect query as GET parameters.

Then it's just a matter of nesting the conditions properly in the query.