Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameters for single-select columns #18

Open
simonhammes opened this issue May 22, 2024 · 3 comments
Open

Parameters for single-select columns #18

simonhammes opened this issue May 22, 2024 · 3 comments

Comments

@simonhammes
Copy link
Collaborator

  • id, name and color seem to be required (this is not directly clear when looking at the API documentation)
  • I believe it should be textColor instead of text-color
  • borderColor seems to be supported as well
  • Exporting options that were created using the Web UI have string values as their IDs (e.g. "149093")
@simonhammes
Copy link
Collaborator Author

If you forget a required value when trying to insert a single-select column via the insertColumn(Deprecated) operation, you at least get a somewhat helpful error message:

{
    "error_type":"column_data_error",
    "error_message":"column_data: {\"options\":[{\"id\":1234,\"name\":\"Option 1\"}]} do not meet specifications."
}

However: If you specify the columns when creating a new table (createTable), the error message is not helpful at all:

{
    "error_type": "parameter_error",
    "error_message": "column undefined type undefined data undefined invalid."
}

@r350178982
Copy link
Collaborator

  • id, name and color seem to be required (this is not directly clear when looking at the API documentation)
  • I believe it should be textColor instead of text-color
  • borderColor seems to be supported as well
  • Exporting options that were created using the Web UI have string values as their IDs (e.g. "149093")

Hi, the basic column_data structure you may refer to the output of base metadata https://api.seatable.io/reference/getmetadata, the docs is trying to give the simplest examples to help people to understand. If you try to handle the options of single columns , please refert to https://api.seatable.io/reference/deleteselectoption-1. You can insert a column without column_data, and then add options by using such API

@r350178982
Copy link
Collaborator

  • id, name and color seem to be required (this is not directly clear when looking at the API documentation)
  • I believe it should be textColor instead of text-color
  • borderColor seems to be supported as well
  • Exporting options that were created using the Web UI have string values as their IDs (e.g. "149093")

Hi, the basic column_data structure you may refer to the output of base metadata https://api.seatable.io/reference/getmetadata, the docs is trying to give the simplest examples to help people to understand. If you try to handle the options of single columns , please refert to https://api.seatable.io/reference/deleteselectoption-1. You can insert a column without column_data, and then add options by using such API

And later, we will fix the params of textColor and borderColor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants