DMXzone Database Connector ASP Support Product Page


How to use a form select for filtering AND a search field for querying multiple fields?

Asked 14 Jul 2015 18:06:27
has this question
14 Jul 2015 18:06:27 Steve Skinner posted:
I cannot seem to figure out how to set up a data source that filters records based on a mix of a dropdown selection AND multiple search criteria. Both work alone perfect, and they even work together correctly, but only if the search field queries only one field.

I need to be able to filter using a dropdown menu, and a search field which queries several fields....

I have my data source set up, and with this configuration in the filtering dialog, it properly filters the records using the combination of the drop down and the search:

Again, this is only searching one field and I need it to search a few more fields than just the one.

The problem is that when I add additional search filters using OR operator, it ruins all of the filtering. Searching multiple fields with one search box works great using the OR operator, but only when you aren't combining other filtering tools with it.

How can I successfully combine a dropdown selection for filtering and also a search which queries multiple fields on the same page???


Replied 15 Jul 2015 13:11:45
15 Jul 2015 13:11:45 Teodor Kuduschiev replied:
Hello Steve
please check the following topic:
Replied 15 Jul 2015 16:31:25
15 Jul 2015 16:31:25 Steve Skinner replied:
Thanks Teodor, I didn't realize this question fell under the same topic, but having read it again, I can see that it clearly does. Such a bummer...

I've been using the new database extensions since the day you released them, so I'm all too familiar with creating extra db Views, in order to keep the filtering done by the database connector at the basic level.

The problem in this case, is that I wanted to have one page which could be used to filter all report data.
  • There's the search capabilities, which need to query several db fields with one search box.
  • Then there's a status filtering mechanism. I am using a dropdown select to toggle between active and pending statuses.

To do this with views, I will need to create two of them; one view for each status (active/pending). On the front end, I guess I could use tabs to view each list and search, but that's not nearly as easy to use as one list would be with a dropdown for status and a search box.

Maybe this would work....
1. Build my two views for each status
2. Build the page with two identical lists (one after the other)
3. Use a dropdown at the top to select active/pending
4. Use the data.hide / features to only show the list that is selected in the dropdown. (Each list will have it's own search tool)

Do you think it would like this? It would appear as if there was just one list (like I'm wanting). Can you help me out with how to bind the dropdown selection to displaying the correct <span> region?

Reply to this topic