docs(skill): add filter operator reference by field type
Add comprehensive operator-to-field-type mapping table covering: - text/number/boolean/date base operators - select/link/user field-specific operators (isAnyOf, hasAnyOf, etc.) - date sub-operators (today, pastWeek, exactDate, etc.) - conjunction (and/or) + nesting - Warning: isAnyOf not valid for text fields — use OR conjunction
This commit is contained in:
@@ -175,6 +175,50 @@ inkreach-teable record get-one <recordId>
|
||||
| `--search` | Keyword search: `"keyword"` (auto-wraps to `{"value":"keyword"}`) |
|
||||
| `--view-id` | Fetch in view order with view's filter/sort/group applied |
|
||||
|
||||
**Filter operators by field type**:
|
||||
|
||||
| Field Type | Supported Operators |
|
||||
|-----------|-------------------|
|
||||
| `singleLineText` `longText` `url` `email` `phone` | `is` `isNot` `contains` `doesNotContain` `isEmpty` `isNotEmpty` |
|
||||
| `number` `currency` `percent` `duration` `rating` | `is` `isNot` `isGreater` `isGreaterEqual` `isLess` `isLessEqual` `isEmpty` `isNotEmpty` |
|
||||
| `checkbox` | `is` |
|
||||
| `date` `createdTime` `lastModifiedTime` | `is` `isNot` `isWithIn` `isBefore` `isAfter` `isOnOrBefore` `isOnOrAfter` `isEmpty` `isNotEmpty` |
|
||||
| `singleSelect` (single) | `is` `isNot` `isAnyOf` `isNoneOf` `isEmpty` `isNotEmpty` |
|
||||
| `singleSelect` (multi) | `hasAnyOf` `hasAllOf` `isExactly` `isNotExactly` `hasNoneOf` `isEmpty` `isNotEmpty` |
|
||||
| `multipleSelect` | `hasAnyOf` `hasAllOf` `isExactly` `isNotExactly` `hasNoneOf` `isEmpty` `isNotEmpty` |
|
||||
| `user` `createdBy` `lastModifiedBy` (single) | `is` `isNot` `isAnyOf` `isNoneOf` `isEmpty` `isNotEmpty` |
|
||||
| `user` `createdBy` `lastModifiedBy` (multi) | `hasAnyOf` `hasAllOf` `isExactly` `hasNoneOf` `isNotExactly` `isEmpty` `isNotEmpty` |
|
||||
| `link` (single) | `is` `isNot` `isAnyOf` `isNoneOf` `contains` `doesNotContain` `isEmpty` `isNotEmpty` |
|
||||
| `link` (multi) | `hasAnyOf` `hasAllOf` `isExactly` `hasNoneOf` `isNotExactly` `contains` `doesNotContain` `isEmpty` `isNotEmpty` |
|
||||
| `attachment` | `isEmpty` `isNotEmpty` |
|
||||
|
||||
> **⚠️ `isAnyOf` only works for select/link/user fields, NOT for text/number fields.** For text fields with multiple values, use `or` conjunction with multiple `is` rules:
|
||||
> ```json
|
||||
> {"conjunction":"or","filterSet":[
|
||||
> {"fieldId":"fldX","operator":"is","value":"val1"},
|
||||
> {"fieldId":"fldX","operator":"is","value":"val2"}
|
||||
> ]}
|
||||
> ```
|
||||
|
||||
**Date sub-operators** (with `is` / `isNot` / `isWithIn` / `isBefore` etc.):
|
||||
|
||||
| Operator | Description |
|
||||
|----------|-------------|
|
||||
| `today` `tomorrow` `yesterday` | Relative day |
|
||||
| `currentWeek` `lastWeek` `nextWeekPeriod` | Relative week |
|
||||
| `currentMonth` `lastMonth` `nextMonthPeriod` | Relative month |
|
||||
| `currentYear` `lastYear` `nextYearPeriod` | Relative year |
|
||||
| `oneWeekAgo` `oneWeekFromNow` | ±1 week |
|
||||
| `oneMonthAgo` `oneMonthFromNow` | ±1 month |
|
||||
| `daysAgo` `daysFromNow` | ±N days (set `value`) |
|
||||
| `exactDate` | Specific date: `"2025-06-15"` |
|
||||
| `exactDateTime` | Specific datetime: `"2025-06-15T09:00:00.000Z"` |
|
||||
| `pastWeek` `pastMonth` `pastYear` | Last week/month/year (for `isWithIn`) |
|
||||
| `nextWeek` `nextMonth` `nextYear` | Next week/month/year (for `isWithIn`) |
|
||||
| `pastNumberOfDays` `nextNumberOfDays` | ±N days (for `isWithIn`, set `value`) |
|
||||
|
||||
**Conjunction**: `"and"` (all must match) or `"or"` (any matches). Filter sets can nest for complex logic.
|
||||
|
||||
### Create
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user