I have a repeating group, it’s showing results from a search.
I want to now filter the results.
Now i know i can add a filter button, and then update the datasource of the repeating group through “display list in repeating group” but this is going to go back and do a complete new search, so i’m worried this will be slow. Plus i need to retype all the existing search results filters
So i want to be able to filter existing results, but somehow saying
Whatever the existing datasource is, just add this new filter to it, and therefore filter down existing results?
This is working exactly how you suggested, which is great.
One thing though.
When i perform a search is gives me searchresutls_X
Then when i filter, it filters against searchresutls_X (which is great), and therefore returns me a set of search results, lets call it searchresults_Y
Then when i filter again, it now filters against searchresults_Y
How can i make it so that it is always filtering against searchresults_X and not the latest filtering
Or alternatively, how could i change me UI?
I’m trying to make something like the yelp filter below.
See how you can turn on and off the filters, how could i setup that type of UI?
Where it filterest against the search results, but you can also turn off the search filter and it goes back to what it was.
Use a custom state to hold the value of the base search. Display list source would then be custom state’s value: filtered. This way, the custom state will always retain an original search and you can change filters in the display list source.
Sure thing. If the user is going to click a search button first before applying a filter, then do it at the search button click: set state > select an element to save this state to… create new state called base search… set what type of Thing this is a search of … check list > set the value of the state to the search.
Then when apply filter button is clicked > display list > source = element’s base search :filtered.
Now, if the search and filter are happening off a single click, then have those two actions in that same click workflow but add a condition to the set state action to only run when the state is empty.
If you have a clear search button that wipes everything, you’ll want to set state again and leave the value blank and “clear list” on you repeating group.