Insert_column link_formula/lookup column_data parameter

Hi everyone,
I’m working on a new project (I hope I’ll be able to tell you more about it later) and I’m stuck on the definition of the column_data for the insert_column function in the case of a link_formula/lookup column (pretty specific indeed)…
As far as I understand it looking at the API documentation, I can pass the following parameters:

  • formula (string) required
    The formula of this column. (in my case, lookup)
  • link_column (string) required
    Name of the link column.
  • level1_linked_column (string) required
    Name of the column in the linked table to look up.

This is pretty clear, but it doesn’t seem to allow to cover the case of a “double link” : a lookup linking to a column being a lookup itself, whereas the interface allows it.

When I look at the column description/metadata for such a “double link”, I see similar but also extra parameters:

{
    'formula': 'lookup', 
    'result_type': 'array', 
    'operated_columns': ['QFy0'], 
    'link_column_key': 'QFy0', 
    'level1_linked_table_column_key': '9KIf', 
    'level2_column_key_required': True, 
    'level2_linked_table_column_key': 'A9Ab', 
    ...
}

However, I didn’t succeed neither in passing such “level2” parameters to the API nor in finding some documentation about it (the names might be different, as for level1_linked_column and level1_linked_table_column_key for example)… Any clue ?

Bests,
Benjamin

Hi,

We check the source code and found that there is another parameters “level2_linked_column (string) Name of the column in the table linked by levlel1_liked_column to lookup” you can pass. Please refert the curl code below and try again

curl -X POST \
  'https://dev.seatable.cn/api-gateway/api/v2/dtables/uuids/columns/?table_name=Table1' \
  -H 'Authorization: Token xxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "column_type": "link-formula",
  "column_data": {
    "formula": "lookup",
    "link_column": "Link",
    "level1_linked_column": "Link3",
    "level2_linked_column": "Name"  
  },
  "table_name": "Table1",
  "column_name": "TTTT11"
}'
1 Like

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