> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kayanos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Form helpers and lookup filters

> Form-only context helpers, permission-aware UI checks, data lookups, shift-aware weekday checks, and filter builders.

## When to use these helpers

These helpers are supported in a regular form expression context. They adapt a form; they do not grant access or replace server-side authorization. Offline forms block data and permission helpers.

## Calling style

Call a helper as `hasVerb("review")`. Not every helper is available everywhere: validation, form, and document-template helpers have distinct context contracts. Editor suggestions are not proof that a helper is supported at runtime.

## Complete function reference

### `f._in`

Explicit alias for f.in that builds an inclusion filter.

**Signature:** `f._in(field, values)`

**Example:**

```txt theme={null}
getRecords("service_requests", f._in("status", ["received", "in_review"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.adj`

Builds an adjacent-range filter.

**Signature:** `f.adj(field, range)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.adj("service_period", ["2026-01-01", "2026-01-31"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.and`

Builds a filter that requires every nested filter. Use it only as a getRecords filter argument.

**Signature:** `f.and(...filters)`

**Example:**

```txt theme={null}
getRecords("licenses", f.and(f.eq("status", "approved"), f.gte("score", 80)))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.cd`

Builds a contained-by filter for a collection field.

**Signature:** `f.cd(field, values)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.cd("tags", ["priority", "inspection", "public"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.cs`

Builds a contains-all filter for a collection field.

**Signature:** `f.cs(field, values)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.cs("tags", ["priority", "inspection"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.eq`

Builds an equality filter.

**Signature:** `f.eq(field, value)`

**Example:**

```txt theme={null}
getRecords("licenses", f.eq("status", "approved"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.fts`

Builds a full-text-search filter.

**Signature:** `f.fts(field, query)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.fts("description", "service counter"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.gt`

Builds a greater-than filter.

**Signature:** `f.gt(field, value)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.gt("requested_amount", 0))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.gte`

Builds a greater-than-or-equal filter.

**Signature:** `f.gte(field, value)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.gte("score", 80))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.ilike`

Builds a case-insensitive pattern filter.

**Signature:** `f.ilike(field, pattern)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.ilike("title", "%inspection%"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.imatch`

Builds a case-insensitive regular-match filter.

**Signature:** `f.imatch(field, pattern)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.imatch("district", "^central$"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.in`

Builds an inclusion filter. Prefer f.\_in when a word-like name could be confusing in a complex expression.

**Signature:** `f.in(field, values)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.in("status", ["received", "in_review"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.is`

Builds a database-style null or Boolean-state filter.

**Signature:** `f.is(field, value)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.is("closed_at", null))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.isdistinct`

Builds a distinct-value filter.

**Signature:** `f.isdistinct(field, value)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.isdistinct("owner_id", $.current_owner_id))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.like`

Builds a case-sensitive pattern filter.

**Signature:** `f.like(field, pattern)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.like("reference", "CSR%"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.lt`

Builds a less-than filter.

**Signature:** `f.lt(field, value)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.lt("days_open", 30))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.lte`

Builds a less-than-or-equal filter.

**Signature:** `f.lte(field, value)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.lte("attachments_count", 10))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.match`

Builds a case-sensitive regular-match filter.

**Signature:** `f.match(field, pattern)`

**Example:**

```txt theme={null}
getRecords("licenses", f.match("code", "^LIC-[0-9]+$"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.neq`

Builds a not-equal filter.

**Signature:** `f.neq(field, value)`

**Example:**

```txt theme={null}
getRecords("licenses", f.neq("status", "cancelled"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.nilike`

Builds a negated case-insensitive pattern filter.

**Signature:** `f.nilike(field, pattern)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.nilike("title", "%archived%"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.nin`

Builds a negated inclusion filter.

**Signature:** `f.nin(field, values)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.nin("status", ["archived", "deleted"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.nis`

Builds the negated form of f.is.

**Signature:** `f.nis(field, value)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.nis("closed_at", null))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.nisdistinct`

Builds the negated distinct-value filter.

**Signature:** `f.nisdistinct(field, value)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.nisdistinct("owner_id", $.current_owner_id))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.nlike`

Builds a negated case-sensitive pattern filter.

**Signature:** `f.nlike(field, pattern)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.nlike("reference", "TEST%"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.nxl`

