I have an app where users enter a bunch of data about a project via multiple forms. Each form corresponds with its own table within the app. There’s about 10 tables in total and most of them are normal single text datatypes - the user creates a project and their single answer counts against the project’s name and version. In other words it’s one response per question to one project/version.
Now, in a few tables, the user can record multiple entries under a project and version. For example, they might be detailing all the drugs they’re taking (name, dose, time of day, how many tables etc). So in this case, each drug might be considered a thing. A user could have multiple drugs each with its own variables. The form allows for this data collection and stores each additional response as its own thing, on a new row in the table. Each save of the form stamps the project name, and version so it’s clear what it belongs to.
For some reason I didn’t build such tables as lists of text, and I can’t exactly remember the reasons why, but a lot had to do with with the limitations of lists in bubble. I was satisfied that the data would be stored in the table nicely in its own row and I’d think about how to pull it out later - now is that later!
So, the blocker I’ve got now is this: as my app pulls these data into a document, I’ve created the Parent’s thing for the button that contains this workflow to ‘Search for the main database that links to all of these other tables’:first item.
Because of this expression, it pulls all the first items of those multiple rows (or pseudo-lists) I explained above. This expression disregards all other rows of data that match the project name and version constants I have set, and I need this data in the documents I’m generating.
In a repeating group Bubble allows me to simply do a ‘do a search for X table’ and add constraints. But when trying this when setting the data source in the group, it tells me that the table I’m trying to search is a list and I need specify the ‘first item’.
How can I use an expression as the data source for my ‘generate documents’ button so that it pulls all the data from the database and not just the first item, as long as the constraints are met?