Advanced Filter Not Working Right now

I have a search that uses an advanced filter. I have set it up properly and the values are coming through properly, however, the search filtering is not working and I do not see any results, when I should be seeing one result.

The dynamic expression set in the editor

Screen Shot 2024-01-18 at 12.06.17 AM

The selected value in the debugger inspector tool

The value set in the database

Screen Shot 2024-01-18 at 12.08.11 AM

The constraints in the inspector tool - of course we still can not inspect an advanced filter to see what might be going wrong on our own.

Screen Shot 2024-01-18 at 12.08.01 AM

Please note, in the last screen shot, there are two advanced filters displayed…the first one and the second are set up exactly the same way, with one slight difference being they are for different value sets (options), other than that they are exactly the same, and what is very very frustrating is the first advanced filter works fine.

Even if I remove the first advanced filter from the search filter, the second (Purchase Categories Available) still doesn’t work.

Anybody else experiencing issues with Advanced Filters or have any ideas what I might have done wrong?

Just checked quickly my search that uses advanced filtering - it’s working.

I would print the both lists to some text fields to make sure they are expected value.

You showed the database version but maybe this profile-professional may not be the one you can see in the database.

Just for extra debugging.

Thanks @artemzheg and @hergin

I remembered that in the inspector tool, if there are issues concerning privacy rules that a red alert is there to indicate as such, now, unfortunately Bubble still doesn’t give us an ability to inspect advanced filters using the inspector tool, nor do they make alerts about privacy rules concerning data fields used by the Advanced Filters.

I checked the privacy rules of the client app and that is the source of the issue. This is yet another example of why I always build out functions first, test they work and only then do I add privacy rules and then test privacy rules work.

Ooooh, I strongly disagree with that - I’ve always done privacy rules first, work second. Privacy rules get built before I work on any user interface or front-end logic as it means that if something breaks, or there’s an issue with those privacy rules, I can identify it straight away. If you add privacy rules after, there’s always a larger risk of unintended bugs arising as a result of the newly added privacy rules.

2 Likes

Not if you test

Everybody has a way that works for them. For me, having privacy rules first is pointless as it is a simple task to go through once the entire database structure is in place and all functionality has been tested.

It is such a waste of time to try and debug something only to find out it is a privacy rule issue, whether that be you forgot to login as the correct user type, or specific user (in event privacy rules relate to other data types), or had not updated the privacy rules for a new data field (as in the case of myself with this post). Over 6 years of building on Bubble daily, I’ve wasted too much time trying to debug and resolve ‘issues’ only to stumble across them as being related to privacy rules. One area privacy rules can really cause some problems debugging while developing is when they affect data that is used in a workflow action, for which the debugger and step by step mode nor do the logs make clear is the reason for data not saving properly (as is the case if privacy rules make the data unavailable). I’ve also seen countless posts where a user is asking for help in understanding why certain data is not displaying (most of time User data since Bubble has adopted a strategy to implement privacy rules on User data from app creation).

For me, it is easier to build first, make sure all functions work properly, the entire database structure is known and implemented to then spend a couple of hours implementing the privacy rules and testing as the different user types to ensure the privacy rules work, that way, I am focused on one thing at a time — during development, prior to addition of privacy rules, I am focused on the one thing of does my logic, workflows and UI components function as intended — during implementation of privacy rules at the very end, focused on one thing, privacy rules so as to keep them on top of mind and avoid simple mistakes that can be costly in terms of wasted time, such as not being logged in while testing or not testing as the correct user type etc.

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.