---
url: /process-functions/cube-wipebatchactive.md
description: Starts or ends a batch of cube wipes.
---

# cube.wipeBatchActive&#x20;

Starts or ends a batch of cube wipes.

```js
cube.wipeBatchActive(cubeName, setBatchActive)
cube.wipeBatchActive(cubeName)
```

While a batch is active, [cube.wipe](/process-functions/cube-wipe) calls skip the formula invalidation that normally follows each wipe; it happens once when the batch ends. End the batch before reading the cube with [cube.get](/process-functions/cube-get).

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `cubeName` | `string` | The cube's name or id. |
| `setBatchActive` | `boolean` | Optional. `true` to start a batch, `false` to end it. Leave it out to check whether a batch is active. |

## Returns

Whether a batch is active.

## Examples

```js
cube.wipeBatchActive("Profit and Loss", true); // Start the batch
// Do some frequent cube.wipe calls...
cube.wipeBatchActive("Profit and Loss", false); // End the batch
```
