# defineListView

> API reference for defineListView: parameters, properties, and return types.

Defines a list view for a custom object using that object's typed field references. Include the returned view in the manifest's components to deploy it.

```ts
import { defineListView } from '@rippling/rippling-sdk';
```

## Properties

| Property | Required | Type | Description |
| --- | --- | --- | --- |
| `apiName` | Required | `string` | Stable API name for this view. Use a name unique across custom objects in the company. |
| `description` | Required | `null \| string` | Human-readable description of this view. |
| `fields` | Required | `readonly NoInfer<[DefinitionFieldReference](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefinitionFieldReference-fd4ee077)<TObject>>[]` | Columns to display, using field references from this object or standard field names. Include at least one field. |
| `isPublic` | Required | `boolean` | Whether this view is visible to all users (`true`) or only the record owner (`false`). |
| `name` | Required | `string` | Display name of this list view shown in the UI (e.g. `'All members'`). |
| `columnConfig` | Optional | `Record<string, [ListViewColumnConfig](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/ListViewColumnConfig-b027d288)>` | Per-column configuration overrides keyed by field API name.<br>**Documented default:** `` `{}` `` |
| `layeredConditionsTree` | Optional | `null \| { [x: string]: JsonValue; }` | Structured filter conditions, validated by the Metadata API. |
| `objectScope` | Optional | `[ObjectScope](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/ObjectScope-c22c57d8)` | Record scope for this view. One of `'all'` \| `'my_records'`.<br>**Documented default:** `` `'all'` `` |
| `orderBy` | Optional | `NoInfer<[DefinitionFieldReference](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefinitionFieldReference-fd4ee077)<TObject>>` | Field to sort by; supply `sortOrder` to choose the direction. |
| `rqlFilter` | Optional | `string` | RQL filter expression to pre-filter records shown in this view (e.g. `'(session_date__c == TODAY())'`).<br>**Documented default:** `null` |
| `sortOrder` | Optional | `[SortOrder](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/SortOrder-9aa4aec0)` | Sort direction. One of `'ASC'` \| `'DESC'`. Requires `orderBy` to be set. |

[Complete options type](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefineListViewProps-801a428e)

## Parameters

| Parameter | Required | Type | Description |
| --- | --- | --- | --- |
| `object` | Required | `TObject` | \- Custom object whose records this view displays. |

TypeScript signature

```ts
defineListView<TObject extends ObjectReference>(object: TObject, props: DefineListViewProps<TObject>): ListViewDef;
```

## Returns

A list-view component for use in `defineManifest`.

```
ListViewDef
```

## Availability

| Capability | Support |
| --- | --- |
| Pull into a project | Supported |
| Runtime operations | Not available for this helper |

Source: https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/defineListView

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
