Dynamic route to a collection group in Firestore

I am trying to stablish a dataSheet to list a collection inside a group collection. The collection id that I have is:

group:preloads/$slot(‘ds_preloadName’)/learnMode

However I get this error message:

Isn’t it possible to add the dynamic value of the dataSlot to a collection group in Firestore?

I achieved to get what I needed with a workaround. I added a field in each document with the preloadName and I just pointed the “group:learnMode” and added a query where the preloadName is equal to the dataSlot containing the value and it is working.

I guess it is not possible to do it the way I was trying to but I believe it is not innapropriate to do it how I approached later on.

Thank you!

1 Like

Hi, I think that you should simply type the name of the collection instead the path of the collection. Collection groups work like this: https://firebase.googleblog.com/2019/06/understanding-collection-group-queries.html