Get items
Retrieve a paginated list of items from a board view
Retrieves a paginated list of items from a board view.
Parameters
| Parameters | Type | Description |
|---|---|---|
| options | Object | Optional query options: viewId, searchValue, pageNumber, pageSize, payload. |
Payload
payload is sent as the request body. Every key is optional.
| Key | Type | Description |
|---|---|---|
| Columns | Array | The columns to request. |
| Filter | Object | The filter to apply, in the same shape the view builder sends. The key is Filter, singular. |
| Sort | Array | Sort order, one { Id, SortType } entry per field. Id is the field ID and SortType is "ASC" or "DESC". |
const { items } = await boardInstance.getItems({ viewId: "AllItems_View", payload: { Sort: [{ Id: "Due_Date", SortType: "DESC" }] } });Syntax
const { items, total } = await boardInstance.getItems({ viewId: "AllItems_View" });Returns
Returns an object containing an items array and the total item count.
Example
const boardInstance = kf.app.getBoard("Inventory");
const { items } = await boardInstance.getItems({ viewId: "AllItems_View" });
