Confusion about Firebase database query filter

Actions & Logic

Hi,
I am building an app that will grab a list of items from Firebase database and populate a list.
Now I want to do the following:

  • User create (lets say a listing) on the app that everyone else can view

  • Other users can vote for the listing item.

  • Users are also able to "follow" other users.

To do this, I have a "listing" collection like this:

  • UID (Who created the listing)

  • votedBy (a list of user ID of people who have voted)

In the "users" collection, I have this field that stores a list of people you follow:

  • following (list of user IDs)

Now, what I want to do is:

  • Show only items that are created by the people this user is following

  • Don't show items that the user has already voted.

So I am trying to apply these filters to the Query Collection in flutterflow:

  • userID (of user who created the poll) --- in --- following (user collection)

This gives me the filtered list of all listings that are created by people you follow.
Now to further filter this list so that it only shows listings that the logged in user has "NOT" voted, what do I need to do?

The only option available is:

  • votedBy ---> Array Contains / Array Contains Any

What I need is the opposite, "Array does not contains"

What have you tried so far?

I have described everything in the field above, so don't want to repeat it here.

Did you check FlutterFlow's Documentation for this topic?
Yes
1 reply