Duplicate row without all linked columns

Because the function “Duplicate Row” is copying all links, can you help troubleshoot this script to copy all links except the excluded one.
Unfortunately, it is copying no link at all. What’s wrong ?

from seatable_api import Base, context
excluded_columns = [‘Color’]
server_url = context.server_url
api_token = context.api_token
base = Base(api_token, server_url)
#Get the current table
current_table = context.current_table
#Get the current row
current_row = context.current_row
print(‘current_row=’, current_row)
#Remove the excluded columns
current_row = {k: v for k, v in current_row.items() if k not in excluded_columns}
#If the current table and row are both valid
if current_table is not None and current_row is not None:
#Copy the current row
trow = base.append_row(current_table, current_row)

You cannot add links in a row with the append_row method.

You must use the add_link method: Links - SeaTable Programming Manual

1 Like

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