---
url: /process-functions/element-exists.md
description: Checks whether a leaf element exists in a dimension.
---

# element.exists

Checks whether a leaf element exists in a dimension. To check for parent elements, use [hierarchy.hasMember](/process-functions/hierarchy-hasmember).

```js
element.exists(dimension, name)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `dimension` | `string` | The dimension's name or id. |
| `name` | `string` | The element's name. |

## Returns

`true` when the element exists, otherwise `false`, including when the dimension can't be found.

## Examples

```js
if (element.exists("Account", "600010")) {
    // do something
}
```
