Hi Mymojo.
If you want to reduce your selection please add "$and" clause with new "type" criteria you need.
You can store current filter type in LSV when user clicked on certain button. Just add "click" event handler on each button with following code:
pre
code
//Example for "beer" button.
localStorage.setItem("currentSelectedType", "beer");
//Invoke your query dataSource to update the list. You should replace "yourDataSource" with your query datasource name.
yourDataSource.execurte();
/code
/pre
Also you should modificate your "searchBox" return code with using "currentSelectedType" variable:
For example:
pre
code
//Get current selected type.
var currentSelectedType = localStorage.getItem("currentSelectedType");
//In this line of code you should add "$and" clause and new request criteria with using "currentSelectedType" variable.
return '{"$or":[{"Product":{"$regex":"(?=.' + value.replace(/ /g, ")(?=.") + ')","$options":"im"}},{"Type":{"$regex":"(?=.' + value.replace(/ /g, ")(?=.") + ')","$options":"im"}},{"Company":{"$regex":"(?=.' + value.replace(/ /g, ")(?=.") + ')","$options":"im"}}]}';
/code
/pre
Please read more about "$and" clause here: http://docs.appery.io/documentation/b...
Regards.