Combined search filters options for repeaters

repeater-widget
advanced-prototyping

#1

Hi all, I’m looking for some help with building combined search filters. I have an object collection created with repeater and I have applied multiple drop-down search filters. I am wondering if I can combine a different version of search filters apart from the drop-down option. Is it possible to search my database(made with repeaters) with a predictive search tool for example?

P.s: I have attached my database that is searchable with the drop-down filters(Item, type, country) and I was wondering as I mentioned if for example the filter Type can be predictive search tool and filter the database as well?

Please, can anyone help?


Thank you,
A


#2

Not sure I fully understand the problem.

You should be able to have multiple filters active with built-in Axure functionality. Just make sure when you’re setting up your filter conditions you uncheck “Remove other filters”.

Unfortunately, I don’t now the technical details of how predictive search actually functions, so I can’t really help you there. If I had to guess I’d bet that it wouldn’t work (or, at least, not well). Axure generates pretty “messy” HTML: lots of nested elements with custom attributes, things being “out-of-order” in the DOM, image names are replaced with auto-generated values etc. All of which are made worse when using repeaters, because repeater items that have been “filtered” out don’t appear anywhere in the DOM and there’s no references (that I’m aware of) from the page to the location where all of the values are stored.

Out of curiosity, what are you trying to solve by using predictive search?


#3

Hi andnik!

The filtering you want is referred to as “facet filtering” or “faceted navigation,” where a facet is one of many properties of items in a list that you can use to winnow down that list.

For example, if you were shopping for pool noodles, one facet of a pool noodle might be its length and another might be its color. So if you chose both ‘6 foot’ for the length facet and ‘Orange’ for the color facet, you’d expect to see only pool noodles that are both 6-foot long and orange.

Here’s a post presenting a strategy for facet filtering that can handle any number of facets. The example posted there uses checkboxes for each facet instead of drop-lists and a predictive search, but the basic strategy is the same:

  • Create one filter per facet in OnLoad of the repeater or in OnPageLoad
  • Be sure that the ‘delete other filters’ checkbox for any filter is not checked, because you need all filters to be active simultaneously
  • Ensure each filter allows for the “nothing chosen” case: for you that would mean showing all rows for a facet if the dropdown says ‘Any’ (or if the search field is blank)
  • For each possible value a facet can have at the given moment, add an expression in that facet’s filter to handle that value. In the search case, of course, where you want to show all rows if the field is blank or, when not blank, rows that match the field’s non-blank value.
  • Force re-evaluation of the filter each time a drop-list or the search field changes its value.

That’s a brief summary that almost certainly makes zero sense at this point, but I suggest you check out the Live sample in the facet filters post I referenced above and read through the documentation describing how it works. The above should make sense after that.

I’ve adapted the strategy to use drop-lists and search-field facets (instead of grouped check-box facets) in the sample file below. A Google search led me to this fake data - I did not type it in!

Preview

File: facet_filters_with_droplists_and_predictive_search.rp (75.2 KB)


#4

Thank you for your reply! Much appreciated :slight_smile:


#5

Hello josephxbrick,

Thank you so much for your reply! I appreciate your time and your reply! I’m trying since the morning to follow your steps to create a combination of drop-lists and search-field facets in a very simple database! I managed to do the drop-lists work, but there’s something wrong with the search-field facet … I can not find the mistake, though. Do I need to enter the possible options to the search filed search?

I attached my simple version of the database, the version of following your steps is page 2 in case you can have time to see

Test Dartabase(Forum).rp (187.5 KB)

Thank you once again for your help! Very kind of you!

AndNik :slight_smile:


#6

Hello again, sorry for asking so many questions! After re-working my doc again, I couldn’t find the solution, so I thought of building up to your document. I have added another two dropdown lists with the same way as you did. By adding two additional dropdowns through the repeater is not visible and it seems that effects the other dropdown that used to work fine. Do I need to change the expression in the facet’s filter differently to handle the value? Facet filters and predictive search(Forum).rp (85.8 KB)

Thank you once again for your help! :slight_smile:


#7

Hi!

It turned out to be something easy to fix. String comparison is case sensitive, and your Material and Chronology dropdowns have “ANY” whereas the filter is looking for “Any”.

You can always change the filter remove case-sensitivity, especially if you allow the user to add rows:

[[ chosenMaterial.toLowerCase() == 'Any'.toLowerCase() || chosenMaterial.toLowerCase() == Item.Material.toLowerCase() ]]

But if you’re controlling the data, it works just as well just to be careful about capitalization.


#8

Thank you so much for the correction!! You explain everything so well and effective! Much appreciated :slight_smile:

All the best,
A :slight_smile: