Alright, I am currently stuck. And the more I think my issue, the more confuse I get.
I am building a little writing app. The app contains multiple little tools for writing different kind of tasks (think of email subject lines, short stories etc.)
Each of these tools use AI and have their dedicated workflow with system prompt and all the good stuff.
Once the output has been generated, I can save it as a project. The project data type contains of these fields.
Data Type “Project”:
output = unique id of the writing output thing
project_name = User input value
project_owner = Current user
project_language = dropdown value
project_copy_type = Name of current writing tool
icon = Value from an option set
Workflow of saving a project:
- Create a new Project (fields, see above)
- Create a new Output Writing Tool XY (this also contains a field “project” which gets the value from “Result of step 1 (Create a new project)” so they’re “linked”
- Make changes to project (field output = Result of step 2’s unique id)
- Make changes to current user (projects add Result from step 1)
This works like a charm, but here comes the tricky part.
When the link “Projects” in the sidebar is clicked, I show a repeating group containing all projects. Each card has a “View” button that triggers a right drawer (side panel). This contains a reusable element. This again contains multiple groups, for each writing tool since they all have different ouputs and need to be formatted differently.
And here’s where I am stuck. I need to pass the project’s card data AND it’s linked writing tool data to my reusable to show the output (which contains multiple data type fields). I can display the current project’s data without problems, but then I miss the actual data from the linked tool’s output.
I thought since each saved output (project) only contains one writing tool and one output, it would be easier…
And since each writing tool has a different kind of output (I use a JSON response from the API and convert it into a JSON that bubble understands), I created a data type for each one to save the data.
I usually tend to overcomplicate things. So I am pretty sure I do a big mistake or overthinking stuff as usual. I hope my issue makes a bit of sense and any help is much appreciated