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

# dimension.hasMember

Checks whether an element exists in a dimension.

It finds leaf and consolidated elements in any hierarchy, as well as orphans (elements that aren't in any hierarchy). The match isn't case-sensitive. It's the same check as [element.exists](/process-functions/element-exists). To check a single hierarchy instead, use [hierarchy.hasMember](/process-functions/hierarchy-hasmember).

```js
dimension.hasMember(dimension, member)
```

## Parameters

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

## Returns

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

## Examples

```js
if (dimension.hasMember("Product", "Product A")) {
    // do something
}
```
