I now want to be able to add or delete new Rows with different Products or edit fields in a specific row.
To make it more understandable lets just do it in the example of indication: Rücken (Back) is defined through a middle table between a health offer table and indications table:
(The offers are stored the same way in the healthoffer table)
now if i want to add or delete a relation in the middle table i would do it through a form in app view? (It has to be done in the app view). But how do i know which id to select if all i see is the app view table like above?
Am I making this more complicated than it has to be?
In the final product, this table should be editable by in the app view without having to go to the database.
I've re-read your post a few times and I believe I understand the functionality you are looking for, though implementing it for your specific case will likely require some additional pieces. We can hopefully work these out along the way.
For starters, your main app view (I'll just call this an App) shows a Product entry but I am not sure where that is being pulled from. If the Indications column is editable, you should be able to add queries in your App which pull the middle-table values so that you can set mapped options from this table to be selectable from the main table. Here is an example of a couple of these concepts in practice:
I have made one of my relations a FK tied to a relation1 DB using the relationName field as the display data and the other a FK tied to a relation2 DB using the ID (auto-incrementing integer PK) as the display data. You can see that the table display is showing the name for both columns (due to the Content Mapping setup). This requires you to pull the middle table (query22 is just 'SELECT * FROM "relations2"') but then will show you those underlying values for editing:
For the indications and offers, is part of your intention to be able to add new indications/offers that aren't already stored in the middle tables? If so, you'll likely want to implement an interaction for a modal window that can add/delete new items to these middle-tables.
So my intended use is that the databse will serve for a single source of truth on all offers a hhealth insurance has.
Theres a set amount of indications, inclusion/exclusion criteria and so on.
If the insurance adds a new health offer to their their database it should happen in an interface and not by manually adding the relations in the database.
I imagined something like a form where you can enter new information like name, webiste and so on and then choose from existing criteria, indications ... (the ones saved in specific tables like indications).
But to show all information of the offer in the table this would mean that the form somehow knows that if i add indication1 to an offer it has to create a relation in a middle table between the offer id and indication id.
Similarily there should be a function to edit offers or delete them/ certain aspects.
I believe you can connect the dots through this process with the ability to add rows on a modal form. Tables also have an add rows functionality that allows you to enter in a single entry at a time (with a table save event handler). A benefit of using modals this way is that you can easily add in other interactive steps, like being able to push new data to the middle relational tables.
For instance, your idea of a modal form:
...could have a submission step that updates the middle table on submission of the new offer or allows you to access a different modal to add new indications. Then, you can use row actions to delete a row from your offer table or update the details (another modal or side drawer could be used here -- or you could make fields editable and write save actions for the table).
To do all this you should focus on how the event handlers are setup and chained together. There's a pretty stark difference between setting up a bunch of events from a single button click versus using an OnSuccess event within your queries.
I could help you work through some of the setup steps you need, but it'd require some more details about your app setup and desired workflows via screenshots.