loop
I am looking for some help on a buildship workflow. I have a firebase query that returns a filtered array of documents form a collection called "users". I then try to pass that array to a loop and inside that loop I use the flutterflow push notification send a push notification to the user, using information from the firestore documents in the array passed to the loop.
My problem is that I am unable to select fields inside the documents in the array passed to the loop. For instance I want to pull in the data from the word_title field for the Title of the push notification and summary_word for the Message field of the notification. I am unable to access that data from the array. Could you help?
I have tried using variables but I am unable to drill down into the loop items to select the correct fields. I have also tried to use dot notation to select the correct fields, such as "Title: {{item.reminder_list[0].word_title}}" or "Message: {{item.data.reminder_list[0].summary_word}}", but to no avail.
I am successfully sending a push notification for each document in the array from the firebase query. I am unable though to access data from those documents to input in the Title, Message, User Reference, and Parameter fields.
Screen-share below.
Thanks
https://www.loom.com/share/811c236cb6e647289c6f24cd7800d209?sid=6eda6ad1-a882-498b-b851-cd7673397e35
4 Replies
Processing...
🤖 Tuning in to the data frequencies. 📡 this might take a couple of minutes... beep boop
🤖 AI Response
You're on the right track: inside a BuildShip loop over a Firestore Collection Query result, each loop item represents a single document’s data, so you can access fields directly with expressions like {{item.word_title}}, {{item.summary_word}}, and {{item.user_id}}. If your Firestore document contains a nested array (e.g., reminder_list), you must access it with dot and index notation in the Value Expression Editor, such as {{item.reminder_list.title}} or by looping over item.reminder_list separately. For debugging, add a Log node inside the loop and print {{item}} to inspect the exact object structure, then adjust your expressions accordingly. The Value Expression Editor supports nested access and is the right place to verify these paths.
🔗 References:
1. https://www.youtube.com/watch?v=uZ8oXxQ8VL8
2. https://buildship.com/blog/chat-with-firebase-data
3. https://www.youtube.com/watch?v=9-RCaOhz_eE
4. https://buildship.com/blog/offline-data-app-with-firebase-backup
5. https://buildship.com/integrations/firestore
BuildShip AI Support
Hi @Zach_Plat I think is solved in our other conversation over Ambitious labs channel.
let me know if you're still facing issues.
Also, sent you an email reply regardig loop
TY!