Actions71
- Asset Actions
- Attribute Actions
- Block Actions
- Database Actions
- Document Actions
- Markdown Table Actions
- Notebook Actions
- Search Actions
- System Actions
- Tag Actions
Database → Add Column
AI-generatedOverview
This node operation adds a new column to a SiYuan database (AttributeView block). It is useful for dynamically modifying the structure of a database by appending or inserting columns with specific types such as text, number, date, checkbox, etc. Practical examples include adding a new attribute column to track additional data points in a project management database or inventory system within SiYuan.
Use Case Examples
- Adding a 'Due Date' column of type 'Date' to a task database to track deadlines.
- Inserting a 'Priority' column of type 'Select' after an existing column to categorize tasks by urgency.
Properties
| Name | Meaning |
|---|---|
| AV ID | The AttributeView ID of the database block where the column will be added. This identifies the target database. |
| Column Name | The display name for the new column to be added to the database. |
| Column Type | The type of the new column, determining how the cell values are stored and rendered. Options include Checkbox, Date, Email, Multi-Select, Number, Phone, Select, Text, and URL. |
| Previous Column ID | Optional ID of the column after which the new column should be inserted. If left blank, the new column is appended at the end. |
Output
JSON
success- Indicates whether the column was successfully added to the database.
Dependencies
- SiYuan API URL and Token credentials required for authentication.
Troubleshooting
- Missing or invalid API URL or token will cause authentication errors. Ensure credentials are correctly set.
- Providing an invalid AV ID or column type may result in operation failure. Verify the AV ID corresponds to an existing database and the column type is supported.
- If 'Previous Column ID' is specified but does not exist, the column may not be inserted correctly. Leave blank to append at the end.