Constraining "link to table" field to accept one or many rows

Could there be an option to define during column “link to table” creation if the field should accept many or just one reference row from another table?
I have a use case when only one relationship makes sense and I wouldn’t like to relay on users to remember that.

1 Like

Hey @simplynail :wave:

You can keep tabs on the status of this feature request here:

1 Like

Thanks @HiramFromTheChi, will track that!

2 Likes

Hi! I would be happy to see this feature in Baserow because so often need to make sure a linked field only has one record. For example, user by mistake can put many customers on one order or add few payments to a single transaction.

For instance, I have a table with financial details in Baserow. To make sure there’s only one item linked, I created an extra field that checks how many items are linked and shows an error if there’s more than one)) This method, though, makes everything more complicated. Adding a limit to the number of connected elements would greatly simplify the complexity of the tables.

If this will be implemented, it surely should be optional (f.e. one additional checkbox when creating the link-to-table field). In my use case I have a table with link-to-table field where I need that it can accept more than just one item from linked table.
So yes, this feature can be useful, but should be made as an additional option.

Hey @Alexander and @marcus, please use this issue Limit link to table amount of relationships (one to many) (#403) · Issues · Baserow / baserow · GitLab to track the progress.

Since this feature has already been accepted, could you please copy and paste your comments about it to GitLab? This way, we can ensure that the developer who picks up this issue will see and consider your suggestions. Thank you! :slightly_smiling_face:

Any status on this request? This is kind of a really necessary feature. We don’t want every single link to table to allow one to many. I’d say that for many use cases you require to enforce a one relationship as opposed to a many, like the original example, of only allowing one customer per order.

Hi @ddsgad, unfortunately, there are no updates yet. Please feel free to upvote the request on GitLab: Limit link to table amount of relationships (one to many) (#403) · Issues · Baserow / baserow · GitLab. We always try to prioritize issues with the highest number of upvotes from the community. :slightly_smiling_face:

Thanks, I saw that issue, but it seems abandoned, which is unfortunate. Anyway, our solution for this issue, and others we have faced recently, is to create a Webhook from Baserow to a serverless function and do our data integrity analysis there. So for examples when we want one linked record in a linked table, we run a Webhook on create/update of that field and the code checks to make sure there is only one record in that field. If there is more than one, we delete the first and create a warning message in Baserow for the end user.

Hey @ddsgad, thanks for sharing your workaround! It’ll be useful for other users looking for a solution. :raised_hands: