Page 1 of 1

Rating Filter Results

Posted: Sun Mar 13, 2011 3:48 pm
by miplatt
Is there a way to have the results of filtering ranked according to how many filter values they fulfill?

For example, for a filter of "Company activity area" for which the user checked the filter values "industrial maintenance," "cleaning," and "industrial supply," is it possible to have the companies/records which fulfill all 3 of these values appear first, following by those which only fulfill 2 out of 3, and so forth?

Re: Rating Filter Results

Posted: Sun Mar 13, 2011 4:52 pm
by ZevToledano
The only solution I can think of uses a complex nested SQL query and this assumes that you are using a linked field for the filter. Any other kind of field wouldn't work.
i.e. the query would be something like: give me a list of records in table A that are linked to records x,y, z in table B, and sort by the count of records B grouped by record A with the same filter values.

Unluckily, this kind of complex query isn't currently possible in Clay, but 'nested query' support is planned for a future version (possibly 9.1).

Unless the filter values are always the same of course, then you can rank the records using automation rules and sort using this ranking field.