Hello bubble community,
I would like to ask the community for help. I have had a read through the following threads:
how-to-set-or-not-and-in-a-repeating-group-search
advanced-filter-multi-constraints-context
repeating-group-filtering-from-a-custom-states-selection-list
how-to-set-parameter-as-a-list
searching-using-multi-dropdown-possible-alternative-incompatible-type
list-shifter-reverse-rotate-swap-and-iterate-loop-over-bubble-lists-now-at-v1-4-adds-numeric-option-get-index-action
These articles helped me to understand the limitations of “do a search for” with constraints and :filter → advanced: “intersect with”, “contains” etc.
I am able to make the filtering work the way I want but there is a limitation of RG that I can use only 4 conditionals. I need 7 conditionals. I was hoping you could give your opinion and help me in solving the following case:
I have a Calendar Element from jared.gibb:
I have the following filter parameters:
- Event Type[Single text on Event]: Class or Party
- LocationText[Single text on Event]: Hamburg, Berlin, Bremen, Hannover
- Typedance[List of texts on Event]: Bachata, Salsa on1, Salsa on2, Salsa Cubana, Zouk, Kizomba
Then I have created an Event Object in the DB. Event can have only 1 Location and 1 Event Type but can have multiple dance styles.
Example data:
What I have found reading all the threads is that custom events are the way to go with multiple constraints, but I have not found a thorough solution of how to do it. On top of that I am not sure if the custom events is the way to go if we are filtering via non-repeating group element like this calendar. (Although I think under the hood it is still an RG).
Anyway, what I am looking for is:
Default value on load: All events (so parties and classes) which LocationText is Hamburg.
Then in the interface, using filters the user should be able to:
a) Type dance → show ANY events that match either bachata or salsa on1 or salsa on2
AND (if user selected Berlin as location)
b) Show only results in Berlin that match 1.
AND (if user selected Hannover)
c) Show only results in Berlin, Hannover that match 1.
AND (if user selected Party)
d) Show only results in Berlin, Hannover that match 1 and are Parties (no classes please)
But I would also need:
a) (if user selected ONLY Berlin as location)
Show all results in Berlin that are parties and classes and with all dance styles.
OR
a) (if user selected only Party as event type)
Show all Parties results that are in Hamburg, Berlin, Hannover, Beremen… and with all dance styles.
First, to test the filtering logic I am indeed using RG’s. But then I would like to move that to the calendar once it is working. In total I would need 7 conditionals but the RG is allowing me to add only 4 conditionals!!! Is this a bug?!
What is already working is:
- Find any events where Location Text is inside of the Custom State (Location-List-Options).
Next two screenshots are showing that if I select Hamburg and then select Berlin, any events matching these criteria will show on the RG.
-
Find any events where EventType is inside of the Custom State (EventType-List-Options).
-
Then Filtering List of things using intersect with.
Do a search for Events:filtered -> Advanced: Find any events where index'sCustomState (DanceStyles-List-Options)'Display intersects with This Events's Typedance:count>0
Events’s Typedance is a comma separated list of text (see example data). This also works and displays any event that matches any of the typedace such as bachata, salsa on1, salsa on2.
The issue starts when I want to combine 1 AND 2, 1 AND 3, 2 AND 3, 1 AND 2 AND 3 because there is not enough conditional statements available on the group. So I guess the custom event solution is the only option here.
What would be the custom event solution to this filter romanmg is suggesting? Will that work for this calendar element as well?
Please have a look into the app. I have created a RG that tries to combine the search filters. Seeing it live might help you understand the issue better.
Thanks you your help.