Mosses
 · [moe-zus]

Sub Collection Array Query Conundrum

Database & APIs
Resolved

I'm experiencing a little dilemma when querying lists within multiple documents of a sub collection.

Here's a sample of the current DB setup:

Parent Collection (Reports)
———Document XYZ
——————Sub Collection (Photos)
—————————Document A
————————————Photo URL (list)
————————————Created By (string)
————————————Post Reference (reference to Document XYZ)
—————————Document B
————————————Photo URL (list)
————————————Created By (string)
————————————Post Reference (reference to Document XYZ)

Here's the widget tree:

Container (Query Collection of Photos)—there's a parameter referencing Document XYZ
——— Column (Generating Children form Variable)
—————— Image

The issue I'm experiencing is as following, based on different settings:

Setup 1: Getting a list of only Document A

Setup 2: Getting first image of each Document

Expected result:

I need to get a list of all images (Photo URLs) within all documents in the Sub Collection (Photos) found in Document XYZ.

Guidance is appreciated.

What have you tried so far?

Many variations of query collection and children generations.

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