add_field_with_values
Add a new field to a layer and populate all features using a QGIS expression, with automatic rollback on failure.
Instructions
Add a new field and populate every feature from a QGIS expression, in one step.
type is one of: integer, double, string, date, datetime, boolean. The
add-and-populate happens inside a single edit session: if the expression
fails to evaluate on any feature, the field addition is rolled back too.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type | No | double | |
| length | No | ||
| precision | No | ||
| expression | Yes | ||
| layer_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||