Builds a does-not-extend-left-of-range filter.

**Signature:** `f.nxl(field, range)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.nxl("service_period", ["2026-01-01", "2026-01-31"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.nxr`

Builds a does-not-extend-right-of-range filter.

**Signature:** `f.nxr(field, range)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.nxr("service_period", ["2026-01-01", "2026-01-31"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.or`

Builds a filter that accepts any nested filter. Use it only as a getRecords filter argument.

**Signature:** `f.or(...filters)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.or(f.eq("priority", "high"), f.eq("priority", "urgent")))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.ov`

Builds an overlap filter for a range or value collection.

**Signature:** `f.ov(field, values)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.ov("service_area", ["central", "north"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.ov_array`

Builds an array-overlap filter.

**Signature:** `f.ov_array(field, values)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.ov_array("categories", ["roads", "lighting"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.phfts`

Builds a phrase full-text-search filter.

**Signature:** `f.phfts(field, query)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.phfts("description", "street light"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.plfts`

Builds a plain full-text-search filter.

**Signature:** `f.plfts(field, query)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.plfts("description", "road repair"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.sl`

Builds a strictly-left-of-range filter.

**Signature:** `f.sl(field, range)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.sl("service_period", ["2026-02-01", "2026-02-28"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.sr`

Builds a strictly-right-of-range filter.

**Signature:** `f.sr(field, range)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.sr("service_period", ["2026-01-01", "2026-01-31"]))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `f.wfts`

Builds a web-style full-text-search filter.

**Signature:** `f.wfts(field, query)`

**Example:**

```txt theme={null}
getRecords("service_requests", f.wfts("description", "lighting OR roads"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `getRecord`

Looks up one record for a form expression. A missing form/client or lookup timeout can resolve to an empty or null-like result; do not use it to prove access.

**Signature:** `getRecord(qualifiedRecordId)`

**Example:**

```txt theme={null}
getRecord("licenses:license-42")
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `getRecords`

Looks up records for a form expression. Keep returned data out of public output unless the service owner has reviewed the data exposure.

**Signature:** `getRecords(entityKey, filters)`

**Example:**

```txt theme={null}
getRecords("licenses", f.eq("status", "approved"))
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `hasAnyScope`

Checks whether the current form session includes any supplied scope.

**Signature:** `hasAnyScope(scopes)`

**Example:**

```txt theme={null}
hasAnyScope(["central-service-centre", "north-service-centre"])
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `hasScope`

Checks whether the current form session includes one named scope.

**Signature:** `hasScope(scope)`

**Example:**

```txt theme={null}
hasScope("central-service-centre")
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `hasVerb`

Checks the current form-session scopes for a current member. Server evaluation returns true, so it is not a server-side authorization control.

**Signature:** `hasVerb(verb)`

**Example:**

```txt theme={null}
hasVerb("review")
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `hasVerbOnRecord`

Checks the current form member’s assigned verb against a qualified record and its scopes. Use it only to adapt the form experience, never as authorization enforcement.

**Signature:** `hasVerbOnRecord(verb, qualifiedRecordId)`

**Example:**

```txt theme={null}
hasVerbOnRecord("update", $.license_id)
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `isWeekday`

Inverse of isWeekend with the same optional shift-data behavior.

**Signature:** `isWeekday(date, entityId?)`

**Example:**

```txt theme={null}
isWeekday($.appointment_date, $.assigned_position_id)
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

### `isWeekend`

Checks whether a date is non-working for an optional shift-related entity. Without available shift data it falls back to Saturday/Sunday.

**Signature:** `isWeekend(date, entityId?)`

**Example:**

```txt theme={null}
isWeekend($.appointment_date, $.assigned_position_id)
```

**Availability:** Regular form expressions only. These are function calls, not transforms; offline forms block data and permission helpers.

**Note:** Use this as a function call, not as a transform.

## Before you publish

* Start with a known value and confirm the expected result.
* Handle null, empty text, and empty lists deliberately.
* Do not place secrets, access tokens, or sensitive personal data in an expression.
* Read [expression contexts and availability](/reference/expressions/contexts) before copying an expression between features.

![Form helpers and lookup filters in KayanOS](https://kayanos.app/docs-images/en/reference/expressions-helpers-forms.png)
