I have a RG that searches for all Notifications that meets the following pseudo criteria
IF
Notification Address is within 15 kms OF
Vault 1…4 managed (associated to) by Current User’S Address AND
Type is Task Broadcast THEN
Display Notification’s Body text
The issue here is that even when a User has no (zero) Vaults associated the Notification is still being displayed.
Could you set a condition on the notification box to say “if current users vaults associated = 0” this is not visible??
The other thing: I have had a relatively similar scenario… double check that there is no contradiction in the syntax.
If somewhere along the line, the current user can be associated closely enough to the notifications criteria - that could be triggering it.
I’ve personally noticed in my app as well that it becomes more difficult to get things “air tight” as the complexity increases.
You obviously have a great understanding of bubble and your specifc app though.
I don’t know the answer to this issue - but those are my thoughts anyway.
So by design we ignore constraints when the value that is used in the constraint doesn’t exist (the reason being, for instance, if you some search criteria the user can set you usually want to ignore them if the user hasn’t set them, like a price limit). But it’s not always perfect…
So, in your case, a way to solve this would indeed be to have a condition on the repeating group that checks if the vault field is empty or not, and then define a different data source when the rep group is in this condition.
Bubble has come a long way since I tried to solve this, but the way I ended up doing this multiple location search was to have each “location” as a summary for the local area.
It wasn’t perfect, but each location (when created) also had reference to other nearby categories of location. So I only had to find the nearest, and then read the list on there.
It was (as you have seen ) pretty tortuous to do, but by doing it in advance it did mean I was able to debug in advance, rather than rely on a complex search on the fly.
And in the end I gave up and re-wrote my app to work in a different way. Basically people would “check in” with interesting things (and a category) in locations, and I could then pull back the top categories in your location. This was a similar search (find multiple nearby locations and sort them).
Because of this limitation in Bubble, I placed a limit on the list (Vaults) that a user can have. Therefore I was able to reference ‘item#’ to check against.
as suggested, for debugging I am displaying the distance between the Notification Address and all the 4 Vaults that is associated with the user by referencing the “item#” on the List search.
The issue is that when I do a search and specify a ‘search within’ distance of just 1 kms of any of the Vaults, it should not pick up the Notification listed below as this is at least 4.3 Kms of any of the Vaults (which there are only 2)