# POSITION

### Description

Returns the Position of an element within a vector as Scalar\<Number>. The position of the element within the vector is the index of the element within the vector plus 1.

### POSITION(Vector\<Number>)

```java
POSITION(vector: Vector<Number>, targetElement: Scalar<Number>): Scalar<Number>
```

Returns the position of the given targetElement within the given Vector.

#### Parameters

<table><thead><tr><th width="172">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>vector</td><td>A vector of type &#x3C;Number> within we search the position of targetElement.</td></tr><tr><td>targetElement</td><td>The targetElement of type &#x3C;Number> we are searching within given vector.</td></tr></tbody></table>

#### Returns

Returns the position of the searched element within the vector as Scalar\<Number>.


---

# 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://doc.moost.io/platform-manual/rules/rule-language/functions/avg-2.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.
