Column & Field Management
This skill covers column operations in NocoDB — creating fields of all types, setting up relations (Links), Lookups, Rollups, and Formulas.
Available Tools
| Tool |
Description |
list_columns |
List all columns in a table |
create_column |
Create a new column |
update_column |
Update column configuration |
delete_column |
Delete a column |
Listing Columns
Tool: list_columns
Input: { "table_id": "tbl_abc123" }
Returns: Array of columns with id, name, type, and configuration.
Field Types Reference
Basic Fields
| Type |
Description |
Example Input |
| SingleLineText |
Short text |
{ "name": "Title", "type": "SingleLineText" } |
| LongText |
Multi-line text |
{ "name": "Description", "type": "LongText" } |
| Number |
Integer |
{ "name": "Quantity", "type": "Number" } |
| Decimal |
Float |
{ "name": "Score", "type": "Decimal" } |
| Currency |
Money |
{ "name": "Price", "type": "Currency" } |
| Percent |
Percentage |
{ "name": "Discount", "type": "Percent" } |
| Email |
Email address |
{ "name": "Email", "type": "Email" } |
| URL |
Web link |
{ "name": "Website", "type": "URL" } |
| PhoneNumber |
Phone |
{ "name": "Phone", "type": "PhoneNumber" } |
| Checkbox |
Boolean |
{ "name": "Active", "type": "Checkbox" } |
| Date |
Date |
{ "name": "Birthday", "type": "Date" } |
| DateTime |
Date + Time |
{ "name": "CreatedAt", "type": "DateTime" } |
| Duration |
Time span |
{ "name": "TimeSpent", "type": "Duration" } |
| Rating |
Star rating |
{ "name": "Rating", "type": "Rating", "max": 5 } |
| Attachment |
Files |
{ "name": "Files", "type": "Attachment" } |
Selection Fields
Tool: create_column
Input: {
"table_id": "tbl_abc123",
"name": "Status",
"type": "SingleSelect",
"options": ["New", "In Progress", "Done", "Archived"]
}
Tool: create_column
Input: {
"table_id": "tbl_abc123",
"name": "Tags",
"type": "MultiSelect",
"options": ["Urgent", "Feature", "Bug", "Documentation"]
}
Relation Fields (LinkToAnotherRecord)
Has Many (hm):
Tool: create_column
Input: {
"table_id": "tbl_contacts",
"name": "Company",
"type": "LinkToAnotherRecord",
"linked_table_id": "tbl_companies",
"relation_type": "hm"
}
Many to Many (mm):
Tool: create_column
Input: {
"table_id": "tbl_deals",
"name": "Products",
"type": "LinkToAnotherRecord",
"linked_table_id": "tbl_products",
"relation_type": "mm"
}
Lookup Fields
Show a field from a related table. Requires a LinkToAnotherRecord column.
Tool: create_column
Input: {
"table_id": "tbl_deals",
"name": "Contact Email",
"type": "Lookup",
"relation_column_id": "cl_company_link",
"lookup_column_id": "cl_email"
}
Rollup Fields
Aggregate values from related records. Requires a LinkToAnotherRecord column.
Tool: create_column
Input: {
"table_id": "tbl_contacts",
"name": "Total Deal Value",
"type": "Rollup",
"relation_column_id": "cl_deals_link",
"rollup_column_id": "cl_amount",
"rollup_function": "sum"
}
Rollup functions: sum, count, avg, min, max, count_distinct
Formula Fields
Tool: create_column
Input: {
"table_id": "tbl_deals",
"name": "Deal Category",
"type": "Formula",
"formula": "IF({Amount} > 10000, 'Enterprise', 'SMB')"
}
Formula Reference:
| Pattern |
Formula |
Use Case |
| Conditional |
IF({Amount} > 10000, "Enterprise", "SMB") |
Categorization |
| Multi-condition |
SWITCH({Status}, "Active", "🟢", "Inactive", "🔴", "⚪") |
Status icons |
| Display name |
CONCAT({First Name}, " ", {Last Name}) |
Combine text |
| Substring |
LEFT({Code}, 3) |
Extract prefix |
| Right substring |
RIGHT({Phone}, 4) |
Extract last digits |
| Due date |
DATEADD({Created}, 30, 'days') |
Calculate future date |
| Duration |
DATETIME_DIFF({End Date}, {Start Date}, 'days') |
Days between |
| Day of week |
WEEKDAY({Date}) |
Get weekday (0=Sun) |
| Percentage |
ROUND({Completed} / {Total} * 100, 1) |
Calc percentage |
| Rounding up |
CEILING({Price} * 1.1) |
Round up |
| Rounding down |
FLOOR({Score} / 10) * 10 |
Round to nearest 10 |
| Null check |
IF({Email} = "", "Missing", {Email}) |
Handle empty fields |
| Nested IF |
IF({Amount} > 10000, "High", IF({Amount} > 1000, "Medium", "Low")) |
Multi-level categorization |
| Text contains |
IF(FIND("urgent", LOWER({Title})) > 0, "Yes", "No") |
Search in text |
| Record age |
DATETIME_DIFF(NOW(), {Created}, 'days') |
Days since creation |
Formula syntax: Reference fields with {field_name}. String literals in "quotes" or 'quotes'.
Common Workflows
Add Relation + Lookup + Rollup
1. list_tables() -> Get table IDs for both tables
2. list_columns(table_id) -> Check existing columns
3. create_column(type=LinkToAnotherRecord) -> Create relation
4. list_columns(linked_table_id) -> Get column IDs for lookup/rollup
5. create_column(type=Lookup) -> Show related field
6. create_column(type=Rollup) -> Aggregate related values
Add Select Field with Options
1. list_columns(table_id) -> Check if field exists
2. create_column(type=SingleSelect, options=[...]) -> Create with options
Add Formula Based on Existing Fields
1. list_columns(table_id) -> Verify referenced fields exist
2. create_column(type=Formula, formula="...") -> Create formula
Important Rules
Creation order matters:
- Basic fields → Relations → Lookups/Rollups → Formulas
- Each type depends on the previous
Use table_id, not table_name — always resolve via list_tables
Use column_id for Lookup/Rollup — get IDs from list_columns
Relation creates columns in BOTH tables — a Link in table A auto-creates a reverse link in table B
Formula field names are case-sensitive — {Amount} not {amount}
Best Practices
- Name columns clearly — "Contact Email" (lookup) vs "Email" (native field)
- Set primary display first — affects how linked records appear
- Use SingleSelect for statuses — enables Kanban views
- Plan formulas on paper — complex formulas are hard to debug
- Test Lookups/Rollups — add sample data to verify they resolve correctly
1---2name: column-field-management3description: Column/field types, relations, lookups, rollups, formulas. This skill should be used when the user asks to add columns, configure field types, set up relations, lookups, rollups, or formulas.4---56# Column & Field Management78This skill covers column operations in NocoDB — creating fields of all types, setting up relations (Links), Lookups, Rollups, and Formulas.910## Available Tools1112| Tool | Description |13|------|-------------|14| `list_columns` | List all columns in a table |15| `create_column` | Create a new column |16| `update_column` | Update column configuration |17| `delete_column` | Delete a column |1819## Listing Columns2021```22Tool: list_columns23Input: { "table_id": "tbl_abc123" }2425Returns: Array of columns with id, name, type, and configuration.26```2728## Field Types Reference2930### Basic Fields3132| Type | Description | Example Input |33|------|-------------|---------------|34| SingleLineText | Short text | `{ "name": "Title", "type": "SingleLineText" }` |35| LongText | Multi-line text | `{ "name": "Description", "type": "LongText" }` |36| Number | Integer | `{ "name": "Quantity", "type": "Number" }` |37| Decimal | Float | `{ "name": "Score", "type": "Decimal" }` |38| Currency | Money | `{ "name": "Price", "type": "Currency" }` |39| Percent | Percentage | `{ "name": "Discount", "type": "Percent" }` |40| Email | Email address | `{ "name": "Email", "type": "Email" }` |41| URL | Web link | `{ "name": "Website", "type": "URL" }` |42| PhoneNumber | Phone | `{ "name": "Phone", "type": "PhoneNumber" }` |43| Checkbox | Boolean | `{ "name": "Active", "type": "Checkbox" }` |44| Date | Date | `{ "name": "Birthday", "type": "Date" }` |45| DateTime | Date + Time | `{ "name": "CreatedAt", "type": "DateTime" }` |46| Duration | Time span | `{ "name": "TimeSpent", "type": "Duration" }` |47| Rating | Star rating | `{ "name": "Rating", "type": "Rating", "max": 5 }` |48| Attachment | Files | `{ "name": "Files", "type": "Attachment" }` |4950### Selection Fields5152```53Tool: create_column54Input: {55 "table_id": "tbl_abc123",56 "name": "Status",57 "type": "SingleSelect",58 "options": ["New", "In Progress", "Done", "Archived"]59}60```6162```63Tool: create_column64Input: {65 "table_id": "tbl_abc123",66 "name": "Tags",67 "type": "MultiSelect",68 "options": ["Urgent", "Feature", "Bug", "Documentation"]69}70```7172### Relation Fields (LinkToAnotherRecord)7374**Has Many (hm):**75```76Tool: create_column77Input: {78 "table_id": "tbl_contacts",79 "name": "Company",80 "type": "LinkToAnotherRecord",81 "linked_table_id": "tbl_companies",82 "relation_type": "hm"83}84```8586**Many to Many (mm):**87```88Tool: create_column89Input: {90 "table_id": "tbl_deals",91 "name": "Products",92 "type": "LinkToAnotherRecord",93 "linked_table_id": "tbl_products",94 "relation_type": "mm"95}96```9798### Lookup Fields99100Show a field from a related table. Requires a LinkToAnotherRecord column.101102```103Tool: create_column104Input: {105 "table_id": "tbl_deals",106 "name": "Contact Email",107 "type": "Lookup",108 "relation_column_id": "cl_company_link",109 "lookup_column_id": "cl_email"110}111```112113### Rollup Fields114115Aggregate values from related records. Requires a LinkToAnotherRecord column.116117```118Tool: create_column119Input: {120 "table_id": "tbl_contacts",121 "name": "Total Deal Value",122 "type": "Rollup",123 "relation_column_id": "cl_deals_link",124 "rollup_column_id": "cl_amount",125 "rollup_function": "sum"126}127```128129**Rollup functions:** sum, count, avg, min, max, count_distinct130131### Formula Fields132133```134Tool: create_column135Input: {136 "table_id": "tbl_deals",137 "name": "Deal Category",138 "type": "Formula",139 "formula": "IF({Amount} > 10000, 'Enterprise', 'SMB')"140}141```142143**Formula Reference:**144145| Pattern | Formula | Use Case |146|---------|---------|----------|147| Conditional | `IF({Amount} > 10000, "Enterprise", "SMB")` | Categorization |148| Multi-condition | `SWITCH({Status}, "Active", "🟢", "Inactive", "🔴", "⚪")` | Status icons |149| Display name | `CONCAT({First Name}, " ", {Last Name})` | Combine text |150| Substring | `LEFT({Code}, 3)` | Extract prefix |151| Right substring | `RIGHT({Phone}, 4)` | Extract last digits |152| Due date | `DATEADD({Created}, 30, 'days')` | Calculate future date |153| Duration | `DATETIME_DIFF({End Date}, {Start Date}, 'days')` | Days between |154| Day of week | `WEEKDAY({Date})` | Get weekday (0=Sun) |155| Percentage | `ROUND({Completed} / {Total} * 100, 1)` | Calc percentage |156| Rounding up | `CEILING({Price} * 1.1)` | Round up |157| Rounding down | `FLOOR({Score} / 10) * 10` | Round to nearest 10 |158| Null check | `IF({Email} = "", "Missing", {Email})` | Handle empty fields |159| Nested IF | `IF({Amount} > 10000, "High", IF({Amount} > 1000, "Medium", "Low"))` | Multi-level categorization |160| Text contains | `IF(FIND("urgent", LOWER({Title})) > 0, "Yes", "No")` | Search in text |161| Record age | `DATETIME_DIFF(NOW(), {Created}, 'days')` | Days since creation |162163**Formula syntax:** Reference fields with `{field_name}`. String literals in `"quotes"` or `'quotes'`.164165## Common Workflows166167### Add Relation + Lookup + Rollup168```1691. list_tables() -> Get table IDs for both tables1702. list_columns(table_id) -> Check existing columns1713. create_column(type=LinkToAnotherRecord) -> Create relation1724. list_columns(linked_table_id) -> Get column IDs for lookup/rollup1735. create_column(type=Lookup) -> Show related field1746. create_column(type=Rollup) -> Aggregate related values175```176177### Add Select Field with Options178```1791. list_columns(table_id) -> Check if field exists1802. create_column(type=SingleSelect, options=[...]) -> Create with options181```182183### Add Formula Based on Existing Fields184```1851. list_columns(table_id) -> Verify referenced fields exist1862. create_column(type=Formula, formula="...") -> Create formula187```188189## Important Rules1901911. **Creation order matters:**192 - Basic fields → Relations → Lookups/Rollups → Formulas193 - Each type depends on the previous1941952. **Use table_id, not table_name** — always resolve via list_tables1961973. **Use column_id for Lookup/Rollup** — get IDs from list_columns1981994. **Relation creates columns in BOTH tables** — a Link in table A auto-creates a reverse link in table B2002015. **Formula field names are case-sensitive** — `{Amount}` not `{amount}`202203## Best Practices2042051. **Name columns clearly** — "Contact Email" (lookup) vs "Email" (native field)2062. **Set primary display first** — affects how linked records appear2073. **Use SingleSelect for statuses** — enables Kanban views2084. **Plan formulas on paper** — complex formulas are hard to debug2095. **Test Lookups/Rollups** — add sample data to verify they resolve correctly