Skip to content

Commit 2c296cf

Browse files
feat(fields): lookup picker resolves { $record } lookupFilters values and sends orEmpty (#34253)
<!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9Jn5meabiiHHeo8KAjDSYr1)_ Fixes #34197 Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:在记录表单里,查找字段的选择器现在会读 `lookupFilters` 里的 `{ $record: 'quote_date' }` / `{ $record: 'account.cb_market' }`,用正在编辑的那条记录的值替换后再查候选;`orEmpty: true` 发成「比较 或 该列为空」。只有记录表单会给字段打上「正在编辑一条记录」的标记(并写明跳一层的查找指向哪个对象),选择器只在有这个标记时才解析;批量操作、参数对话框等其它宿主一律丢弃这类条目。 - **为什么改**:CRM 报价单的价目表选择器要按报价日期和客户市场筛价目表(#34009 的客户需求,契约已在 PR #34078 落地但标着「计划中、未生效」),这次补上读取端。 - **风险与回滚**:只影响写了 `{ $record }` 或 `orEmpty` 的查找字段;普通字面过滤和 `dependsOn` 的查询逐字节不变(有对照测试)。回滚即还原本 PR。 - **先看**:`ui/packages/fields/src/widgets/lookupRecordReference.ts`(解析与跳一层读取)、`LookupField.tsx` 中 `queryLookupFilters` 一段、`RecordPickerDialog.tsx` 的 `lookupFiltersToRecord`(orEmpty 与未解析引用的丢弃)。 - **两分钟验证**:`pnpm --dir ui exec vitest run packages/fields/src/widgets/LookupField.recordReference-34197.test.tsx packages/plugin-form/src/__tests__/lookupRecordHop-34197.test.tsx`,应见 14 条全部通过。 - **需要你做的**:无,席位落地(spec 描述改动需 review 席位的契约复审记录,由席位转交;r2 已按复审 FAIL 修正描述)。 ## What changes **The resolver** — `ui/packages/fields/src/widgets/lookupRecordReference.ts` (new, the one reader of the spec's `LookupFilterRecordReferenceSchema`): - `resolveLookupFilters(filters, record, hopRows)` puts the value a `{ $record }` path names in place of the reference. A path is a field of the record being edited, or one lookup hop (`account.cb_market`). - An entry whose referenced value is empty (null, unset, `''`, an empty list, an unset hop lookup) is left out, the rule an unset `dependsOn` parent follows (seat ruling 6900252552 §1). - An expanded related row is collapsed to its id before it is compared. - `useRecordHopRows` reads each hop's target row once per id, `$select`ing only the hop fields, unless the record already holds the row expanded with that field. It reports `pending` until the read lands. Answers are keyed by object, id and fields. - **Opt-in by the host.** `withRecordBeingEdited(def, fields)` stamps, on a lookup whose filters read `{ $record }`, the host's statement that a single record is being edited here: `recordBeingEdited: { hopObjects: { account: 'account' } }`, naming the object each hop's lookup references. A hop's object is the spec's `referenceTargetOf` (rework r4, review#1 M1), the arbiter the object linter's `$record` rule also asks, so a hop through a `user` field, whose target the type fixes with no `reference` written, resolves like one through a `lookup`. It is the same hand-off shape as `followedParentObject` / `formObject`: a widget receives one field, not the object it is drawn for. Exported from `@object-ui/fields`. ⛔ A field without the stamp resolves no `{ $record }`: every such entry is left out, whatever values its host passes. - A hop the widget cannot read (a bare id whose lookup the stamp names no object for, or a data source with no `findOne`) is left out, with one dev-mode `console.warn` per path naming the remedy. **LookupField** — on a stamped field the edited record is the host's `dependentValues`; on any other it is an empty record, so every `{ $record }` entry drops. `queryLookupFilters` is the resolved list, keyed on its JSON so it moves only when a resolved value moves. It feeds the quick-select popover, the recents rail, the table picker and PeoplePicker. Filters that read no record pass through as the authored array, so literal entries keep their exact previous identity and bytes. While a hop read is pending, the popover query and recents fetch are held, and the Level-2 pickers are held shut, so the first query goes out once, with the value in it. The referenced fields are not added to `dependsOn` and gate nothing. **`lookupFiltersToRecord`** (RecordPickerDialog): - `orEmpty: true` on eq/ne/gt/lt/gte/lte becomes `{ $or: [condition, { column: { $null: true } }] }`, one member of a `$and` list, so several such entries each keep their alternative. - An entry still carrying a `{ $record }` is left out: an unresolved reference never reaches the wire. - The `lookupFilters` props of RecordPickerDialog and PeoplePicker are typed by reference to the spec row (`NonNullable<Field['lookupFilters']>[number]`), which declares `orEmpty`. **Record forms** — `ObjectForm` (auto layout) and `buildSectionFields` (authored sections, used by Modal/Drawer/Tabbed forms) wrap the field they hand the widget in `withRecordBeingEdited`, beside the existing `withFollowedParentObject` / `withFormObject` stamps. These are the only callers: every record form (Modal / Drawer / Tabbed / Wizard and the auto layout) goes through one of the two builders. **Action dialogs** — `bulkParamToField` (plugin-grid) never carries `recordBeingEdited` from a bulk param onto its widget: it used to forward every unenumerated param key (`...extra`), so a bulk param that wrote the key itself opted its lookup into resolution against the sibling params (rework r3). `paramToField` (app-shell), the single-record dialog's twin, builds the widget field from enumerated keys and never carried it. **Field-channel census** — `ui/examples/schema-catalog/test/form-field-channel-census-12130.test.tsx` gains one ledger row, `recordBeingEdited`, read by `fields/src/widgets/lookupRecordReference.ts`. It is RUNTIME-ONLY: stamped by `ObjectForm` and `buildSectionFields`, and ledgered, not declared on `FormFieldSchema`. The row names what holds the invariant: the two builders and the closed spec shapes (the published `customFields` member and action params refuse the key). objectui's loose `FormFieldSchema`, which can author it on an inline form field, is tracked by #34344 (review#1 S1). This fixes the Test UI (13/16) red on `34d869b8`, where the old key `recordHopObjects` was read and neither declared nor ledgered. **Spec** — `packages/spec/src/data/field.zod.ts`, describes only: - The `value`, `orEmpty` and `lookupFilters` describes lose `[PLANNED — not enforced]` and say what the picker sends. - Rework r2 (review#2 M1, remedy a): the `lookupFilters` and `value` describes and the docblock name where `{ $record }` resolves — record forms only (the auto layout, modal, drawer, tabbed and wizard forms) — and say every other picker host leaves the entry out: inline edit on a record page, a record page's header or related list, an action's parameter dialog, and a bulk action over selected rows. - Rework r3 (review#2 delta S1/N1): the forms are named by what they are, "in a record form, whatever its layout" (which also covers authored or field-group sections and the master-detail header form), and in the `lookupFilters` describe the "every other picker host" half follows the record-form half directly. The changeset's empty-value bullet adds "or cannot be read" (N2). - Rework r2 (S1): the empty-value sentence adds "or cannot be read" (the hop's row or field does not come back, no object is named for the hop, or the host has no single-row reader). - N6: the no-record example now reads "a bulk action over selected rows". "A filter panel" is removed: no list filter panel reads `lookupFilters` (measured: `ui/packages/plugin-list/src` has no `lookupFilters` read; its lookup chips use `LookupValuePicker`). - The same correction is made in the `LookupFilterRecordReferenceSchema` docblock. - `content/docs/references/**` regenerated (`check:generated --fix` → `gen:docs`). The `lookupFilters` row of `liveness/field.json` now cites the readers in place of the dated "declared ahead" sentence, names the record forms, says the server's refusal of an unresolved `$record` is not measured and cites its carrier #34199, and is re-verified (`verifiedAt` 2026-11-16). Surfaces that read `lookupFilters`, and what each gets: | Surface | `{ $record }` | one hop | |:--|:--|:--| | Record form, auto layout (`ObjectForm`) — stamped | resolved from the form values | read by id | | Record form, authored sections (`ModalForm` / `DrawerForm` / `TabbedForm` / `WizardForm` and the other section builders, via `buildSectionFields`) — stamped | resolved | read by id | | Bulk action dialog (hands the widget its sibling parameter values) — not stamped | every entry left out | — | | Detail-page inline edit, header highlight, related-list inline edit, single-record action dialog — not stamped | every entry left out (see Acceptance notes) | — | | A widget with no host record — not stamped | every entry left out | — | | `GridField` line-item lookup columns, list filter panel | do not read `lookupFilters` | — | ## Tests New pins. Ablation: each was mutated on disk through `scripts/ablation-replace.mjs`, ran red, and was restored to the HEAD blob (`git diff HEAD` empty). | Pin | File | Ablation (what was broken → tests red) | |:--|:--|:--| | a `{ $record }` field value is sent in place | `LookupField.recordReference-34197.test.tsx` | A1 resolver keeps the reference → 7 red | | a one-hop value is read off the target row and sent once | same | A2 hop row ignored → 1 red; A6 pending gate removed → 1 red | | an expanded hop costs no request | same | (A1) | | an empty referenced value, and no record, drop the entry | same | A3 empty test narrowed to `undefined` → 1 red | | a referenced field change re-queries once; another field does not | same | A4 memo keyed off the resolved values → 2 red | | `orEmpty` sends the `$or` null match | same | A5 flag read inverted → 2 red | | the table picker gets the resolved values | same | (A1, A5) | | an unresolved reference never reaches the wire | same | A7 drop deleted → 1 red | | a host without the record-being-edited stamp leaves every `{ $record }` entry out, even when its values hold one of that name (the bulk action dialog's shape); no hop read | same | A10 LookupField ignores the stamp → 1 red | | CONTROL: the same field and values on a stamped host resolve; the stamp names the hop object | same | A11 `withRecordBeingEdited` stamps nothing → 9 red (every stamped pin, both form pins) | | CONTROL: literal entry + `dependsOn` query exactly as before | same | stays green under every ablation | | `ObjectForm` stamps the field; the hop value reaches the query | `plugin-form/.../lookupRecordHop-34197.test.tsx` | A8 stamp removed → 1 red (re-run as A8r on the reworked head) | | authored sections stamp it too | same | A9 stamp removed → 1 red (re-run as A9r on the reworked head) | | a hop through a `user` field held as an id: the form names `sys_user`, the picker reads the hop (`$select: ['id','region']`) and sends its value | same | A16 hop object read off `reference` alone → 1 red | | the same hop held as an expanded row: read off it, no request | same | (resolves off the held row by design; no ablation of its own) | | the real `BulkActionDialog`: a lookup param whose filters read `{ $record: 'quote_date' }` beside a sibling `quote_date` param holding a value leaves the entry out; the literal entry beside it is sent | `plugin-grid/src/__tests__/bulkActionDialogRecordReference-34197.test.tsx` | A13 LookupField ignores the stamp → 1 red | | the real `ActionParamDialog`, same shape | `app-shell/src/views/ActionParamDialog.recordReference-34197.test.tsx` | A13 → 1 red | | a bulk param that writes `recordBeingEdited` itself still leaves the entry out and sends no sibling value | `bulkActionDialogRecordReference-34197.test.tsx` | A14 `bulkParamToField` drop removed → 1 red | | a single-record action param that writes it, same | `ActionParamDialog.recordReference-34197.test.tsx` | A15 `paramToField` forwards the key → 1 red | | the channel reads `recordBeingEdited` and it is ledgered | `form-field-channel-census-12130.test.tsx` | A12 ledger row renamed → 2 red (`unexpected: recordBeingEdited ← …lookupRecordReference.ts`) | The first attempt at A7–A9 was a no-op: `ablation-replace` refused it because the replacement text already occurred in the file. They were re-run with a delete and a distinct replacement, and those runs are the ones reported. A1–A9 were measured on `34d869b8`; A10, A11, A8r, A9r and A12 on the r1 head; A13 on the r2 head; A14 and A15 on the r3 head; A16 on the r4 head, each red and restored to the HEAD blob. <details><summary>Suite and type-check readings</summary> - `pnpm --dir ui exec vitest run packages/fields/ packages/plugin-form/` plus the two dialog pin files and the census on the r2 head: Test Files 543 passed | 1 skipped (544), Tests 7248 passed | 8 skipped (7256). Earlier rounds: 7211 (r1), 7209 (r0). - `pnpm --dir ui exec vitest run examples/schema-catalog/test/form-field-channel-census-12130.test.tsx`: 35 passed. - `pnpm --filter @object-ui/fields --filter @object-ui/plugin-form run type-check`: both pass (plugin-form after `pnpm --filter @object-ui/fields build`). - `pnpm --filter @objectstack/spec check:generated`: `check:docs` stale → `--fix` regenerated `gen:docs`, re-check green. `check:test-typecheck` passes with `NODE_OPTIONS=--max-old-space-size=4096`; without it, tsc ran out of heap on this shared box. </details> ## Acceptance notes - **Opt-in, seat rework r1.** `{ $record }` resolution is opt-in by the host. `BulkActionDialog` hands a lookup param the dialog's own parameter values (`cascadeProps`, objectui#8755) and stamps nothing, so it now leaves every `{ $record }` entry out, as ruling 6900252552 §1 reads ("a bulk-action bar … leaves every `{ $record }` entry out"). `ui/packages/plugin-grid/**` is not touched. The signal is the field-definition stamp `recordBeingEdited` (`withRecordBeingEdited`). The alternative considered was a `LookupField` prop, `recordBeingEdited`, passed by the form renderer. It was not taken because a record form hands the widget a field definition, not props, and the existing hand-offs (`followedParentObject`, `formObject`) ride the definition. - **Single-record hosts that are not record forms.** Detail-page inline edit, header highlight, related-list inline edit and the single-record action dialog do not stamp, so they leave every `{ $record }` entry out too. Since r2 the describes say so in as many words (review#2 M1, remedy a; the seat ruled no further hosts opt in on this card). - **An authored stamp on a bulk param (fixed in r3).** objectui's grid schema for bulk params is a `looseObject` and `bulkParamToField` spread unenumerated keys, so a bulk param that wrote `recordBeingEdited` opted itself in (measured before the fix: the query carried the sibling's value). The spec's `BulkActionParamSchema` is a `strictObject` and refuses the key at authoring. `bulkParamToField` now drops the key; `BulkActionDialog.tsx` is not touched. - **Server refusal by name** of an unresolved `$record` (ruling §3, review#2 S3) is not built or measured here. Its carrier is #34199, cited from the liveness note. - **Hand-written docs.** `content/docs/data-modeling/fields.mdx` and `relationships.mdx` do not yet teach `{ $record }` / `orEmpty`. The Skills-docs follow-up the card names carries that teaching. ## Verification Head `866523ae` (rework r4, with main `35c9a305` merged in). Gates were derived by `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` on this head, run locally and reconciled with `--ran`. Every CI family is read from this PR's check-runs. - `dispatch-gates --ran`: **115 derived, 115 run, 0 NOT-MEASURED, 0 UNRUN**. Every gate exited 0 on the first pass. - Prerequisites, all exit 0: `pnpm install --frozen-lockfile --offline` after the merge; `turbo run build --filter='./packages/**'`; `turbo run build` of the dependencies of `@object-ui/plugin-grid` and `@object-ui/plugin-form`. - Type-check of `@object-ui/fields`, `@object-ui/plugin-form` and `@object-ui/plugin-grid`: pass. - Suites: `vitest run packages/fields/ packages/plugin-form/ packages/plugin-grid/`, plus the `ActionParamDialog` pin file and the field-channel census. Test Files 826 passed | 1 skipped (827), Tests 9721 passed | 8 skipped (9729). - This round supersedes the earlier rounds (`34d869b8`, `0b8ad7e7`, `0179f341`, `503e0152`), each of which read 115/115. - The gate runner exports `NODE_OPTIONS=--max-old-space-size=4096`. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmTKRu1t68jcJGgRYi3 <!-- signed: domain:ui#2 · os-steve · session_01ADHkmTKRu1t68jcJGgRYi3 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2b267b7 commit 2c296cf

