---
schema_version: "1"
id: 622edbf3386dc50454e81968e2b9b0f8b949da2e802473bda6b55d63996ff58f
title: locationString
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.11/dw-runtime-functions-locationstring.md
canonical_url: https://docs.mulesoft.com/dataweave/2.11/dw-runtime-functions-locationstring
source_site: docs.mulesoft.com
content_type: documentation
content_hash: e2f00d282a61cca4779aa55c26cdea164b1fba9a83bda3994e2e361f94e581bf
description: MuleSoft Documentation Site
release: "2.11"
latest: false
---
---
product: DataWeave
version: 2.11
---

# locationString

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## locationString(value: Any): String

Returns the location string of a given value.

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>value</code></p></td><td><p>A value of any type.</p></td></tr></tbody></table>

### Example

This example returns the contents of the line (the location) that defines variable `a` in the header
of the DataWeave script.

#### Source

```DataWeave
%dw 2.0
import * from dw::Runtime
var a = 123
output application/json
---
locationString(a)
```

#### Output

```JSON
"var a = 123"
```
