stwissel
stwissel

Reputation: 20384

Searching in a category filtered view

I have a view that is categorized by Country and then sorted by customer name - customer name is not unique (it is the list of jobs, so customers appear often). I can filter the view easily with a dropdown by country. Now I want to search inside the filtered view for customer. What's the best approach?

Upvotes: 1

Views: 354

Answers (4)

stwissel
stwissel

Reputation: 20384

The most promising approach, but not fully happy with it yet: - cache the countries (they don't change that often) to get a country selection - sort the view (not categorize) by country and customer - use a JSON datasource and a Dojo grid - there set the search to a vector with Country and Customer - Set exact match to false

It will start the grid at the customer but display more when you scroll down, but that's OK in my case.

Upvotes: 0

Thomas Adrian
Thomas Adrian

Reputation: 3636

I would create a collection with all the dropdown countries and do a search in the collection

Upvotes: 0

Thimo Jansen
Thimo Jansen

Reputation: 485

I don't know what the best solution would be, but what I would try is a full text search on a view. Create a query like "FIELD country contains 'us' AND FIELD username contains 'andy'". The value for country is taken from the drop down, the value for username for a text field.

Upvotes: 2

Russell Maher
Russell Maher

Reputation: 378

Based on my trials with this kind of functionality I believe the best approach is to manipulate a scoped collection/map of UNIDS as needed and then refresh a data table or repeat control as needed. Beyond very simple requirements I have not seen a way to implement this functionality simply.

Upvotes: 0

Related Questions