19 files changed

Lines changed: 1246 additions & 72 deletions
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@object-ui/fields': patch
3+
'@object-ui/plugin-form': patch
4+
'@object-ui/plugin-grid': patch
5+
'@objectstack/spec': patch
6+
---
7+
8+
feat(fields): the lookup picker reads `{ $record }` lookupFilters values from the record being edited and sends `orEmpty`
9+
10+
Clause-②: no
11+
Metadata-protocol: none
12+
13+
A `lookupFilters` entry may compare a candidate column with a value of the record being edited, written `{ $record: 'quote_date' }` or, one lookup hop away, `{ $record: 'account.cb_market' }`, and may add `orEmpty: true` so a candidate whose column is null also matches. The schema has accepted both since the previous release; the lookup picker now honours them.
14+
15+
- **The value.** Before the candidate query leaves the browser, the picker puts the value the reference names in its place: the quick-select popover, the table picker and the search-first people picker all send it. A one-hop path reads the lookup's target row once per id, its hop fields alone, unless the record already holds that row expanded. The query waits for that read and goes out once, with the value in it.
16+
- **An empty value.** While the referenced value is empty (null, unset, an empty string, or an unset hop lookup) or cannot be read (the hop's row or field does not come back, no object is named for the hop, or the host has no single-row reader), the entry is left out, the rule an unset `dependsOn` parent follows. A reference that was never resolved is never sent.
17+
- **Re-query.** Changing a referenced field re-queries the open picker once, with the new value. Changing any other field of the record does not.
18+
- **orEmpty.** An entry with `orEmpty: true` is sent as an `$or` of its comparison and a null match on the same column. Several such entries each keep their own alternative.
19+
- **Record forms opt in.** `ObjectForm` and authored form sections stamp such a lookup as drawn for a single record being edited, naming the object each hop's lookup points at (`withRecordBeingEdited`, exported from `@object-ui/fields`), through the spec's `referenceTargetOf`, so a hop through a `user` field, whose target the type fixes, resolves too. The picker resolves `{ $record }` only on that stamp. Any other host, such as a bulk action dialog that hands the widget its sibling parameters, leaves every `{ $record }` entry out. A bulk action parameter cannot claim the stamp by writing it: the bulk dialog never carries `recordBeingEdited` from a parameter onto its widget.
20+
- **Spec.** The `value`, `orEmpty` and `lookupFilters` describes on `FieldSchema` lose their `[PLANNED — not enforced]` markers and say what the picker does. The no-record example now names a bulk action over selected rows in place of a filter panel, which reads no `lookupFilters`.
21+
22+
Literal entries and `dependsOn` query exactly as before.

‎content/docs/references/data/field.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const result = CurrencyConfigSchema.parse(data);
9393
| **descriptionField** | `string` | optional | Secondary field shown under the label in the quick-select popover. |
9494
| **lookupColumns** | `(string \| { field: string; label?: string; width?: string; type?: string })[]` | optional | Explicit columns for the record-picker table; auto-derived from the referenced object when omitted. |
9595
| **lookupPageSize** | `integer` | optional | Rows per page in the record-picker dialog (default 10). |
96-
| **lookupFilters** | `{ field: string; operator: Enum<'eq' \| 'ne' \| 'gt' \| 'lt' \| 'gte' \| 'lte' \| 'contains' \| 'in' \| 'notIn'>; value: any; orEmpty?: boolean }[]` | optional | Base filters restricting which records are selectable (e.g. only active). The structured, picker-honoured lookup filter. Each entry compares a column of the CANDIDATE record (`field`, on the referenced object) with `value`. A value may read the record being edited as `{ $record: "field" }` or `{ $record: "lookup_field.field" }` (at most one lookup hop): the picker sends that value in its place and re-queries whenever a referenced field changes. Those fields are implied: do not list them in `dependsOn`, which also scopes the candidate query by equality (`dependsOn: ['quote_date']` adds `quote_date = …` to the query over the referenced object). While the value is empty, and on a picker with no single record being edited (a bulk-action bar, a filter panel), the entry is left out. A `{ $record }` is the whole value, never a member of an `in` / `notIn` list. `orEmpty: true` also matches a candidate whose column is null. A `{ $record }` that reaches a server unresolved is refused, never read as null. The picker narrows the choice only: a rule the save must enforce belongs on the server too. [PLANNED — not enforced] `{ $record }` and orEmpty are declared ahead of the picker that resolves them. |
96+
| **lookupFilters** | `{ field: string; operator: Enum<'eq' \| 'ne' \| 'gt' \| 'lt' \| 'gte' \| 'lte' \| 'contains' \| 'in' \| 'notIn'>; value: any; orEmpty?: boolean }[]` | optional | Base filters restricting which records are selectable (e.g. only active). The structured, picker-honoured lookup filter. Each entry compares a column of the CANDIDATE record (`field`, on the referenced object) with `value`. A value may read the record being edited as `{ $record: "field" }` or `{ $record: "lookup_field.field" }` (at most one lookup hop). In a record form, whatever its layout, the picker sends that value in its place and re-queries whenever a referenced field changes; every other picker host leaves every `{ $record }` entry out: inline edit on a record page, a record page's header or related list, an action's parameter dialog, and a picker with no single record being edited (a bulk action over selected rows). The referenced fields are implied: do not list them in `dependsOn`, which also scopes the candidate query by equality (`dependsOn: ['quote_date']` adds `quote_date = …` to the query over the referenced object). While the value is empty or cannot be read (the hop's row or field does not come back, no object is named for the hop, or the host has no single-row reader), the entry is left out. A `{ $record }` is the whole value, never a member of an `in` / `notIn` list. `orEmpty: true` also matches a candidate whose column is null. A `{ $record }` that reaches a server unresolved is refused, never read as null. The picker narrows the choice only: a rule the save must enforce belongs on the server too. |
9797
| **dependsOn** | `(string \| { field: string; param?: string })[]` | optional | Declares that this field's available values depend on the value of other field(s) on the same record — the form gates the field until they are set and re-evaluates as they change. For `lookup`/`master_detail` it scopes the candidate query (string = same local/remote key; `{field,param}` when the remote filter key differs — the `{field,param}` form is lookup-only). For `select`/`multiselect`/`radio` the actual per-option rule lives in each option's `visibleWhen`; list the referenced fields here (string form) so the option list gates and refreshes with the parent. |
9898
| **allowCreate** | `boolean` | optional | Allow inline quick-create from the record picker: when no match exists the user can create a record from the typed text (optimistic dataSource.create with the display field). Best for simple objects whose only required field is the display field. |
9999
| **lookupAutofill** | `{ target: string; source: string; overwrite?: boolean }[]` | optional | Fields a pick in this lookup fills on the record being edited: each `{ target, source }` pair copies the picked record's `source` field (a field of the `reference` object) into this object's `target` field — e.g. `[{ target: 'unit_price', source: 'list_price' }]` on a quote line's product lookup. Read wherever this field is picked: the record form, and a line-item grid column over it. OVERWRITE RULE — the default, `overwrite` absent or false: a pick never replaces a value somebody wrote. The target is filled only while it is empty or still holds the value an earlier pick filled in; a value the user typed, or one the record already stored, stays. Only a pair that declares `overwrite: true` replaces the target on every pick, whatever it holds. Client-side only: it fills the form, and nothing on the write path reads it — the filled value is saved as an ordinary write, and an import or API write that sets the lookup fills nothing. Only on a single-value `lookup` / `master_detail`. Each target is a field of this object other than this one, written by its author — not `readonly`, not computed (`formula`, `summary`, `autonumber`, or an `expression`) — and named once. Each source is a field of the referenced object that the record carries (not `internal`) and whose value the target can hold; `os validate` / `os build` judge the source. In a line-item grid the column key `autofill` still governs only the same-named copy and is unchanged; a declared pair takes its target out of that copy. |
@@ -242,8 +242,8 @@ const result = CurrencyConfigSchema.parse(data);
242242
| :--- | :--- | :--- | :--- |
243243
| **field** | `string` | ✅ | |
244244
| **operator** | `Enum<'eq' \| 'ne' \| 'gt' \| 'lt' \| 'gte' \| 'lte' \| 'contains' \| 'in' \| 'notIn'>` | ✅ | |
245-
| **value** | `any` | ✅ | The comparand: a literal (an array for `in` / `notIn`), a date placeholder such as `{today}` or a `{ $now: true, addDays }` comparand for a date relative to today, or a `{ $record: "path" }` reference to the record being edited — a field of it, or one lookup hop ("account.cb_market"); a `{ $record }` value pairs only with eq, ne, gt, lt, gte or lte. [PLANNED — not enforced] The picker does not resolve `{ $record }` yet. |
246-
| **orEmpty** | `boolean` | optional | [PLANNED — not enforced] TRUE: the entry also matches a candidate whose column is null — "valid from the quote date, or with no start date". Only with eq, ne, gt, lt, gte or lte. The picker does not read it yet. |
245+
| **value** | `any` | ✅ | The comparand: a literal (an array for `in` / `notIn`), a date placeholder such as `{today}` or a `{ $now: true, addDays }` comparand for a date relative to today, or a `{ $record: "path" }` reference to the record being edited — a field of it, or one lookup hop ("account.cb_market"); a `{ $record }` value pairs only with eq, ne, gt, lt, gte or lte. In a record form, whatever its layout, the picker sends the referenced value in place of the reference; every other picker host leaves the entry out. |
246+
| **orEmpty** | `boolean` | optional | TRUE: the entry also matches a candidate whose column is null — "valid from the quote date, or with no start date". Only with eq, ne, gt, lt, gte or lte. The picker sends the comparison or a null match on the same column. |
247247

248248
### Nested Shape: `Field.lookupAutofill[number]`
249249

0 commit comments

Comments
 (0)