Accessing/Searching for non direct linked Data Types

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:

  1. Create a new Project (fields, see above)
  2. 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”
  3. Make changes to project (field output = Result of step 2’s unique id)
  4. 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 :slight_smile:

Hey @bubble125 :wave:

If I understand your question correctly. You are trying to pass 1 standard (Project data) and multiple different (many tool data) to a reusable. And not all of these multiple tool data might be filled depending on the scenario.

If this is the case, you can pass all tool data as separate properties to the reusable and within the reusable, depending on these tool data is empty or not, you can do different things.

See the below setting for a reusable:
image

The main data of the reusable is Project Data and then there are 3 optional data from 3 tools (You said you have created different data types for each API call because they have different structure. Tool1 Data, Tool2 Data etc are these data types). You can do whatever you want from then on.

I hope this helps :wink:

bdk_512x512 @Huseyin from Flusk | Discover the #1 Security and Monitoring Tool for Bubble

1 Like

Hey @flusk This was exactly the input I needed! Thank you so much :slight_smile:

1 Like