Filter Search Results

Hi,

I would like to filter search results by text formula:

Example: if the text formula for the object connection is:

Property 1 (For Sale)
Property 2 (Sold)
Property 3 (Pending)
Property 4 (Let)

How can I filter so only properties For Sale are show in the search results please?

Thank you,

Paul

Hi @Paul

I’m going to assume you’re not using the Knack Builder filter which already has the ability to filter by text formula by enabling filters (see image below).

Are you asking how to generate the filters in the URL, for example so you can copy/paste them into an email? For example do you want to know how this URL is created:

#my-app/?view_108_page=1&view_108_filters=%5B%7B"operator"%3A"is"%2C"value"%3A"1002"%2C"field"%3A"field_56"%7D%5D

If so, here’s how that URL looks when it’s decoded:

‘?view_108_filters={“match”:“and”,“rules”:[{“field”:“field_56”,“operator”:“is”,“value”:“1002”,“field_name”:“Text Formula”}]}&view_108_page=1’

You would replace the view number, field number, field name and value.

If you have any questions, or want to clarify your goal, feel free to reach out.

Thanks,
Ian
Knack Pros

Thanks for your reply Ian.

To explain the issue better here is knack supports reply to me:
" With how Knack works, and unfortunately, connection field filters are ‘and’ filters, which means all of the filters must be true to show a record in the dropdown. You may need to create a new option that captures both states; it’s not ideal but is one option."

I am working within the builder (but have wondered how URL filtering works). I have a dropdown field with about 12 options and I wanted to filter with ‘or’ when users search. So for example don’t show in the search records that are option 1 or 2. As knack support explained in this part of the builder only ‘and’ is possible so it would be don’t show option if it equals 1 and 2 which it never would because it’s a dropdown - so unless you are only ever going to filter one value the filter is a bit limited at this time.

I think for now the best solution for me is to have my original dropdown field and then create other text formula fields that are just a copy of the original dropdown field. That way I can filter as many times as I want as long as I am happy to keep adding fields which is ok until in six months time you wonder - why did I do that? I’ve made notes so I should be fine.

If you can think of a better way please do share. The core issue was staff members were finding too many records being returned when a large number were not applicable and needed filtering out.

Thanks again!

Paul