# Make filters work together

**URL:** <https://forum.bubble.io/t/make-filters-work-together/82734>\
**Category:** App Organization\
**Created:** [March 21, 2020, 11:26am UTC](https://forum.bubble.io/t/make-filters-work-together/82734 "2020-03-21T11:26:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjuujosephh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sanjuujosephh/32/55131_2.png) [@sanjuujosephh](https://forum.bubble.io/u/sanjuujosephh)\
**Post date:** [March 21, 2020, 11:26am UTC](https://forum.bubble.io/t/make-filters-work-together/82734/1 "2020-03-21T11:26:30Z")

</div>

Hi,  
I have a filter by Category & filter by Up votes.  
They aren’t working together.

If I use sort by up votes, the category dropdown won’t work later.  
How can I have both filters work together?

Category sorting is created by adding a constraint.  
Upvote sorting is done by using Display list under Element actions.

Please help

---

<div class="post-metadata">

**Author:** ![sanjuujosephh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sanjuujosephh/32/55131_2.png) [@sanjuujosephh](https://forum.bubble.io/u/sanjuujosephh)\
**Post date:** [March 22, 2020, 5:28pm UTC](https://forum.bubble.io/t/make-filters-work-together/82734/2 "2020-03-22T17:28:34Z")

</div>

Anybody? Somebody? Nobody?

---

<div class="post-metadata">

**Author:** ![SerPounce](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/serpounce/32/62068_2.png) [@SerPounce](https://forum.bubble.io/u/SerPounce)\
**Post date:** [March 22, 2020, 5:34pm UTC](https://forum.bubble.io/t/make-filters-work-together/82734/3 "2020-03-22T17:34:23Z")

</div>

If you share screen shots and / or the app, you will get better responses as folks will be able to help determine the problem.

---

<div class="post-metadata">

**Author:** ![sanjuujosephh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sanjuujosephh/32/55131_2.png) [@sanjuujosephh](https://forum.bubble.io/u/sanjuujosephh)\
**Post date:** [March 22, 2020, 5:38pm UTC](https://forum.bubble.io/t/make-filters-work-together/82734/4 "2020-03-22T17:38:21Z")

</div>

![Fresherslearning (1)](https://us1.discourse-cdn.com/bubble/original/3X/b/3/b318cb823e87db4190c7acc4f39a4c427a95c2a5.png)

I have these 2 filters  
Category sorting is created by adding a constraint.  
Upvote sorting is done by using Display list under Element actions.

If I sort it by Popular or Latest and then try choosing category, it doesn’t work. These 2 different sorting don’t seem to work together

---

<div class="post-metadata">

**Author:** ![SerPounce](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/serpounce/32/62068_2.png) [@SerPounce](https://forum.bubble.io/u/SerPounce)\
**Post date:** [March 22, 2020, 5:40pm UTC](https://forum.bubble.io/t/make-filters-work-together/82734/5 "2020-03-22T17:40:09Z")

</div>

They definitely can work together, but until we see how you’ve set up the search and constraints in your RG, its impossible to tell where the problem is.

---

<div class="post-metadata">

**Author:** ![sanjuujosephh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sanjuujosephh/32/55131_2.png) [@sanjuujosephh](https://forum.bubble.io/u/sanjuujosephh)\
**Post date:** [March 22, 2020, 6:05pm UTC](https://forum.bubble.io/t/make-filters-work-together/82734/6 "2020-03-22T18:05:23Z")

</div>

![the HUB Orginal Bubble Editor (3)](https://us1.discourse-cdn.com/bubble/original/3X/f/0/f0bc0f8bf7f8bbc22d625714dcea428c7399f911.png) ![the HUB Orginal Bubble Editor (2)](https://us1.discourse-cdn.com/bubble/original/3X/3/1/318cccba89ce50fe960b864df7cd8c4b06b77d7e.png)

This is how I have set up. What have I done wrong?

---

<div class="post-metadata">

**Author:** ![SerPounce](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/serpounce/32/62068_2.png) [@SerPounce](https://forum.bubble.io/u/SerPounce)\
**Post date:** [March 22, 2020, 6:16pm UTC](https://forum.bubble.io/t/make-filters-work-together/82734/7 "2020-03-22T18:16:36Z")

</div>

You can try the way you have setup, but I would not use a workflow to change the data source list. let’s rather try by doing some cool stuff in the actual RG’s datasource as follows:

1. Create a new custom state on the page, called something like “sortOrder”. Make it type text and give it a default value of “Created Date”.
2. In the data source of your RG, change the Sort by to be “Change Which field”. In the dynamic field name enter the name of your custom state “sortOrder”.
3. Change the workflow on click of Text Popular to be set element custom state “sortOrder” to “Resource Upvote”.
4. Repeat step 3 for your other text element to set back to Created Date on click.

That ought to do it 🙂

---

<div class="post-metadata">

**Author:** ![sanjuujosephh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sanjuujosephh/32/55131_2.png) [@sanjuujosephh](https://forum.bubble.io/u/sanjuujosephh)\
**Post date:** [March 22, 2020, 6:28pm UTC](https://forum.bubble.io/t/make-filters-work-together/82734/8 "2020-03-22T18:28:20Z")

</div>

Sorry but where do I create a custom state?

---

<div class="post-metadata">

**Author:** ![SerPounce](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/serpounce/32/62068_2.png) [@SerPounce](https://forum.bubble.io/u/SerPounce)\
**Post date:** [March 22, 2020, 6:31pm UTC](https://forum.bubble.io/t/make-filters-work-together/82734/9 "2020-03-22T18:31:14Z")

</div>

1. Select your page.

 ![create state](https://us1.discourse-cdn.com/bubble/original/3X/d/8/d80827730fdee8095ccf04ac6e7ac9becefab03b.png)

---

<div class="post-metadata">

**Author:** ![sanjuujosephh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sanjuujosephh/32/55131_2.png) [@sanjuujosephh](https://forum.bubble.io/u/sanjuujosephh)\
**Post date:** [March 22, 2020, 7:17pm UTC](https://forum.bubble.io/t/make-filters-work-together/82734/10 "2020-03-22T19:17:36Z")

</div>

Gotcha bro,  
What do you mean by “set element custom state “sortOrder” to “Resource Upvote”.”

---

<div class="post-metadata">

**Author:** ![SerPounce](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/serpounce/32/62068_2.png) [@SerPounce](https://forum.bubble.io/u/SerPounce)\
**Post date:** [March 22, 2020, 7:35pm UTC](https://forum.bubble.io/t/make-filters-work-together/82734/11 "2020-03-22T19:35:54Z")

</div>

In your workflow action, make it “set state”. Then for the element select the name of your page. Then select your custom state. Then type in “Resource Upvote”.

---

<div class="post-metadata">

**Author:** ![sanjuujosephh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sanjuujosephh/32/55131_2.png) [@sanjuujosephh](https://forum.bubble.io/u/sanjuujosephh)\
**Post date:** [March 22, 2020, 7:53pm UTC](https://forum.bubble.io/t/make-filters-work-together/82734/12 "2020-03-22T19:53:34Z")

</div>

Done! Step 2 is causing problem. The RG content doesn’t show up  
I chose “Change Which Field”  
Typed in the Custom state name in the Dynamic Field Name.

---

<div class="post-metadata">

**Author:** ![patricia](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/patricia/32/57583_2.png) [@patricia](https://forum.bubble.io/u/patricia)\
**Post date:** [April 2, 2020, 9:59am UTC](https://forum.bubble.io/t/make-filters-work-together/82734/13 "2020-04-02T09:59:54Z")

</div>

Going back to your original approach @sanjuujosephh, what do you mean when you say that the _“dropdown won’t work later”_? Is it that the dropdown does not function or that it drops down and you select but the workflow does not run? Or, is it that the workflow runs but does not do what you expected it to do?

---

<div class="post-metadata">

**Author:** ![sanjuujosephh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sanjuujosephh/32/55131_2.png) [@sanjuujosephh](https://forum.bubble.io/u/sanjuujosephh)\
**Post date:** [April 2, 2020, 10:05am UTC](https://forum.bubble.io/t/make-filters-work-together/82734/14 "2020-04-02T10:05:05Z")

</div>

If I was to sort the RG by Latest or Popular,  
then try using the category dropdown to further sort the RG, the dropdown doesn’t work.  
I will have to refresh the page to use the category dropdown.  
Same happens when I use the category dropdown first & then try to further filter using Latest or Popular, it won’t work.

They don’t work together. I can use only one filter. I gotta refresh the page to use the other

---

<div class="post-metadata">

**Author:** ![patricia](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/patricia/32/57583_2.png) [@patricia](https://forum.bubble.io/u/patricia)\
**Post date:** [April 2, 2020, 10:15am UTC](https://forum.bubble.io/t/make-filters-work-together/82734/15 "2020-04-02T10:15:26Z")

</div>

So the dropdown does work - you can click it and see the list and pick an item. It is that the RG list won’t sort by Category. So let’s do a little more diagnosis here:

1. I assume that category determines what appears in the list and popular/latest determines what order the items in the chosen category are listed. Am I correct?

2. I assume that when you later select Category you want the new category items to be listed and the popular/latest reset. Am I correct?

3. Please show me the workflow for the Category dropdown. I do see the Search with constraint but I need to see the workflow too.

---

<div class="post-metadata">

**Author:** ![sanjuujosephh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sanjuujosephh/32/55131_2.png) [@sanjuujosephh](https://forum.bubble.io/u/sanjuujosephh)\
**Post date:** [April 2, 2020, 10:20am UTC](https://forum.bubble.io/t/make-filters-work-together/82734/16 "2020-04-02T10:20:07Z")

</div>

Yep, I wanna be able to use the filters use together

Here’s the workflow of Category Filter  
 ![the HUB Orginal Bubble Editor (2)](https://us1.discourse-cdn.com/bubble/original/3X/3/1/318cccba89ce50fe960b864df7cd8c4b06b77d7e.png)

Here’s the one for Popular sorting

 ![f0bc0f8bf7f8bbc22d625714dcea428c7399f911_2_1035x370](https://us1.discourse-cdn.com/bubble/original/3X/5/c/5c2da9c6dd373b28cfa322504d889bd7d888b838.png)

---

<div class="post-metadata">

**Author:** ![patricia](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/patricia/32/57583_2.png) [@patricia](https://forum.bubble.io/u/patricia)\
**Post date:** [April 2, 2020, 10:26am UTC](https://forum.bubble.io/t/make-filters-work-together/82734/17 "2020-04-02T10:26:56Z")

</div>

That is the image you had earlier. I need to see the workflow that operates the Category dropdown please. Or it might be faster if you set your app to _everyone can view_ in settings and post a link to the app editor. I can dive in and take a quick look around without having to keep asking questions. It is easy enough to do what you want but I need to be clear on the approach you are adopting.

---

<div class="post-metadata">

**Author:** ![sanjuujosephh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sanjuujosephh/32/55131_2.png) [@sanjuujosephh](https://forum.bubble.io/u/sanjuujosephh)\
**Post date:** [April 2, 2020, 11:07am UTC](https://forum.bubble.io/t/make-filters-work-together/82734/18 "2020-04-02T11:07:41Z")

</div>

Please check your inbox

---

<div class="post-metadata">

**Author:** ![patricia](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/patricia/32/57583_2.png) [@patricia](https://forum.bubble.io/u/patricia)\
**Post date:** [April 2, 2020, 11:20am UTC](https://forum.bubble.io/t/make-filters-work-together/82734/19 "2020-04-02T11:20:09Z")

</div>

Ok. I see the problem. You have no workflow happening when the user makes a selection on the Dropdown. Right click on the dropdown and at the bottom of the menu click Start/Edit Workflow. Then create an action to change your RG using a Search for eBook and search for that category.

The easiest way is to simply reset the sort order to whichever you want as default. If you want to keep the sort order to be what the user last pressed (Popular or Latest) then you would have to use a custom state as @SerPounce suggest but one would suffice and that should be set every time the user presses a button. Then your Do a Search for could use the custom state’s value in the Sort field.

If you get stuck post an image and I’ll try to help but I will be offline in 20 or 30 minutes.

---

<div class="post-metadata">

**Author:** ![sanjuujosephh](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/sanjuujosephh/32/55131_2.png) [@sanjuujosephh](https://forum.bubble.io/u/sanjuujosephh)\
**Post date:** [April 2, 2020, 11:29am UTC](https://forum.bubble.io/t/make-filters-work-together/82734/20 "2020-04-02T11:29:25Z")

</div>

“create an action to change your RG using a Search for eBook and search for that category.”  
How do I do this? I didn’t understand this part.

[Next page](https://forum.bubble.io/t/make-filters-work-together/82734.md?page=2)
