nextcloud / tables

🍱 Nextcloud tables app
https://apps.nextcloud.com/apps/tables
GNU Affero General Public License v3.0
143 stars 24 forks source link

Link to another table row or table Relationship #1249

Closed NikoKS closed 1 month ago

NikoKS commented 2 months ago

Is your feature request related to a problem? Please describe.

Not sure if this is already requested under different description, but can't seem to find issues for this basic request.

Is there a way that a table can have a relationship with another table like in a database?

For example, a product can have a brand. Where Products and Brands have their own table, and I can link the brand of the product from the product row.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

JensUweB commented 1 month ago

I couldn't find anything besides your issue about this either. I would love to see this feature. Our use case would basically look like this:

We are an martial arts club. We have a table with a list of all our students with active / inactive flag, rank, join / leave date etc. I want to add another table like Attendance to track which student attended on what training date. When I add a new row to Attendance, I want to select the students from the Students table (bonus point if I could filter out inactive students) in one field like a multi select. I guess this would be a many to many relation in this case.

enjeck commented 1 month ago

duplicate of https://github.com/nextcloud/tables/issues/172

How do you imagine it working UI wise, btw? Selecting from a dropdown of other tables/rows?

JensUweB commented 1 month ago

@enjeck I would add a new column type for this where you select a table from a dropdown or search (like selecting a table in a link column), then you select one of the columns from that table as the label to display and at last a radio button for single / multi selection. Then when you insert a new row, you have a dropdown to select one (or multiple) of the rows from the previously defined table.

I created some mockups to show roughly how I imagine the ui part:

Create Column

Create Row