Defining relation when using "Link to other entries"

Hello everyone,

SeaTable looks very promising, thanks for the great work, I’ve been looking for something like this for a while.

I’m testing it to see if I can use it to build a relational database to track IT assets. The documentation says that I can use “Link to other entries” column type to build 1 to 1, 1 to many or many to many relationships. How can one define this exactly, I don’t see any options…

EX: I built an “Asset” table and a “Location” table. In the “Asset” table I added a “Location” column using “Link to other entries” and it works except that I can select multiple locations. I only need to the selection to one location.

Thanks for any help in advance.

Hi! Welcome to the Seafile Community Forum.

I think I have an example for what you are looking for. It’s not an example with assets and locations, but with properties and tenants, but you get it.

Just like you, I created two tables. First the property table, which looks like this:

Then I created a tenants table, which looks like this:

Finally, I added a linked records column in the tenants table and assigned every tenant to one property. If I want to show the tenants by property, I just group by the values in this column. This looks like this (look at the second column in the screenshot):

Obviously, the relationship is also captured in the property table which now looks like this (look at the last column):

Creating relationships between tables is a piece of cake: All you have to do is to create a column and select the linked records. SeaTable takes care of it in the background

By the way: You can link to records in other tables as well as to records in the same table!

Is this what you need?

1 Like

Hey @rdb, thanks for the nice example. I think your Property Management could be a nice template, maybe we should recruit your base as a SeaTable Template !

@rdb Thanks for the great example, much appreciated :grinning:.
That is excatly what I’m attempting to do. However I want to further limit the selection to one “Property”, or in my example one “Location”. Here’s my example, as you can see I can select multiple locations.

HI abadr,

not entirely sure I understand.

You don’t have to select multiple locations in the “linked records” column. If Nomad is only in the garage, then just remove the “roaming” from the list of linked locations. What you can also do: Switch to the Locations table and remove Nomad there from the linked records.

Hi rdb,
When choosing a location I would like to limit the selection to just one location. Now I can select multiple locations like “Office” & “Studio”.

Do you want to impose a 1:1 relationship? Is this what you want to do?
This is no supported function as this point.

Maybe I’m mistaken, but isn’t that 1:n?

Well, aren’t I silly. You are right, of course!

But is this what you want?

Yes it is. Thanks for informing me that this feature is not supported yet. The help files however says that it is, so maybe that should be fixed to minimize confusion.

Thanks a lot for your patience :slight_smile:

Thanks for your suggestion, and your interest in SeaTable, and welcome to the Forum!

However, 1:1 is included in 1:n, so if you only choose one option in the linking column, it is indeed a 1:1 linked relationship. That is to say, 1:1 is possible. So the current user manual is precise :slight_smile:

OK, thanks for the clarification :slight_smile:

1 Like

Sorry to piggyback onto your thread, but is there anyway to create a new record via record linking. This would prevent having to jump between tables.

Hi TJG, welcome to the SeaTable Community Forum!

What you try to do is not supported by SeaTable at this point. Sorry.

The feature will be available in the next release v1.4 in October.

1 Like

Hi TJG, welcome to the Forum!
I used to work between tables too, so I know your frustration! This exact function is not available yet, but I think I might provide an alternative solution. A solution that requires an extra mouse click, but will keep you on the same table and save you from switching between tables all the time.

Here’s how it goes:

  1. Let’s say, Table1 is the table, where you input records manually or automatically. In this Table1, for example, you have the columns Name and Email. Then let’s suppose, in Table2, you want names and emails automatically filled into the corresponding cells.
    image
  2. Now in Table2, create a new column with the type Link other records, and set it to link to Table1. I have given it the name linking here. (You cannot do this with the first column as its types are limited. In the SeaTable 1.3 that will be released next Monday, you will be able to set the first column as an Auto number column. For now, you can set the first column as text or number or date.) I recommend you to set the first column in order, because this will help you later in the linking.
    image
  3. Then, in Table2, create two new columns Name and Email, with the type of Formula, and write {linking.Name} and {linking.Email} like following:

    Here, linking is the name of the column that you are linking to Table1, and Name and Email are the column names that you want to retrive records from in Table1.
  4. So now you have a Table2 that looks like this:

    if you want, you can hide the linking column as you won’t need to work on it in Table2.
  5. Now go back to Table1. There’s one new column automatically created: Table2. In this column, click on each cell to let it correspond to the first column in the Table2.

    Again, only this first time will cost you some time and effort. As you add in new records, you just have to click one more time to link this new record to Table2.
  6. Now you can see, the records in Name and Email from Table1 are automatically updated in Table2.
    image

Thank you for your guidance. I am looking forward to when the feature is available.

Hi,

I´m new to SeaTable and stuck with this feature. Is it possible by now?

My problem as seen in the screenshot: I want the name of the Sub-Tasks in the column of the Main-Tasks.

Can you please help me with this or assist me in scripting my formula?

Thank you!

This is not possible.

But you can do it like this: