Make filters work together

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

Anybody? Somebody? Nobody?

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

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

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.

the HUB   Orginal     Bubble Editor (2)

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

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 :slight_smile:

1 Like

Sorry but where do I create a custom state?

  1. Select your page.

1 Like

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

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

1 Like

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.

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?

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

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.

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

Here’s the workflow of Category Filter
the HUB   Orginal     Bubble Editor (2)

Here’s the one for Popular sorting

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.

Please check your inbox

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.

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