How to use the "where" filter in the Firestore Query module?

The way these modules usually work is you specify :

  1. The field name in the where - yours is giftList

  2. then you use the operator you want which are defined here but in Make these are now just described as a drop down so you gotta make sure you’re using the right operator for what you are trying to evaluate.

If giftList is an array than you use String: Array contains which maps to ARRAY_CONTAINS.

  1. The issue here is that giftList appears to be an array of collections with key value pairs and I assume this is is coming out of Firebase. So I am wondering if the ARRAY_CONTAINS operator will work. I don’t know what the b operator needs to be for Firebase to search all he collections in giftList for your uid:“string” value pair. I wonder if you could use to toCollection() function to create the proper key value pair of your uid and cb488… string and that is what Firebase expects. Right now it is just searching for the string you’re providing and that will return zero bundles since it is not searching the collection properly.

The issue here is not Make per se, it is wholly dependent on your understanding of the data you are working with an how the Firestore Query Module syntax works with collections in Forestore and how to create the proper where clause.

ps. Make is for sure a lo-code tool since you have to understand the data structures intimately. It is more of a layer on top of the APIs and provides almost infinite flexibility as long as you understand what the API needs to “accept” to properly do its job. I suggest maybe testing the query filter in the Firebase API docs or in Postman first.

3 Likes