Dynamic Firestore (or any) query

I have a bunch of input text boxes that I want to use to be able to search for users in my Firestore database.

Is there any way to get Retool to ignore the WHERE statements for those input boxes that have not been entered?

For example: If I search for the first name "John" it won't be give any results because it's also checking for documents where the other fields are blank.

I would like to use it so that it only uses WHERE statements where something has been inputted in a text box.

Hoping someone can assist!

Hi @DB56 you can conditionally set the WHERE clauses as follows (please see screenshot) so that if a condition is set, it will check for it. Otherwise, if the input doesn't have a value, it won't use it to filter. Hope this helps!

1 Like