Generate PDF while mapping data from subcollection w/ docref.

Widgets & Design

Hi there, I am trying to generate a PDF. The PDF has a table and continues “endless" depending on the users usage. It is a journal for driver. So I have create a collection called "monthly" to fetch collect all the data for one month. This collection has to subcollection:

  1. "dayJournal"

  2. "dayTrip"

dayJorunal collects data for the specific day. dayTrip is the specific trip information e.g. from where, how much etc. The "monthly" collection stores the doc refs from "dayJorunal" and "dayJournal" stores the doc refs from the "dayTrip".

Now I want to create a PDF using this information. First I tried to save everything in arrays in "monthly" but this is not working because firestore does not support repeating values. I have a field called "PaymentMethod" and as soon as the value would "duplicate" it won’t be saved in the "monthly" collection. Which forces me to map from the reference of the docs and then "choose" the specific field from "dayTrip".

I am very new to Flutterflow and especially to the customized functions... I was wondering if its even possible what I am asking for.

What have you tried so far?

I tried to ask AI and see if there is any solution. I feel like my inquiry is very specific and can not be answered by AI... I would appreciate and kind of help or solution. Maybe there is a completely different approach that I am not aware of...

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