Filter Document Reference by its subcollection?

Actions & Logic

I have a collection with a subcollection of documents. When a user chooses some of the documents, they get added as a document reference to a field in the user document.

I'd like to filter by collection ("trail"), and count the number of documents ("chapters") added. But I can't quite seem to get the filtering to work.

I think I want to do a Backend Query of the Subcollection Documents, filtered by the Parent Collection. But I might be thinking about it wrong. Any suggestions are very welcome!

What have you tried so far?

Filters, queries, list views, custom actions.

Did you check FlutterFlow's Documentation for this topic?
Yes
4
4 replies