# Filter Search Results

**URL:** <https://forums.knack.com/t/filter-search-results/11942>\
**Category:** Get Answers\
**Created:** [January 25, 2022, 5:11pm UTC](https://forums.knack.com/t/filter-search-results/11942 "2022-01-25T17:11:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@Paul](https://forums.knack.com/u/Paul)\
**Post date:** [January 25, 2022, 5:11pm UTC](https://forums.knack.com/t/filter-search-results/11942/1 "2022-01-25T17:11:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![KnackPros](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/knackpros/32/807_2.png) [@KnackPros](https://forums.knack.com/u/KnackPros)\
**Post date:** [January 25, 2022, 8:11pm UTC](https://forums.knack.com/t/filter-search-results/11942/2 "2022-01-25T20:11:55Z")

</div>

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).

 ![Screen Shot 2022-01-25 at 12.04.27 PM](https://us1.discourse-cdn.com/flex020/uploads/knack/original/2X/6/627449609a24280c71bccd5fe943618d27f8e145.png)

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](https://knackpros.com)

---

<div class="post-metadata">

**Author:** ![Paul](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@Paul](https://forums.knack.com/u/Paul)\
**Post date:** [January 26, 2022, 7:55am UTC](https://forums.knack.com/t/filter-search-results/11942/3 "2022-01-26T07:55:43Z")

</div>

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
