Example: Multiple Groups Filter


Demonstrates

Links for this example

About this example

Shows how to filter a database collection using option groups each with multiple options. This type of filter is often used in online stores. The filter uses the .hasSome() function, which checks if a database collection field contains any of the selected values from each option group.

5 Likes

Thank you for you help it make my work much faster.
But i have some questions how can i put a reset button on this code i have put on like

let applicationFilter = $w("#checkboxGroup1");
applicationFilter.default = !applicationFilter.default;

but this one does not let the checkbox get check again.

and also i want to put a text that shows how much you have selected is that possible?

to reset the checkbox group:

$w('#checkboxGroup1,#checkboxGroup2').selectedIndices=[]; 

Can a partial filter be setup with this? For example, if I entered “Indoor or Outdoor” in the lighting requirements database field, could this filter retrieve the item if someone selected “indoor” or “outdoor” from the selections. Basically, I’m trying to avoid having to have a third choice, and just retrieve items based on a partial match.

Would you tell me how to set this up if I wanted to show all the flowers when the flower checkbox was checked AND then the ‘African Violets’ required both ‘indoor’ and ‘outdoor’ light?

1 Like

I want drop-down checklist with multiple check option. Please tell me

Multi-Select Dropdown
Create a dropdown menu with checkboxes and search a database using multiple filters.

1 Like

@yisrael-wix Hello Yisrael, I strongly uggest that we apply filter as in “Store function” for Repeater, please kindly consider and advise, thanks

1 Like

@tungoslo8 Please explain what you want to do.

1 Like

@yisrael-wix Thanks for response, really appreciate!
I would like to filter price range and add sort function like Store, pls check attached photo and advise, thanks a lot

1 Like

@tungoslo8 No problem to do this with a little code and using the appropriate components.

1 Like

@yisrael-wix Thanks a lot, as I am not a coder, could you pls give me a more specific instruction?

@tungoslo8 We are unable to provide full code solutions. Wix provides many resources to help users learn how to get the most out of Corvid. We encourage users to take advantage of these resources which include video tutorials, full app examples (which can be loaded into the user’s editor), API documentation, and a wealth of articles describing a wide range of topics - from beginner to advance.

You may want to check out the WixArena - it’s a hub where you can look for Corvid (and other) experts for hire.

1 Like

@yisrael-wix How to make it work with multiple reference fields?

@yisrael-wix - Thanks for your support. I could use some help with the 2 following questions please:

  1. Any way to add a total count (as label) next to each group option, which would dynamically change based on the filtering? if possible, could you happily create an example?
  2. If an option’s count is 0, anyway to disable the option so it can’t be selectable?

example attached below
Thanks

Please follow our Forum Guidelines and add a new post about your issue.
This post will now be closed.