Tables
Reading the structure
describe_workspace_schema returns every table you can see with its fields, field kinds and options, plus the groups you can access. Call it before any other workspace tool.
- A choice field lists
options.choices, each with avalue(what you send) and alabel(what the user sees). Always send the value. - A relation field's
options.tableIdnames the table it links to. - A text or number field whose
options.source.typeissequenceis numbered by the app (ticket or invoice numbers). It gets its value on create and cannot be written; leave it out ofrecord_creationandupdate_record. - A field whose
options.source.typeisformulais calculated by the app fromoptions.source.expressionand cannot be written; leave it out of record writes. One that isformula-defaultis filled from its formula when left empty, and a value you send replaces it until it is cleared. - Every table also has
__system_created_at,__system_updated_atand__system_created_by.
Changing the structure
upsert_table: create a table or add and change its fields. Needs the Admin or Editor role.- A calculated field is any field with
options.source={ "type": "formula", "expression": "ROUND({Qty} * {Unit price}, 2)" }(orformula-defaultfor a starting value people can change). Fields are written in braces by display name; a linked field goes through its link field, e.g.{Deal}.{Currency}orSUM({Order lines}.{Amount}). Excel-style functions work (IF,ROUND,SUMIFS,LOOKUP,NETWORKDAYS,PMT…). Supported on text, number, date, select and multi-select fields. A broken formula is rejected with the reason; totals over linked records update a moment after the save, and changing a formula recalculates existing records in the background. delete_table: removes a table and every record in it. There is no Bin for tables. Admin only; confirm with the user first.
Numbered fields
get_field_counter shows the number the next record will get; set_field_counter moves it, for example to start invoices at 1000. It cannot go below a number already in use.
Rules
- Reuse an existing table or field when one fits instead of creating a near-duplicate.
- Describe the change you plan in plain words and wait for agreement before changing the structure.


