Forum Academy Marketplace Showcase Pricing Features

Either I'm wrong or Bubble is wrong but the checkboxes won't update the map

I’m pretty sure it’s me. I’ve spent all week–plus part of last week–trying to figure out how to use checkboxes to filter a repeating group, and display the results as a list of markers on a map.

Finally realized I need to use “contains list” in my expression, but that didn’t solve anything.

I’ve got a workflow set up for every time the checkbox values change, and I have a state that takes the Changes from the workflow, and creates a list.


I’ve read a handful of topics that discussed how to do this, so at this point I’ve just hammered the given syntax into my brain. And although everything seems to resolve correctly, I’m still not getting the expected behavior.

When i checked the inspector for the preview it reveals my state is empty.

I am attempting to take the list of obstacles produced by the state, and send it to a repeating group of skateparks. The repeating group checks whether the list of obstacles is in each skatepark, and sends the true results to the map.

I’m guessing I’m more “Rube Goldberg” than “striking gold” here with my weird little rigged up scenario. If anybody with more insight has any suggestions I would really appreciate it.

Hi there, @zach8… I’m not exactly sure what you’ve got going on there, but I think Rube Goldberg might be proud. :wink:

I have never displayed the results of a repeating group on a map before, but if you’ve got that part covered, I have a working example of a repeating group of skateparks being filtered by one or more obstacle checkboxes. The obstacles are defined in an option set, the obstacle checkboxes are displayed in a repeating group of their own, a custom state stores a list of the selected checkboxes, and an advanced filter is used on the repeating group of skateparks (each skatepark having their own list of obstacles that is also tied to the option set, of course) to show only those parks that include any/all of the selected obstacles.

So, does that sound like what you are trying to do? If it does and if you are interested in going down the path I described, I would be happy to provide screenshots if you want.

Hope this helps, even if it’s just food for thought.

Best…
Mike

Hahah thanks Mike! Passing the data back and forth tp that repeating group was something I came up with because I could not get the filter to work. I must be misunderstanding something essential about the expressions.

These are two ways I tried to configure the filter. To me it doesn’t make sense because I don’t expect the filter to resolve to the same data type as the search. If I do a search for Skateparks, and I want to filter based on the obstacles at the skatepark, the filter should resolve to an obstacle or list of obstacles, right? If you have any advice on what I’m misconstruing it would be tremendously appreciated Mike.

Just to clarify I have the data type Skatepark, and the data type Obstacle. Obstacle is also a field in Skatepark. Repeating group with checkboxes displays all the obstacle types with checkmarks, and then adds the corresponding obstacle to a state. The state’s obstacle list is checked against the obstacle list of each skatepark, and then the map displays the skateparks that contain the obstacles.

THANK YOU!


The filter should compare a list of obstacles that a user wants to a list of obstacles that a skatepark has, and it uses that filter to show the associated skateparks (which is ultimately what is being searched for).

Try an advanced filter that looks like this: Advanced: This Skatepark's skatepark_obstacles contains list RepeatingGroup Obstacle's Obstie Transfer.

If you are not familiar with advanced filters, the Advanced option is at the very bottom of the dropdown from which you selected skatepark_obstacles in the filter constraint.

Also, you may know this already, but advanced filters happen on the client side, so the system will pass all of the results from the skatepark search to the browser and then filter them there. So, that’s something to keep in mind from a performance perspective.

Thanks again Mike!

Unfortunately though, this is how I had it set up on a previous iteration and that doesn’t work either.

I attached screenshots below that show my preview inspector after I updated with the advanced filter again. It seems that “This skatepark” is not being recognized, because the inspector shows that expression as “null”.

Any thoughts? I don’t want to jump conclusions and insist Im in the midst of a bug, but this is beginning to feel like it may not be my logic. If the expressions are resolving correctly in the designer and workflow, and pointing to data that exists in the database, then why would I get a “null”?

I attached screenshots below. Thanks again!!!

Hmm… got any privacy rules in place on the Skatepark data type?

I don’t think it’s a bug because I have something very similar set up on my end, and it works as expected.

Yeah, skateparks are definitely publicy visible.

My original thought was that maybe the map’s list is static, and even though the functions are performed, the list of markers remains the same, and when the map’s list is called again it doesn’t update the results. That’s why I tried passing to the repeating group, and having the map call from there. But, no dice on that either.

I really appreciate you chopping this up and piecing it out with me. I been skateboarding long enough that I can deal with trying and trying and trying for a month, but at this point I have really exhausted my capacity to problem-solve the solutions that should work, or devise workarounds that produce the desired result. Thanks again Mike.

It’s my pleasure to try to help. Are you open to letting me take a peek under the hood? If so, shoot me a link (privately) to your editor, and I’m sure we can get it sorted out.

oh absolutely bro thank you!

Sending a DM now.

1 Like