NetSuite saved searches support SQL-based formulas for calculated fields. Use formulas in both Criteria (filters) and Results (columns) to create custom calculations, text manipulation, and conditional logic.
| Function | Purpose | Example |
|---|---|---|
| NVL(a, b) | Return b if a is null | NVL({duedate}, {trandate}) |
| NULLIF(a, b) | Return null if a = b | NULLIF({cost}, 0) |
| TRUNC(date) | Remove time from date | TRUNC({today}) |
| ABS(n) | Absolute value | ABS({balance}) |
| ROUND(n, d) | Round to d decimals | ROUND({rate}, 2) |
| UPPER(s) | Convert to uppercase | UPPER({name}) |
| SUBSTR(s, start, len) | Extract substring | SUBSTR({phone}, 1, 3) |
| INSTR(s, find) | Position of substring | INSTR({email}, '@') |
| TO_CHAR(d, fmt) | Format date as text | TO_CHAR({trandate}, 'YYYY-MM') |