From e5975fe5bc663df6151bc702b396d7ef6439f604 Mon Sep 17 00:00:00 2001 From: yeuimu <2197651308@qq.com> Date: Fri, 7 Aug 2026 18:00:37 +0000 Subject: [PATCH] docs(skill): add filter operator reference by field type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../inkreach-teable/guides/tables-fields.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.agents/skills/inkreach-teable/guides/tables-fields.md b/.agents/skills/inkreach-teable/guides/tables-fields.md index f4bd1bb..c88b808 100644 --- a/.agents/skills/inkreach-teable/guides/tables-fields.md +++ b/.agents/skills/inkreach-teable/guides/tables-fields.md @@ -175,6 +175,50 @@ inkreach-teable record get-one | `--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