prepend
Prepends a new row to the beginning of a table.
This function creates a new row and inserts it at the first position (index 0) of the table. The function supports both regular table fields and collection table fields.
Usage Examples:
// Insert a new row at the beginning of the table
editor.prepend(
fieldId = "employees_table",
cellUpdates = mapOf(
nameColumn to "John Doe",
ageColumn to 30.0
)
)
// Insert a new row with a custom row ID
editor.prepend(
fieldId = "employees_table",
cellUpdates = mapOf(
nameColumn to "Jane Smith",
ageColumn to 25.0
),
rowId = "custom_row_id"
)Parameters
The unique identifier of the table field to prepend to. This can be either a regular table field or a collection table field.
A map where keys are Column objects and values are the new cell values. The values can be of any type supported by the column (String, Number, etc.).
Optional custom identifier for the new row. If not provided, a unique ID will be generated.
Optional schema identifier for collection fields. This is required when working with collection table fields to specify which schema to use. For regular table fields, this parameter is ignored.
Optional parent path for nested tables in collection fields. This is used to specify the hierarchical structure when working with nested tables.
Throws
if the fieldId doesn't correspond to a valid table field.