OR condition breaks when using contains Logged In User on a User list (Adalo filter bug?)

I’m filtering All Messages using an OR condition with two filters.

Condition A
Current Message > Question-receivers
contains
Logged In User

Condition B
Current Message > User > display_name
is equal to
Logged In User > display_name

Expected behavior
Messages should be shown if either condition matches.

Actual behavior

  • Condition A works correctly by itself

  • Condition B works correctly by itself

  • As soon as both conditions are combined with OR,
    Condition A (User list contains Logged In User) stops working

  • When both are applied, only messages matching Condition B appear

  • Messages that should match Condition A are not shown at all

Notes

  • Question-receivers is a list of Users

  • Logged In User is from the same User collection

  • This happens only when Condition A is combined with OR

Question

Is this a known limitation or bug where
contains (User list) fails when used inside an OR condition,
even though it works correctly on its own?

※Even with Responsive, it did not work under the same conditions.

Hi @Yuki.O,

From what I can see, this filtering should work. This worked before which suddenly stopped working? I would suggest you to submit a support ticket. : New Bug Form

Just a thought (and haven’t tested), what if you add a new filter like the condition B as an AND filter in the condition A filter group changing to, is not equal to?

Thank you and have great day!

Hey @Yuki.O, Regarding the (Condition A), can you please let me know what you mean by (It stops working)? So it doesn’t show any records or it shows wrong results?

Regarding, the (OR) condition combined with (Contains) relationships filters, I haven’t experienced issues with those cases before. Please try to create a new (Test) relationship, and add it as a filter inside the list with an (OR), and let me know if the issue persists, so we can check the source of the issue.

Also as a recommendation, please use (User ID) for filtering instead of (display_name) for more accuracy in filtering.

Hi, @Dilon and @Ali-Bazzi

Thanks for the clarification.

To answer your question first:
It shows wrong results, not empty results.

The issue is still not resolved.

To rule out any data corruption, I copied the app, rebuilt the database from scratch, and tested again with the minimum required setup only. I’d like to share the results.

Here is the test logic:

  • Filter A:
    Returns messages where the current message’s single receiver (only) has the same User ID as the logged-in user.

  • Filter B:
    Returns messages where the current message’s multiple receivers contain the logged-in user.

I then created test data exactly as shown in the screenshots.

Result:
Only messages matching Filter A are returned.
Messages that should match Filter B are not returned at all when combined with OR.

Additionally, I also tried recreating this on a new page using a new custom component and a new simple list, but these still does not work.

And It appears that filters placed under an OR condition do not work.

I also tested this by using a simple condition:
Current Message → individual receiver ID is not empty,
but no records were shown.

This happens consistently in the clean test app as well.

I urgently need this issue to be addressed.

Hi it has been solved. Thank you so much for all!!

: From @Dilon :slight_smile: With your variable names,

Condition A
Current Message > Question-receivers
contains
Logged In User
AND
Condition B
Current Message > User > display_name
is not equal to
Logged In User > display_name

OR

Condition B
Current Message > User > display_name
is equal to
Logged In User > display_name

Hey @Yuki.O,

You’re very welcome, I’m glad this issue has been solved.

You can check also some tips on database structuring/relationships (like filtering, many-to-many, or performance), on this post: A Practical Approach to Structuring Collections in Adalo

Good luck with the app!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.