# Filtering To Available Units

### Overview

Calcumate allows you to filter out specific units so that they do not appear in the results. This can be useful for managing inventory and ensuring only available units are displayed to users.

### Instructions

#### Disabling Units

To disable specific units, use the following JavaScript code:

```javascript
window.dispatchEvent(new CustomEvent("calcumateLoad", {
    detail: [<Units ID>, <Units ID>],
}));
```

* Replace `<Units ID>` with the actual IDs of the units you want to disable.
* You can list multiple unit IDs separated by commas within the square brackets.

#### Enabling All Units

To enable all units again, pass an empty array in the `detail`:

```javascript
window.dispatchEvent(new CustomEvent("calcumateLoad", {
    detail: [],
}));
```

#### Listing Available Units

To see a list of all available units, use the following command:

```javascript
window.listUnits
```

<figure><img src="/files/NHlSzG6JV84YvoOHeY0Z" alt=""><figcaption></figcaption></figure>

#### Listing Disabled Units

To see a list of all currently disabled units, use the following command:

```javascript
window.disableUnits
```

#### Example

1. Here is an example of how to disable two units with IDs `123` and `456`:

```javascript
window.dispatchEvent(new CustomEvent("calcumateLoad", {
    detail: [123, 456],
}));
```

To enable all units again:

```javascript
window.dispatchEvent(new CustomEvent("calcumateLoad", {
    detail: [],
}));
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.calcumate.co/filtering-to-available-units/filtering-to-available-units.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
