Problem with linking: table_id unexpected argument

Hi.

I am using the self-hosted version 3.4.8.
The python function base.update_link throws an error.

It says:

TypeError: update_link() got an unexpected keyword argument 'table_id'

When I remove the variable assignment, it works. When I use table_id='1234' it doesn’t.

Did something change since the last release?
If so, the docs need an update.

Regards
AkDk7

I don’t quite understand your problem.

Can you paste your code with more details?

Of course, I changed the following function call to not use the key-value-asignment in the parameter list to work again.

base.update_link(
        buchungenZusammenfassungKey,
        buchungenTableId,
        zusammenfassungTableId,
        curRowId,
        [
            rowLinkId
        ]
    )

An the documentation says (Links - SeaTable Programming Manual):

base.update_link(
        link_id='r4IJ',
        table_id='0000',
        other_table_id='kFoO',
        row_id='BXhEm9ucTNu3FjupIk7Xug',
        other_rows_ids=[
          'exkb56fAT66j8R0w6wD9Qg',
          'DjHjwmlRRB6WgU9uPnrWeA'
        ]
    )

When I use that call I get the following error message.

Traceback (most recent call last):
File "index.py", line 45, in <module>
rowLinkId
TypeError: update_link() got an unexpected keyword argument 'table_id'

Thanks!

Sorry for the inconvenience, the parameter name is now changed from table_id to table_name to be consistent with other APIs. You can use either table name or table id for this parameter.

The document is changed accordingly.

1 Like

Thank you very much!

Also the batch_update_link still has the table_id reference.

And other_table_id seems to not work either.

What I just realized is why is it changed to table_name since it’s the id of the table. Is it now possible to put the real name of the table, which the user can define in the gui, in it?

The document changed all id to name as I checked:

Yes, you can now use the table name the user defined in the web UI.

1 Like

This is awesome and so much easier. Great improvement!

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