attributes_add_field
Add a new field to an editable vector layer by specifying name, type (integer, double, string, date, datetime, boolean), and optionally length and precision for string or double fields.
Instructions
Add a new field to a vector layer.
type is one of: integer, double, string, date, datetime, boolean.
length/precision only matter for string/double fields. Requires an
editable data source - fails with an EditFailed error on read-only
layers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type | Yes | ||
| length | No | ||
| layer_id | Yes | ||
| precision | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||