How do I make key binding when creating a row via HTTP POST

Hello you SeaTablers, I need your swarm intelligence again. I’m building a tool to record working hours. But to start a record I also need the project and the employee. I am trying to use HTTP POST as per the Postman documentation.

But the fields arrive empty. (blue)
Bildschirmfoto 2022-11-21 um 10.11.26
I tried it as a real name but also via the row-id of the projects or employees table. How do I make this key for the binding to other tables?

Thanks so much

Hi @cahore.

The point is you cannot update a linked column with the update_row method. You have to identify the _id value of the record from the linked table and run the update_link call (Links - SeaTable Programming Manual). For that you need the linked column id and the ids of both tables as well.

If you want to add a new value, which is not present in the linked table, you have to add the value to the linked table first.

It is a bit tricky but you will figure it out. The documentation is pretty good.

Kind regards

thank you for the approach AkDk7.
But I don’t have a development environment for the API.
Anything HTTP is available to me. But I took your approach and searched the SeaTable API documentation and found the following. Is this what you mean?

If I understand correctly I have two steps.
First appand a row and leave the columns with the links empty.
Second update this row with the keys for the links. Right?

If so, how do I have to proceed here?

Thanks so much

I can update some date stuff but not the linked values.
But it looks the same when I make a SQL request like

where do I have the mental error here in my mind?

Hi @cahore.

That seems to return a list with all link typed columns in a table and this is one part of the show you need.

In the api reference I found this: SeaTable API Reference
It shows you the data which is needed to update an existing row with a linked record.

Complete desperation spreads. AkDk7’s idea was absolutely correct, but the implementation is completely inexplicable to me. Here is the API documentation SeaTable API Reference

The starting point:

But ist not working at all. Looking for some help.

Tanks so much

Hi @cahore.

The value for “other_table_row_id” has to be an array even if it is only one link. Just put it in like this: “other_table_row_id”: [ “…” ]

ahhhh thanks … I did it like this

Am I right when I say:

You wanted to say: Seems to work? :slight_smile:

Not yet, but it feels so close. 400 Bad requests as you can see.

Ah, I might be wrong. Have a look into the api reference again. There they say it has to be in curly braces like: "other_table_row_id": "{{row_id_table2}}"

ah, no no. If it comes to the Postman SeaTable environment all values are in curly braces like so

"{{table_name}}" ---> "Zeiten"

Has your issue been solved?

Hello Ralf,
unfortunately not yet. that’s really a tough nut to crack.
Dear greetings

I thought you found a solution…