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

# locationString

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

## locationString(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"
```
