columnsFor
Retrieves the columns for a specific table field.
This function returns a list of all columns defined in a table field. It supports both regular table fields and collection table fields. For collection fields, you can specify a schema to get columns for a specific table within the collection.
Usage Examples:
// Get columns from a regular table field
val columns = editor.columnsFor("employees_table")
columns?.forEach { column ->
println("Column: ${column.title}, Type: ${column.type}")
}
// Get columns from a collection table field with specific schema
val columns = editor.columnsFor(
fieldId = "department_employees",
schemaId = "sales_department"
)Return
A list of Column objects representing all columns in the table field, or null if the field doesn't exist or is not a table field.
Parameters
The unique identifier of the table field to get columns from. This can be either a regular table field or a collection table field.
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.
Throws
if the fieldId doesn't correspond to a valid field.