English
English
Appearance
English
English
Appearance
Formula fields automatically calculate and display results through expressions, supporting references to other fields in the current record, built-in functions, and nested calculations. They are suitable for scenarios requiring automatic calculation, such as total price, completion rate, and overdue reminders.
SmartTable provides a formula helper component to lower the barrier of writing formulas:
When referencing fields in a formula, use field names or identifiers, for example:
{Quantity} * {Unit Price}You can also directly enter field names:
Quantity * Unit PriceThe system automatically parses and associates the corresponding fields when saving.
The SmartTable formula engine provides 47 built-in functions covering the following categories:
| Function | Description | Example |
|---|---|---|
| SUM | Sum | SUM(1, 2, 3) |
| AVERAGE | Average | AVERAGE({Chinese}, {Math}) |
| MAX | Maximum | MAX({Value1}, {Value2}) |
| MIN | Minimum | MIN({Value1}, {Value2}) |
| ROUND | Round | ROUND({Value}, 2) |
| ABS | Absolute value | ABS({Value}) |
| Function | Description | Example |
|---|---|---|
| CONCAT | Concatenate text | CONCAT({First}, {Last}) |
| LEFT | Extract from left | LEFT({Text}, 3) |
| RIGHT | Extract from right | RIGHT({Text}, 3) |
| LEN | Text length | LEN({Text}) |
| TRIM | Remove surrounding spaces | TRIM({Text}) |
| Function | Description | Example |
|---|---|---|
| TODAY | Current date | TODAY() |
| NOW | Current date and time | NOW() |
| DATEADD | Add/subtract date | DATEADD({Date}, 3, "days") |
| DATEDIFF | Date difference | DATEDIFF({End}, {Start}, "days") |
| YEAR / MONTH / DAY | Extract year/month/day | YEAR({Date}) |
| Function | Description | Example |
|---|---|---|
| IF | Conditional judgment | IF({Status}="Done", 100, 0) |
| AND | All conditions true | AND({Cond1}, {Cond2}) |
| OR | Any condition true | OR({Cond1}, {Cond2}) |
| NOT | Negation | NOT({Cond}) |
| ISBLANK | Is empty | ISBLANK({Field}) |
Formula fields support multiple result formats:
Format Selection
You can still change the format after saving the formula. If the formula returns a date timestamp, select a date format to avoid displaying a long number.
{Quantity} * {Unit Price}IF({Total} > 0, {Completed} / {Total} * 100, 0)IF({Due Date} < TODAY(), "Overdue", "On Track")IF({Progress} = 100, "Completed", IF({Progress} > 0, "In Progress", "Not Started"))