ChatGPT request with a value from another table

Hello everyone,

I want to click on a button in a SeaTable table to trigger a Python script that queries a value from another table (and uses this value as a variable for a ChatGPT request).

With the help of the ChatGPT bot “Seatable-Python”, I quickly managed to query a value from the same table (and copy it into a cell) using a button.

But I’ve been working on querying a value from a different table for hours without success. ChatGPT has already created several Python script versions for me, but they all fail.

I now suspect that the script is not necessarily failing because of its logic, but because the value in the second table is not referenced correctly or cannot be compared with the value in the original table.

Specifically, the Python script should do the following:

- Look up the contents of the “Source_ID” column in the current (active) row.
- From the other table, get the content of the “Text” column from the row whose value of the “Source ID” column (there) corresponds to the value of the “Source ID” column (queried in the current table).

Who can help?

Thanks in advance!

I managed this by linking the row to the row in the other table. That way you have it in the row you are working on. It will be available in context.current_row. It was the system prompt in my case.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.