Actions71
- Asset Actions
- Attribute Actions
- Block Actions
- Database Actions
- Document Actions
- Markdown Table Actions
- Notebook Actions
- Search Actions
- System Actions
- Tag Actions
Database → Add Row
AI-generatedSummary
Create a detached row in a SiYuan database (AttributeView), optionally setting its primary key content and other cells. The operation returns the generated row ID and the number of fields set.
Inputs
- AV ID (required) — AttributeView ID for the database, not the database block ID. Use Database → List to find it.
- Database Block ID — Hosting block ID. Leave blank to resolve it from the AV ID, or provide it to skip that lookup.
- Primary Key Content — Initial content for the new row's primary key cell; defaults to an empty string.
- Fields Mode — Choose how to identify columns: by display name and value in a collection (default), by display name in a JSON object, or by internal column ID in a collection. Leave the selected mode's fields empty to create the row without setting other cells.
- Fields — In the collection modes, provide column name or key ID and its value for each cell to set. Values are coerced according to the column type; multi-select values can be arrays when supplied through JSON.
- Fields (JSON) — In By Column Name (JSON) mode, provide a JSON object mapping column display names to values. String expressions in this mode need JSON quotes.
Output shape
A single record
Contains avID, databaseBlockId, rowID, primaryKeyContent, and fieldsSet. The row ID is generated by the node; fieldsSet is the number of cell values applied. Errors are returned in an error record when Continue On Fail is enabled.